Aller au contenu

Photo

UIButton_Input_ScreenClose not working?


  • Veuillez vous connecter pour répondre
4 réponses à ce sujet

#1
Ashw3

Ashw3
  • Members
  • 16 messages
Hey guys.

I am trying to get a custom made gui screen to close on command. I will give an example.

Gui object filename: hotkey_s_glow.xml
Gui object name: HOTKEY_S_GLOW

The command im using is OnAdd0=UIButton_Input_ScreenClose("HOTKEY_S_GLOW")

The screen is listed in ingameguix2.xml under mandatory gui as HOTKEY_S_GLOW="hotkey_s_glow.xml"

I have tried with the ingameguix2.xml inside the UI folder and the override folder, name both ingamegui.ini and ingameguix2.ini, and I can't get this screen to close once opened.

What is the undocumented trick to get this to work?

Thanks

#2
kevL

kevL
  • Members
  • 4 075 messages
figure it yet?

<!-- Close Button -->
<UIButton name="CloseButton" x="354" y="6" style="STYLE_CLOSE_BUTTON" OnLeftClick='UIButton_Input_ScreenClose()' />


edit, ah you want an auto-close ?

Modifié par kevL, 11 mai 2012 - 06:41 .


#3
Ashw3

Ashw3
  • Members
  • 16 messages
Close on script command, or from another ui object when it is opened.

#4
kevL

kevL
  • Members
  • 4 075 messages

Ashw3 wrote...

Close on script command,

//This function will close a specific GUI panel on the client.
//The panel must be located within the [ScriptGUI] section of the ingamegui.ini
//in order to let this script close it.
void CloseGUIScreen( object oPlayer, string sScreenName );

or from another ui object when it is opened.

no gui guru here, but I'd play around with UIObject_Misc_ExecuteServerScript() -- calling above scriptfunction -- as OnAdd/OnUpdate/bleh idk


ps. no need for [ScriptGUI] section of ingamegui, [MandatoryGUI] works fine ...

#5
Lance Botelle

Lance Botelle
  • Members
  • 1 480 messages
Hi Ashw3,

As KevL says in his last post, the commands he mentions are all you need. You have the CloseGUIScreen from the scripting side, and the OnLeftClick=UIButton_Input_ScreenClose() from within the XML code. It all depends where and how you are trying to code the particular close bit from?

If you want some more help, my manual may help a little:

http://nwvault.ign.c...ls.Detail&id=92

Cheers!

Lance.

Modifié par Lance Botelle, 18 mai 2012 - 10:30 .