something the next ags could include (if it hasn't; i cant find it)

Started by Dan2552, Wed 07/01/2004 17:11:16

Previous topic - Next topic

Dan2552

a "guihideobject" , this would be very useful and would save me from making an identical GUI with a few less buttons.

ags is the best game maker ever, i hope this is a good suggestion to help it get even more better!

Darth Mandarb

Do you mean a way to show or not show certain buttons that are already on the GUI?

Like a GUI that has a button to perform an action, but if that action isn't available the button doesn't show up on the GUI at that time?

I was a little confused by your request :)

])]V[

Dan2552

Quote from: Darth Mandarb on Wed 07/01/2004 17:34:03
Do you mean a way to show or not show certain buttons that are already on the GUI?

Like a GUI that has a button to perform an action, but if that action isn't available the button doesn't show up on the GUI at that time?

I was a little confused by your request :)

])]V[

yes, but as i edited- buttons and other objects

I'm using the Tcp/ip plugin and i want some "multiplayer buttons" and a "chat(text box)", but i want them to go-away/hide on single player

Dorcan

You could hide the button by replacing its graphic with a transparent sprite. Use the SetButtonPic function, and disable the interaction in the gui script.

And for the textbox, maybe moving it out of the gui surface with the SetGUIObjectPosition function could work.

Dan2552


scotch

Yes, in my gui I hide and show buttons by moving them outside the area of the GUI, they are hidden then.  You can use SetGUIObjectPosition (GUI, int object, int x, int y) to move them away and back.  You'd have to store the original position to move it back though and there is no GetGUIObjectPosition function.
It can be quite messy.. I think being able to turn on and off gui objects would be a useful feature request.

Dan2552

Quote from: scotch on Wed 07/01/2004 18:44:45
Well in my gui I hide and show buttons by moving them outside the area of the GUI, they are hidden then.  You can use SetGUIObjectPosition (GUI, int object, int x, int y) to move them.  You'd have to store the original position to move it back though and there is no GetGUIObjectPosition function, you'll have to work out some way of doing that. (Not an issue in mine since the active buttons are automatically arranged in a circle)

that's what im TRYING to use... its not effecting it though... i'll go over it again to check why its wrong




edit---
 if (interface == DAN) {
    if (multigui == 1) {
      SetGUIObjectPosition (DAN, 6, 100, 100);
      SetGUIObjectPosition (DAN, 5, 101, 100);
      SetGUIObjectPosition (DAN, 7, 102, 100);
   }
}

whats wrong with it!??
multigui is defiently 1

a-v-o

as you can have transparent GUIs you can put the "switchable stuff" on a transparent GUI which is over the normal GUI.

Ishmael

Place the code to the same place where you turn the GUI on... this way those actions get run right away, preferably before the GUI turns on. In the interface_click function they get run when a GUI button or slider is clicked (AFAIK). If you are using the
'interface' integer outside of interface_click, it will not work the same way.
I used to make games but then I took an IRC in the knee.

<Calin> Ishmael looks awesome all the time
\( Ö)/ ¬(Ö ) | Ja minähän en keskellä kirkasta päivää lähden minnekään juoksentelemaan ilman housuja.

Pumaman

GUIObjectOff and GUIObjectOn sound like good suggestions to me, I'll add them to my list.

SMF spam blocked by CleanTalk