Right now I'm implementing a system that if a button is set to non-clickable and you try to click it, the current mouse cursor graphic gets an "x" overlayed on top.
I have to manually set a butt-load of certain buttons Clickable = false...is there a way to query if a button's "ClickAction" has the value "NoAction" set in the editor? Would save me some time! :=
Something like (pseudo-code):
oCg = GUIControl.GetAtScreenXY(mouse.x, mouse.y);
if (!oCg.HasAction) ShowXClickOverlay();
Hi,
no one else has replied.
What if you 'if' query Button(s) to test if it is clickable true/false?
Have not tried but maybe AGS will recognize this.
What exactly are you trying to do? Are these actual buttons that are disabled in certain circumstances?
Did you look into the differences between .Enabled and .Clickable?
Also, I don't think it's possible to read the editor setting of what the button does.
Yeah I can set and check enabled and clickable no probs, its just that I would rather not have to initially set those buttons disabled one by one at game_start. Im re-using the same "base" graphic for multiple GUIs where only some areas are different (I just change certain button graphics to make the overall GUI different for each one). Those "buttons" will never have any actions, ever.
I just thought I could save scripting time if I could access the editor properties on various objects/controls. If its not possible, maybe in another ags version we could access all editor properties via script?