Today I was wondering if it was possible to add some sort of search box to the in-game UI. I don't know much about trigger etc. , but I looked into some effects and it seemed that they could hold vars between % tags. So I came up with this today:.
Anyway, is this a dead end (I know it would work with a dropdown box, but I'm trying to make this as random as possible - so people can input "ulfsark" as well as "abstractVillager"), or can it somehow be modified that it does work?
<gadget name="FindIdleUnitType" type="dialog" size1024="12 147 592 187" background="ui\background greek opaque" texturereplace="" tilebackground="" closebutton="" bevel="" closebuttonusealpha="" windowzstyle="" closeonesc="" dontautoclose="">
<gadget name="IdleUnitInput" type="editBox" enterkey="" grabinput="" textfont="ChatInput" textfontsize="12" textcolor="255 255 255" size1024="15 152 461 182" enableime="" editboxmaxchars="100"></gadget>
<gadget name="IdleUnitSend" size1024="466 152 562 184" type="stateButton" texturecoords="0 0 .75 1" textfont="InGameButtons" textfontsize="18" textcolor="255 0 0" statebuttonuseinternalstates="">Find
<command>uiFindIdleType("%IdleUnitInput%")</command>
<stateentry background="ui\ui button long 96x32"></stateentry>
<stateentry background="ui\ui button long 96x32 clicked"></stateentry>
<stateentry background="ui\ui button long 96x32 rollover"></stateentry>
<stateentry background=""></stateentry>
</gadget>
</gadget>
It's based on the chat gadget, and I was hoping the grabinput="" tag would somehow tranfer my variable to the command, but it doesn't seem to work Anyway, is this a dead end (I know it would work with a dropdown box, but I'm trying to make this as random as possible - so people can input "ulfsark" as well as "abstractVillager"), or can it somehow be modified that it does work?