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

Add UiButton and UiButtonBuilder #613

Merged
merged 7 commits into from Apr 13, 2018

Conversation

Projects
None yet
5 participants
@Hittherhod
Contributor

Hittherhod commented Mar 29, 2018

It's not showing up properly on my Mac, but I'd like to get a chance to iterate over the API and defaults.


This change is Reviewable

@jojolepro

Consider adding a "ToEntities" trait which can be re-used between ui components to get a Vec from a UiButton or UiComponentName.

Most of it looks good though :)

amethyst_ui/src/button.rs
+ /// Construct a new UiButtonBuilder.
+ /// This allows easy use of default values for text and button appearance and allows the user
+ /// to easily set other UI-related options.
+ pub fn new(name: &'a str, world: &'b mut World) -> Self {

This comment has been minimized.

@jojolepro

jojolepro Mar 29, 2018

Collaborator

I think that having the text is an essential parameter here.

@jojolepro

jojolepro Mar 29, 2018

Collaborator

I think that having the text is an essential parameter here.

amethyst_ui/src/button.rs
+ );
+ let text = UiText::new(font, "".to_string(), [0.0, 0.0, 0.0, 1.0], 32.0);
+ let grey = loader.load_from_data(
+ [0.82, 0.83, 0.83, 1.0].into(),

This comment has been minimized.

@jojolepro

jojolepro Mar 29, 2018

Collaborator

Why the 0.82 and 0.83?

@jojolepro

jojolepro Mar 29, 2018

Collaborator

Why the 0.82 and 0.83?

@Hittherhod

This comment has been minimized.

Show comment
Hide comment
@Hittherhod

Hittherhod Mar 29, 2018

Contributor

Review status: 0 of 11 files reviewed at latest revision, 2 unresolved discussions, some commit checks failed.


amethyst_ui/src/button.rs, line 33 at r1 (raw file):

Previously, jojolepro (Joël Lupien) wrote…

I think that having the text is an essential parameter here.

Will do


amethyst_ui/src/button.rs, line 46 at r1 (raw file):

Previously, jojolepro (Joël Lupien) wrote…

Why the 0.82 and 0.83?

That was just a RGB color I found that is light gray


Comments from Reviewable

Contributor

Hittherhod commented Mar 29, 2018

Review status: 0 of 11 files reviewed at latest revision, 2 unresolved discussions, some commit checks failed.


amethyst_ui/src/button.rs, line 33 at r1 (raw file):

Previously, jojolepro (Joël Lupien) wrote…

I think that having the text is an essential parameter here.

Will do


amethyst_ui/src/button.rs, line 46 at r1 (raw file):

Previously, jojolepro (Joël Lupien) wrote…

Why the 0.82 and 0.83?

That was just a RGB color I found that is light gray


Comments from Reviewable

amethyst_ui/src/lib.rs
+use specs::Entity;
+/// Ui elements will define this trait to allow easier addition to other
+/// elements and to the world.
+pub trait ToEntities {

This comment has been minimized.

@jojolepro

jojolepro Mar 29, 2018

Collaborator

That's good, but I also just realized that there's the Into<Vec> trait that could be implemented directly on the components. I'm not sure which one is preferable.

@jojolepro

jojolepro Mar 29, 2018

Collaborator

That's good, but I also just realized that there's the Into<Vec> trait that could be implemented directly on the components. I'm not sure which one is preferable.

This comment has been minimized.

@Hittherhod

Hittherhod Mar 29, 2018

Contributor

I'm not sure either. I think I'm leaning more towards "ToEntities" because it feels more explicit in its usage. Into might be more flexible though, and it is standard. I'll defer that to the group.

@Hittherhod

Hittherhod Mar 29, 2018

Contributor

I'm not sure either. I think I'm leaning more towards "ToEntities" because it feels more explicit in its usage. Into might be more flexible though, and it is standard. I'll defer that to the group.

This comment has been minimized.

@torkleyy

torkleyy Mar 29, 2018

Member

Where is this even used?

@torkleyy

torkleyy Mar 29, 2018

Member

Where is this even used?

This comment has been minimized.

@Hittherhod

Hittherhod Mar 29, 2018

Contributor

It isn't used. @jojolepro said it might be nice to have a trait to deconstruct Ui elements into their constituent entities so I added it in after the initial request. In the UI example we don't do anything to the button, so this trait isn't currently used.

@Hittherhod

Hittherhod Mar 29, 2018

Contributor

It isn't used. @jojolepro said it might be nice to have a trait to deconstruct Ui elements into their constituent entities so I added it in after the initial request. In the UI example we don't do anything to the button, so this trait isn't currently used.

@torkleyy

This comment has been minimized.

Show comment
Hide comment
@torkleyy

torkleyy Mar 30, 2018

Member

@jojolepro Why exactly do you think such an ToEntities trait is useful?

Member

torkleyy commented Mar 30, 2018

@jojolepro Why exactly do you think such an ToEntities trait is useful?

@jojolepro

This comment has been minimized.

Show comment
Hide comment
@jojolepro

jojolepro Mar 30, 2018

Collaborator

When you have multiple menu and want to change between them, you need to remove the first menu before adding the second. (maybe the multiple World idea was good, after all). To easily do so, you can create all your ui inside a vec like so

fn create_ui(....) -> Vec<Entity>{
  vec![
    UiButton::new(.......).to_entities(),
    ...
  ]
}

fn change_menu(){
  for e in old_entities{
    entities.delete(e);
  }
}
Collaborator

jojolepro commented Mar 30, 2018

When you have multiple menu and want to change between them, you need to remove the first menu before adding the second. (maybe the multiple World idea was good, after all). To easily do so, you can create all your ui inside a vec like so

fn create_ui(....) -> Vec<Entity>{
  vec![
    UiButton::new(.......).to_entities(),
    ...
  ]
}

fn change_menu(){
  for e in old_entities{
    entities.delete(e);
  }
}
@torkleyy

This comment has been minimized.

Show comment
Hide comment
@torkleyy

torkleyy Mar 30, 2018

Member

If they all have one ui node as parent, wouldn't that be better?

Member

torkleyy commented Mar 30, 2018

If they all have one ui node as parent, wouldn't that be better?

@jojolepro

This comment has been minimized.

Show comment
Hide comment
@jojolepro

jojolepro Mar 30, 2018

Collaborator

Technically I think there will always be a root entity and the rest as childs, so it could return only a single entity.

Collaborator

jojolepro commented Mar 30, 2018

Technically I think there will always be a root entity and the rest as childs, so it could return only a single entity.

@Hittherhod

This comment has been minimized.

Show comment
Hide comment
@Hittherhod

Hittherhod Mar 30, 2018

Contributor

Could you walk the tree to get all the entities you want?

Contributor

Hittherhod commented Mar 30, 2018

Could you walk the tree to get all the entities you want?

@torkleyy

This comment has been minimized.

Show comment
Hide comment
@torkleyy

torkleyy Mar 30, 2018

Member

If not, that functionality should be added.

Member

torkleyy commented Mar 30, 2018

If not, that functionality should be added.

@jojolepro

This comment has been minimized.

Show comment
Hide comment
@jojolepro

jojolepro Mar 30, 2018

Collaborator

We can't really walk from parent to child without iterating over all entities.

Collaborator

jojolepro commented Mar 30, 2018

We can't really walk from parent to child without iterating over all entities.

@Hittherhod

This comment has been minimized.

Show comment
Hide comment
@Hittherhod

Hittherhod Mar 31, 2018

Contributor

Would you already know a fairly local parent (like, say, the menu) that you could use as the root of your search?

Contributor

Hittherhod commented Mar 31, 2018

Would you already know a fairly local parent (like, say, the menu) that you could use as the root of your search?

@jojolepro

This comment has been minimized.

Show comment
Hide comment
@jojolepro

jojolepro Mar 31, 2018

Collaborator

Well actually, you just made me realize we could use a "root" ui entity to delete a menu all at once.

When you delete an entity, all the childs are deleted automatically by the parent/layout system, so I would guess that by using UiButton::new(...).with_parent(root_menu) and then deleting the root_menu entity, the problem is fixed, and we don't need the ToEntities trait.

Collaborator

jojolepro commented Mar 31, 2018

Well actually, you just made me realize we could use a "root" ui entity to delete a menu all at once.

When you delete an entity, all the childs are deleted automatically by the parent/layout system, so I would guess that by using UiButton::new(...).with_parent(root_menu) and then deleting the root_menu entity, the problem is fixed, and we don't need the ToEntities trait.

@Hittherhod

This comment has been minimized.

Show comment
Hide comment
@Hittherhod

Hittherhod Mar 31, 2018

Contributor

Okay. I'll delete the ToEntities trait.

Contributor

Hittherhod commented Mar 31, 2018

Okay. I'll delete the ToEntities trait.

@torkleyy

Thank you, looks great now!

amethyst_ui/src/button.rs
+ /// Construct a new UiButtonBuilder.
+ /// This allows easy use of default values for text and button appearance and allows the user
+ /// to easily set other UI-related options.
+ pub fn new<S: ToString>(name: &'a str, text: S, world: &'b mut World) -> Self {

This comment has been minimized.

@torkleyy

torkleyy Mar 31, 2018

Member

Can we pass the World to build instead of new?

@torkleyy

torkleyy Mar 31, 2018

Member

Can we pass the World to build instead of new?

examples/ui/main.rs
+ })
+ .with_anchored(Anchored::new(Anchor::TopMiddle))
+ .with_parent(Parent {
+ entity: background.clone(),
})
.build();

This comment has been minimized.

@jojolepro

jojolepro Mar 31, 2018

Collaborator

Could you add another button showing a less heavy syntax?
e.g: UiButtonBuilder::new("btn2", "Simple Button").with_font(font.clone()).with_position(50.0,50.0).build(&mut world);

@jojolepro

jojolepro Mar 31, 2018

Collaborator

Could you add another button showing a less heavy syntax?
e.g: UiButtonBuilder::new("btn2", "Simple Button").with_font(font.clone()).with_position(50.0,50.0).build(&mut world);

@Rhuagh

Passing world to build instead of new, and adding a build method for LazyUpdate aswell as one for World would be good. And make the new() function take only the resources it needs rather than World (Loader, AssetStorage, AssetStorage)

@Rhuagh

This comment has been minimized.

Show comment
Hide comment
@Rhuagh

Rhuagh Mar 31, 2018

Member

Basically, my concern is that we should make it possible to use the builder without access to the full world (for creation from inside systems)

Member

Rhuagh commented Mar 31, 2018

Basically, my concern is that we should make it possible to use the builder without access to the full world (for creation from inside systems)

@Hittherhod

This comment has been minimized.

Show comment
Hide comment
@Hittherhod

Hittherhod Apr 2, 2018

Contributor

@Rhuagh Could you explain more about LazyUpdate? I've never seen it in use, so I'm not sure how to work with it.

Contributor

Hittherhod commented Apr 2, 2018

@Rhuagh Could you explain more about LazyUpdate? I've never seen it in use, so I'm not sure how to work with it.

@Rhuagh

This comment has been minimized.

Show comment
Hide comment
@Rhuagh

Rhuagh Apr 2, 2018

Member

There's an example

Member

Rhuagh commented Apr 2, 2018

There's an example

@Hittherhod

This comment has been minimized.

Show comment
Hide comment
@Hittherhod

Hittherhod Apr 2, 2018

Contributor

Review status: 0 of 12 files reviewed at latest revision, 4 unresolved discussions, some commit checks failed.


amethyst_ui/src/button.rs, line 33 at r4 (raw file):

Previously, torkleyy (Thomas Schaller) wrote…

Can we pass the World to build instead of new?

Done.


examples/ui/main.rs, line 203 at r4 (raw file):

Previously, jojolepro (Joël Lupien) wrote…

Could you add another button showing a less heavy syntax?
e.g: UiButtonBuilder::new("btn2", "Simple Button").with_font(font.clone()).with_position(50.0,50.0).build(&mut world);

Done.


Comments from Reviewable

Contributor

Hittherhod commented Apr 2, 2018

Review status: 0 of 12 files reviewed at latest revision, 4 unresolved discussions, some commit checks failed.


amethyst_ui/src/button.rs, line 33 at r4 (raw file):

Previously, torkleyy (Thomas Schaller) wrote…

Can we pass the World to build instead of new?

Done.


examples/ui/main.rs, line 203 at r4 (raw file):

Previously, jojolepro (Joël Lupien) wrote…

Could you add another button showing a less heavy syntax?
e.g: UiButtonBuilder::new("btn2", "Simple Button").with_font(font.clone()).with_position(50.0,50.0).build(&mut world);

Done.


Comments from Reviewable

+const DEFAULT_TXT_COLOR: [f32; 4] = [0.0, 0.0, 0.0, 1.0];
+const DEFAULT_FONT_NAME: &'static str = "font/square.ttf";
+
+/// Container that wraps the resources we need to initialize button defaults

This comment has been minimized.

@Rhuagh

Rhuagh Apr 2, 2018

Member

#[derive(SystemData)]

@Rhuagh

Rhuagh Apr 2, 2018

Member

#[derive(SystemData)]

This comment has been minimized.

@Hittherhod

Hittherhod Apr 2, 2018

Contributor

What does SystemData do?

@Hittherhod

Hittherhod Apr 2, 2018

Contributor

What does SystemData do?

This comment has been minimized.

@Rhuagh

Rhuagh Apr 3, 2018

Member

Makes it so you can use the struct directly in a system.

@Rhuagh

Rhuagh Apr 3, 2018

Member

Makes it so you can use the struct directly in a system.

amethyst_ui/Cargo.toml
@@ -27,4 +27,4 @@ shrev = "0.8.1"
specs = "0.10"
unicode-normalization = "0.1"
unicode-segmentation = "1.2"
-winit = "0.10"
+winit = "0.11"

This comment has been minimized.

@Rhuagh

Rhuagh Apr 2, 2018

Member

shred-derive = "0.3"

@Rhuagh

Rhuagh Apr 2, 2018

Member

shred-derive = "0.3"

@@ -22,17 +22,19 @@ extern crate unicode_segmentation;
extern crate winit;

This comment has been minimized.

@Rhuagh

Rhuagh Apr 2, 2018

Member

#[macro_use]
extern crate shred_derive;

@Rhuagh

Rhuagh Apr 2, 2018

Member

#[macro_use]
extern crate shred_derive;

This comment has been minimized.

@Hittherhod

Hittherhod Apr 2, 2018

Contributor

Done. I needed to add shred as well to make the compiler be quiet.

@Hittherhod

Hittherhod Apr 2, 2018

Contributor

Done. I needed to add shred as well to make the compiler be quiet.

amethyst_ui/src/button.rs
+impl <'a> UiButtonResources<'a> {
+ /// Grab the resources we need from the world.
+ pub fn from_world(world: &World) -> UiButtonResources {
+ UiButtonResources {

This comment has been minimized.

@Rhuagh

Rhuagh Apr 2, 2018

Member

Self::fetch(&world.res, 0)

@Rhuagh

Rhuagh Apr 2, 2018

Member

Self::fetch(&world.res, 0)

amethyst_ui/src/button.rs
+ }
+
+ /// Create the UiButton based on provided configuration parameters.
+ pub fn build(mut self, world: &mut World) -> UiButton {

This comment has been minimized.

@Rhuagh

Rhuagh Apr 2, 2018

Member

Make another of the "Resources" structs, that contain the storages required for creating a button (WriteStorage<'a, UiImage> etc), and make the build function take that resources struct. Make the resources struct contain Entities<'a> so you can create entities.

@Rhuagh

Rhuagh Apr 2, 2018

Member

Make another of the "Resources" structs, that contain the storages required for creating a button (WriteStorage<'a, UiImage> etc), and make the build function take that resources struct. Make the resources struct contain Entities<'a> so you can create entities.

This comment has been minimized.

@Hittherhod

Hittherhod Apr 2, 2018

Contributor

How do I create replicate the current World centric functionality with Storages and Entities? Does this new Resources struct also need to derive SystemData?

@Hittherhod

Hittherhod Apr 2, 2018

Contributor

How do I create replicate the current World centric functionality with Storages and Entities? Does this new Resources struct also need to derive SystemData?

@Hittherhod

Continuing conversation points raised by @Rhuagh

+const DEFAULT_TXT_COLOR: [f32; 4] = [0.0, 0.0, 0.0, 1.0];
+const DEFAULT_FONT_NAME: &'static str = "font/square.ttf";
+
+/// Container that wraps the resources we need to initialize button defaults

This comment has been minimized.

@Hittherhod

Hittherhod Apr 2, 2018

Contributor

What does SystemData do?

@Hittherhod

Hittherhod Apr 2, 2018

Contributor

What does SystemData do?

amethyst_ui/src/button.rs
+ }
+
+ /// Create the UiButton based on provided configuration parameters.
+ pub fn build(mut self, world: &mut World) -> UiButton {

This comment has been minimized.

@Hittherhod

Hittherhod Apr 2, 2018

Contributor

How do I create replicate the current World centric functionality with Storages and Entities? Does this new Resources struct also need to derive SystemData?

@Hittherhod

Hittherhod Apr 2, 2018

Contributor

How do I create replicate the current World centric functionality with Storages and Entities? Does this new Resources struct also need to derive SystemData?

@@ -22,17 +22,19 @@ extern crate unicode_segmentation;
extern crate winit;

This comment has been minimized.

@Hittherhod

Hittherhod Apr 2, 2018

Contributor

Done. I needed to add shred as well to make the compiler be quiet.

@Hittherhod

Hittherhod Apr 2, 2018

Contributor

Done. I needed to add shred as well to make the compiler be quiet.

@Hittherhod

This comment has been minimized.

Show comment
Hide comment
@Hittherhod

Hittherhod Apr 4, 2018

Contributor

@Rhuagh I've added changes to use the WriteStorage resources structure. How would this work with a LazyUpdate?

Contributor

Hittherhod commented Apr 4, 2018

@Rhuagh I've added changes to use the WriteStorage resources structure. How would this work with a LazyUpdate?

amethyst_ui/src/button.rs
+ /// Create the UiButton based on provided configuration parameters.
+ pub fn build_from_world(self, world: &World) -> UiButton {
+ self.build(UiButtonBuilderResources::from_world(world))
+ }
/// Lazily build the UiButton. Need to call `World::maintain` to have the values actually added.
pub fn lazy_build(mut self, res: UiButtonLazyResources) -> UiButton {

This comment has been minimized.

@Rhuagh

Rhuagh Apr 5, 2018

Member

You can remove this, it's no longer needed, and LazyUpdate might disappear soon (or atleast be redesigned since), since it has issues.

@Rhuagh

Rhuagh Apr 5, 2018

Member

You can remove this, it's no longer needed, and LazyUpdate might disappear soon (or atleast be redesigned since), since it has issues.

@Hittherhod

This comment has been minimized.

Show comment
Hide comment
@Hittherhod

Hittherhod Apr 7, 2018

Contributor

@Rhuagh Any feedback on the changes? I've removed the LazyUpdate structure. I want to add an example of having the button text update if you click on the button, but my click events aren't registering (the "you clicked on this element" isn't getting printed). @jojolepro Could this be another Mac specific issue?

Contributor

Hittherhod commented Apr 7, 2018

@Rhuagh Any feedback on the changes? I've removed the LazyUpdate structure. I want to add an example of having the button text update if you click on the button, but my click events aren't registering (the "you clicked on this element" isn't getting printed). @jojolepro Could this be another Mac specific issue?

@jojolepro

This comment has been minimized.

Show comment
Hide comment
@jojolepro

jojolepro Apr 7, 2018

Collaborator

@Hittherhod You are not adding the MouseReactive component to the button's image.
You are not reading the UiEvents either.

Collaborator

jojolepro commented Apr 7, 2018

@Hittherhod You are not adding the MouseReactive component to the button's image.
You are not reading the UiEvents either.

@Hittherhod

This comment has been minimized.

Show comment
Hide comment
@Hittherhod

Hittherhod Apr 7, 2018

Contributor

Where do I read the UiEvents? I was trying to modify the UiEventHandlerSystem in main.rs, but it's not pushed because I didn't want to add a broken commit.

Contributor

Hittherhod commented Apr 7, 2018

Where do I read the UiEvents? I was trying to modify the UiEventHandlerSystem in main.rs, but it's not pushed because I didn't want to add a broken commit.

@jojolepro

This comment has been minimized.

Show comment
Hide comment
@jojolepro

jojolepro Apr 7, 2018

Collaborator

Actually, the example is in fact reading for events :P my bad
https://github.com/jojolepro/amethyst/blob/develop/examples/ui/main.rs#L295

You are still missing MouseReactive tho

Collaborator

jojolepro commented Apr 7, 2018

Actually, the example is in fact reading for events :P my bad
https://github.com/jojolepro/amethyst/blob/develop/examples/ui/main.rs#L295

You are still missing MouseReactive tho

@Hittherhod

This comment has been minimized.

Show comment
Hide comment
@Hittherhod

Hittherhod Apr 7, 2018

Contributor

So, I added the MouseReactive and I see HoverStart and HoverStop events, but I'm not seeing click events.

Contributor

Hittherhod commented Apr 7, 2018

So, I added the MouseReactive and I see HoverStart and HoverStop events, but I'm not seeing click events.

@jojolepro

This comment has been minimized.

Show comment
Hide comment
@jojolepro

jojolepro Apr 7, 2018

Collaborator

I see the clicks
:works_on_my_pc: :)

Collaborator

jojolepro commented Apr 7, 2018

I see the clicks
:works_on_my_pc: :)

@Hittherhod

This comment has been minimized.

Show comment
Hide comment
@Hittherhod

Hittherhod Apr 7, 2018

Contributor

Okay. I'll refrain from adding that because I can't test it, but it'd be a nice to have for another PR.

Contributor

Hittherhod commented Apr 7, 2018

Okay. I'll refrain from adding that because I can't test it, but it'd be a nice to have for another PR.

@jojolepro

This comment has been minimized.

Show comment
Hide comment
@jojolepro

jojolepro Apr 7, 2018

Collaborator

image
Do you mind screenshotting yours?

Collaborator

jojolepro commented Apr 7, 2018

image
Do you mind screenshotting yours?

@Hittherhod

This comment has been minimized.

Show comment
Hide comment
@Hittherhod

Hittherhod Apr 7, 2018

Contributor

screen shot 2018-04-07 at 12 22 24 pm

Nevermind. I get Click events, but it's only in a specific section. I think it's probably something to do with the Retina display.

Contributor

Hittherhod commented Apr 7, 2018

screen shot 2018-04-07 at 12 22 24 pm

Nevermind. I get Click events, but it's only in a specific section. I think it's probably something to do with the Retina display.

@Rhuagh

This comment has been minimized.

Show comment
Hide comment
@Rhuagh

Rhuagh Apr 8, 2018

Member

We're waiting for a bugfix in winit that triggers the retina bugs.

Member

Rhuagh commented Apr 8, 2018

We're waiting for a bugfix in winit that triggers the retina bugs.

@Rhuagh

Rhuagh approved these changes Apr 10, 2018

@Rhuagh

This comment has been minimized.

Show comment
Hide comment
@Rhuagh

Rhuagh Apr 10, 2018

Member

Theres a compile issue in amethyst_input/src/local_virtual_key_code.rs:157:5, Caret is defined twice, which cause compilation to fail.

Member

Rhuagh commented Apr 10, 2018

Theres a compile issue in amethyst_input/src/local_virtual_key_code.rs:157:5, Caret is defined twice, which cause compilation to fail.

@Hittherhod

This comment has been minimized.

Show comment
Hide comment
@Hittherhod

Hittherhod Apr 10, 2018

Contributor

@Rhuagh Fixed it. Something weird happened with rebasing on upstream and Caret was defined at the end of the KeyCodes section as well as in the correct alphabetical ordering. I tried to keep things current throughout the pull request, but I think next time I'll just do a final one at the end.

Contributor

Hittherhod commented Apr 10, 2018

@Rhuagh Fixed it. Something weird happened with rebasing on upstream and Caret was defined at the end of the KeyCodes section as well as in the correct alphabetical ordering. I tried to keep things current throughout the pull request, but I think next time I'll just do a final one at the end.

@torkleyy

This comment has been minimized.

Show comment
Hide comment
@torkleyy

torkleyy Apr 10, 2018

Member

Doesn't seem to be fixed really. Could you also try to clean up the commit history?

Member

torkleyy commented Apr 10, 2018

Doesn't seem to be fixed really. Could you also try to clean up the commit history?

@torkleyy

This comment has been minimized.

Show comment
Hide comment
@torkleyy

torkleyy Apr 10, 2018

Member

Ah the build is just failing because of Travis.

Member

torkleyy commented Apr 10, 2018

Ah the build is just failing because of Travis.

@Hittherhod

This comment has been minimized.

Show comment
Hide comment
@Hittherhod

Hittherhod Apr 10, 2018

Contributor
Contributor

Hittherhod commented Apr 10, 2018

Sam Rhody and others added some commits Mar 6, 2018

Sam Rhody
UiButtonBuilder now accepts a World at `build()` time.
It accepts the resources it needs via creation of UiButtonResources wrapper structure,
which frees the user from needing to know what resources the button uses and makes
future changes easier. This takes the world immutably, so you need to restrict the
borrows lifetime.
Sam Rhody
@Hittherhod

This comment has been minimized.

Show comment
Hide comment
@Hittherhod

Hittherhod Apr 11, 2018

Contributor

@Rhuagh I tried to clean it up so that it only reports the significant updates rather than every little change.

Contributor

Hittherhod commented Apr 11, 2018

@Rhuagh I tried to clean it up so that it only reports the significant updates rather than every little change.

+
+/// Container for all the resources the builder needs to make a new UiButton.
+#[derive(SystemData)]
+struct UiButtonBuilderResources<'a> {

This comment has been minimized.

@jojolepro

jojolepro Apr 11, 2018

Collaborator

Resources is a confusing name, could you use something like "parameters"?

@jojolepro

jojolepro Apr 11, 2018

Collaborator

Resources is a confusing name, could you use something like "parameters"?

This comment has been minimized.

@jojolepro

jojolepro Apr 11, 2018

Collaborator

I do not know how to remove a message from my phone, ignore this.

@jojolepro

jojolepro Apr 11, 2018

Collaborator

I do not know how to remove a message from my phone, ignore this.

@jojolepro

This comment has been minimized.

Show comment
Hide comment
@jojolepro

jojolepro Apr 11, 2018

Collaborator

Looks good to me :)

Collaborator

jojolepro commented Apr 11, 2018

Looks good to me :)

@Hittherhod

This comment has been minimized.

Show comment
Hide comment
@Hittherhod

Hittherhod Apr 13, 2018

Contributor

Is there some way to make this merge?

Contributor

Hittherhod commented Apr 13, 2018

Is there some way to make this merge?

@Xaeroxe

This comment has been minimized.

Show comment
Hide comment
@Xaeroxe

Xaeroxe Apr 13, 2018

Member

@jojolepro @Rhuagh @torkleyy Since you've all marked this as approved can one of you 3 r+ this? I'm hesitant to do so myself as I haven't reviewed it yet but if there are any pending change requests can we change the review status to reflect that?

Member

Xaeroxe commented Apr 13, 2018

@jojolepro @Rhuagh @torkleyy Since you've all marked this as approved can one of you 3 r+ this? I'm hesitant to do so myself as I haven't reviewed it yet but if there are any pending change requests can we change the review status to reflect that?

@Rhuagh

This comment has been minimized.

Show comment
Hide comment
@Rhuagh

Rhuagh Apr 13, 2018

Member

bors r=torkleyy,Rhuagh

Member

Rhuagh commented Apr 13, 2018

bors r=torkleyy,Rhuagh

@bors

This comment has been minimized.

Show comment
Hide comment
@bors

bors bot Apr 13, 2018

Contributor

👎 Rejected by label

Contributor

bors bot commented Apr 13, 2018

👎 Rejected by label

@Rhuagh

This comment has been minimized.

Show comment
Hide comment
@Rhuagh

Rhuagh Apr 13, 2018

Member

bors r=torkleyy,Rhuagh

Member

Rhuagh commented Apr 13, 2018

bors r=torkleyy,Rhuagh

bors bot added a commit that referenced this pull request Apr 13, 2018

Merge #613
613: Add UiButton and UiButtonBuilder r=torkleyy,Rhuagh a=Hittherhod

It's not showing up properly on my Mac, but I'd like to get a chance to iterate over the API and defaults.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/amethyst/amethyst/613)
<!-- Reviewable:end -->


Co-authored-by: Sam Rhody <samuel.rhody@jhuapl.edu>
Co-authored-by: Sam Rhody <srhody92@gmail.com>
@bors

This comment has been minimized.

Show comment
Hide comment

@bors bors bot merged commit 8a7e9b9 into amethyst:develop Apr 13, 2018

3 of 4 checks passed

code-review/reviewable 8 files, 11 discussions left (Hittherhod, jojolepro, Rhuagh, torkleyy)
Details
bors Build succeeded
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@jojolepro

This comment has been minimized.

Show comment
Hide comment
@jojolepro

jojolepro Apr 13, 2018

Collaborator

Congratz!

Collaborator

jojolepro commented Apr 13, 2018

Congratz!

@Hittherhod Hittherhod referenced this pull request Apr 15, 2018

Closed

Add buttons to UI #577

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