MagicalLife icon indicating copy to clipboard operation
MagicalLife copied to clipboard

Job Selection Tools

Open TBye101 opened this issue 6 years ago • 9 comments

Clicking on one command type doesn't unselected the others

TBye101 avatar Jan 13 '19 17:01 TBye101

For what I can see this behaviour isn't implement at all. So this is not a bug to find and fix but a feature to implement, right?

ABuonanni avatar Apr 09 '19 20:04 ABuonanni

Yeah, not sure why I marked this as a bug. Must've been late or something.

TBye101 avatar Apr 09 '19 21:04 TBye101

I'm looking at this issued and I was thinking that action buttons (Chop, Mine and TillDirt) should have a public boolean property called like "IsSelected" or "HasSelectedAspect" that the InGameGUI can use to set its buttons appeareance. The property setter code will choose the right texture for the button based on the value of InGameGUI's Selected property. Now this behaviour should be applied to all three buttons and I were wondering wheter was the case to create a new class (called something like ActionButton, to hold all common action buttons behaviour) to implements this in or to implement it in the MonoButton class (but I don't like this second option as much as the first). What do you say?

ABuonanni avatar Apr 14 '19 14:04 ABuonanni

I like the first option, as not all buttons are toggle on/toggle off. However, I would ask you to consider making a class that extends MonoButton that implements that behavior. Then make some sort of manager class that handles only having one togglable button active at a time. What do you think of that?

Thomas


From: ABuonanni [email protected] Sent: Sunday, April 14, 2019 9:09:43 AM To: SneakyTactician/MagicalLife Cc: Thomas Bye; Author Subject: Re: [SneakyTactician/MagicalLife] Job Selection Tools (#110)

I'm looking at this issued and I was thinking that action buttons (Chop, Mine and TillDirt) should have a public boolean property called like "IsSelected" or "HasSelectedAspect" that the InGameGUI can use to set its buttons appeareance. The property setter code will choose the right texture for the button based on the value of InGameGUI's Selected property. Now this behaviour should be applied to all three buttons and I were wondering wheter was the case to create a new class (called something like ActionButton, to hold all common action buttons behaviour) to implements this in or to implement it in the MonoButton class (but I don't like this second option as much as the first). What do you say?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/SneakyTactician/MagicalLife/issues/110#issuecomment-482984157, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AQ16c3dfkVWltPRFZpp7fGOqPSGBNeNdks5vgzangaJpZM4Z9Sfo.

TBye101 avatar Apr 14 '19 16:04 TBye101

I like the idea. I'm gonna implement a class that extends MonoButton and a class, let say "ActionButtonsManager", that handles only having one togglable button active at a time.

ABuonanni avatar Apr 15 '19 06:04 ABuonanni

I'd recommend branching from the "crafting branch" for this, as I've moved around the GUI API to it's own assembly in that branch.

Thomas


From: ABuonanni [email protected] Sent: Monday, April 15, 2019 1:23:37 AM To: SneakyTactician/MagicalLife Cc: Thomas Bye; Author Subject: Re: [SneakyTactician/MagicalLife] Job Selection Tools (#110)

I like the idea. I'm gonna implement a class that extends MonoButton and a class, let say "ActionButtonsManager", that handles only having one togglable button active at a time.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/SneakyTactician/MagicalLife/issues/110#issuecomment-483122788, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AQ16c-ZUhDT4tOi4jVlWveGSEoXPp_84ks5vhBrpgaJpZM4Z9Sfo.

TBye101 avatar Apr 15 '19 13:04 TBye101

Ok, I'll do. Thanks.

ABuonanni avatar Apr 16 '19 06:04 ABuonanni

I'm resuming working on this issue. Is still Crafting the branch to work on? Thanks.

ABuonanni avatar May 23 '19 06:05 ABuonanni

No, it got merged into master. I recommend working off of master.

Thomas


From: ABuonanni [email protected] Sent: Thursday, May 23, 2019 1:25:08 AM To: SneakyTactician/MagicalLife Cc: Thomas Bye; Author Subject: Re: [SneakyTactician/MagicalLife] Job Selection Tools (#110)

I'm resuming working on this issue. Is still Crafting the branch to work on? Thanks.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/SneakyTactician/MagicalLife/issues/110?email_source=notifications&email_token=AEGXU4Y24QRKFR6CL4XKRLLPWY2EJA5CNFSM4GPVE7UKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODWBGGWY#issuecomment-495084379, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AEGXU4ZGDVM2OVVKROGB4NTPWY2EJANCNFSM4GPVE7UA.

TBye101 avatar May 23 '19 11:05 TBye101