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
Generic Action\Action Button System #8728
Conversation
Nice art 😄 Good work though |
This might be a little out of scope, but how easy would it be to make an action button that spawns another group of action buttons? So you can hide/show buttons |
That's how i wanted to make current ones work but got lazy, probably doable will try tommorow. Grouped buttons is nice idea. |
Yes but you need to add the additional ones manually instead of using the default vars and checks are flag based so i'd just need to add flag for items deep inside things |
0/10 not as cool as VG's unless it uses my movable UI system. |
Visual themes were next thing on my list but that complaining in the other pr made me put this up. Why is close and comment default... |
Extensions can be done later. Coderart is best art. |
if(!Checks()) | ||
world << "[src] Checks Failed" | ||
return | ||
world << "[src] Passed Checks" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You left some world << "stuff" in there. NBD just get rid of them
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[WIP]
var/coord_col_offset = 4+2*col | ||
var/coord_row = "[-1 - row]" | ||
var/coord_row_offset = 26 | ||
return "WEST[coord_col]:[coord_col_offset],NORTH[coord_row]:[coord_row_offset]" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can just do WEST:33 in place of WEST+1:1. Additionally, WEST+0 is valid so coord_col could just be "+[col-1]"
Instead of messing with screen_loc, you could edit the buttons' transform vars to offset them all into place. Of course then you have to work with matrices, but that's not so bad tbh.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did that then found out screen loc and transform are not actually exclusive. Oh well
If I were doing this, I'd wind up making it way more complicated than this for absolutely no reason. Good stuff 👍 |
👍 Hugely cuts down on clutter if you have lots of items that have buttons, but aren't using any of them. |
The movable elements would probably be nicer as /movable/snap, up to you. |
Blarg. Started working on turning alien abilities into proc_holders but then realized that might be bit out of scope for one PR so i'll leave that for later. |
This is merge ready, not counting better button icons. I'd do the changeling abilities buttons but i'm starting to question my assumption that ugly buttons are better than none. |
Generic Action\Action Button System
Adds Generic Button and Action System
/datum/action - instantiated once per action allowed then assigned to mobs using Grant()
/obj/screen/movable/action_button - generic button with modifiable icon/background, now movable if you're into that.
Currently supports:
Item Actions
Spells
Works for all mob/living
TODO:
Actual Sprites / not eyesore colors
Helpers for adding generic actions