New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UI Events. Buttons, hovering, clicks clicks CLICKS! #580

Merged
merged 8 commits into from Feb 26, 2018

Conversation

Projects
None yet
4 participants
@jojolepro
Collaborator

jojolepro commented Feb 22, 2018

Much hovering, much clicking!

Review-ready, except if @Xaeroxe wants more features in this PR ;)


This change is Reviewable

@Xaeroxe

Very well done!! I like it a lot.

If you wanted to do this I would not be opposed to adding MouseDown and MouseUp events to the InputHandler, as this probably isn't going to be the only place we need this kind of information.

amethyst_ui/src/lib.rs
@@ -1,10 +1,11 @@
//! Provides components and systems to create an in game user interface.
-#![deny(missing_docs)]
+//#![deny(missing_docs)]

This comment has been minimized.

@Xaeroxe

Xaeroxe Feb 22, 2018

Member

Please uncomment this.

@Xaeroxe

Xaeroxe Feb 22, 2018

Member

Please uncomment this.

This comment has been minimized.

@torkleyy

torkleyy Feb 22, 2018

Member

Or even better, change it to warn.

@torkleyy

torkleyy Feb 22, 2018

Member

Or even better, change it to warn.

This comment has been minimized.

@jojolepro

jojolepro Feb 22, 2018

Collaborator

done

@jojolepro

jojolepro Feb 22, 2018

Collaborator

done

amethyst_ui/src/event.rs
+ Entities<'a>,
+ ReadStorage<'a, UiTransform>,
+ ReadStorage<'a, MouseReactive>,
+ Fetch<'a, InputHandler<String, String>>,

This comment has been minimized.

@Xaeroxe

Xaeroxe Feb 22, 2018

Member

String should be generic here.

@Xaeroxe

Xaeroxe Feb 22, 2018

Member

String should be generic here.

This comment has been minimized.

@jojolepro

jojolepro Feb 22, 2018

Collaborator

done

@jojolepro

jojolepro Feb 22, 2018

Collaborator

done

@Xaeroxe

LGTM!

@Rhuagh

This comment has been minimized.

Show comment
Hide comment
@Rhuagh

Rhuagh Feb 22, 2018

Member

:lgtm:

I'd probably do things a bit differently, but this should work fine!


Reviewed 2 of 6 files at r1, 4 of 4 files at r2.
Review status: all files reviewed at latest revision, 2 unresolved discussions, some commit checks failed.


Comments from Reviewable

Member

Rhuagh commented Feb 22, 2018

:lgtm:

I'd probably do things a bit differently, but this should work fine!


Reviewed 2 of 6 files at r1, 4 of 4 files at r2.
Review status: all files reviewed at latest revision, 2 unresolved discussions, some commit checks failed.


Comments from Reviewable

@torkleyy

This comment has been minimized.

Show comment
Hide comment
@torkleyy

torkleyy Feb 24, 2018

Member

Reviewed 2 of 6 files at r1, 4 of 4 files at r2.
Review status: all files reviewed at latest revision, 2 unresolved discussions, some commit checks failed.


Comments from Reviewable

Member

torkleyy commented Feb 24, 2018

Reviewed 2 of 6 files at r1, 4 of 4 files at r2.
Review status: all files reviewed at latest revision, 2 unresolved discussions, some commit checks failed.


Comments from Reviewable

@Rhuagh

This comment has been minimized.

Show comment
Hide comment
@Rhuagh

Rhuagh Feb 25, 2018

Member

You'll have to fix so it builds before we merge :P

Member

Rhuagh commented Feb 25, 2018

You'll have to fix so it builds before we merge :P

@jojolepro

This comment has been minimized.

Show comment
Hide comment
@jojolepro

jojolepro Feb 25, 2018

Collaborator

haha I just saw. Will do ;)

Collaborator

jojolepro commented Feb 25, 2018

haha I just saw. Will do ;)

jojolepro added some commits Feb 25, 2018

@Xaeroxe

This comment has been minimized.

Show comment
Hide comment
@Xaeroxe

Xaeroxe Feb 25, 2018

Member

Reviewed 6 of 6 files at r3.
Review status: all files reviewed at latest revision, all discussions resolved, some commit checks failed.


Comments from Reviewable

Member

Xaeroxe commented Feb 25, 2018

Reviewed 6 of 6 files at r3.
Review status: all files reviewed at latest revision, all discussions resolved, some commit checks failed.


Comments from Reviewable

@Rhuagh

This comment has been minimized.

Show comment
Hide comment
@Rhuagh

Rhuagh Feb 26, 2018

Member

Squash pls.

Member

Rhuagh commented Feb 26, 2018

Squash pls.

@Xaeroxe Xaeroxe merged commit efa39a7 into amethyst:develop Feb 26, 2018

2 of 3 checks passed

code-review/reviewable 1 file left (Rhuagh, torkleyy)
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@Xaeroxe Xaeroxe referenced this pull request Feb 27, 2018

Closed

Add buttons to UI #577

@jojolepro jojolepro deleted the jojolepro:btn branch Mar 29, 2018

mnivoliez pushed a commit to mnivoliez/amethyst that referenced this pull request May 12, 2018

UI Events. Buttons, hovering, clicks clicks CLICKS! (#580)
* Initial impl of clickable ui elements.

* The amethyst logo is clickable in the ui example

* Basic mouse event support is done. PR feature complete. Pre-format commit.

* fmt pass

* Added missing doc. Re-added generics to InputHandler in ui mouse system

* Fixed build failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment