Skip to content
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

Merged
merged 3 commits into from Apr 13, 2015
Merged

Generic Action\Action Button System #8728

merged 3 commits into from Apr 13, 2015

Conversation

AnturK
Copy link
Member

@AnturK AnturK commented Apr 3, 2015

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

dd
im
space station 13 2015-04-05 180539
space station 13 2015-04-05 180626
space station 13 2015-04-05 180837
space station 13 2015-04-10 223423
space station 13 2015-04-10 222753

@optimumtact
Copy link
Member

Nice art 😄

Good work though

@optimumtact
Copy link
Member

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

@AnturK
Copy link
Member Author

AnturK commented Apr 3, 2015

That's how i wanted to make current ones work but got lazy, probably doable will try tommorow. Grouped buttons is nice idea.

@AnturK
Copy link
Member Author

AnturK commented Apr 3, 2015

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

@RemieRichards
Copy link
Contributor

0/10 not as cool as VG's unless it uses my movable UI system.

@AnturK
Copy link
Member Author

AnturK commented Apr 3, 2015

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...

@AnturK AnturK closed this Apr 3, 2015
@AnturK AnturK reopened this Apr 3, 2015
@MrPerson
Copy link
Contributor

MrPerson commented Apr 3, 2015

Extensions can be done later.

Coderart is best art.

if(!Checks())
world << "[src] Checks Failed"
return
world << "[src] Passed Checks"
Copy link
Contributor

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

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[WIP]

@Jordie0608 Jordie0608 added UI Do Not Merge You must have really upset someone Feature Exposes new bugs in interesting ways labels Apr 4, 2015
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]"
Copy link
Contributor

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.

Copy link
Member Author

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

@MrPerson
Copy link
Contributor

MrPerson commented Apr 4, 2015

If I were doing this, I'd wind up making it way more complicated than this for absolutely no reason. Good stuff 👍

@Fox-McCloud
Copy link
Contributor

👍

Hugely cuts down on clutter if you have lots of items that have buttons, but aren't using any of them.

@RemieRichards
Copy link
Contributor

The movable elements would probably be nicer as /movable/snap, up to you.

@AnturK
Copy link
Member Author

AnturK commented Apr 5, 2015

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.

@AnturK
Copy link
Member Author

AnturK commented Apr 11, 2015

image
image
image
image

Current look for the backgrounds and show button

@AnturK
Copy link
Member Author

AnturK commented Apr 11, 2015

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.

@AnturK AnturK changed the title Generic Action\Action Button System [WIP] Generic Action\Action Button System Apr 11, 2015
@phil235 phil235 removed the Do Not Merge You must have really upset someone label Apr 11, 2015
Jordie0608 added a commit that referenced this pull request Apr 13, 2015
Generic Action\Action Button System
@Jordie0608 Jordie0608 merged commit ae120db into tgstation:master Apr 13, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Exposes new bugs in interesting ways
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants