HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Hehe "GUI Structs"

04-29-2009, 01:48 PM#1
Fledermaus
Well, kinda :p

Trigger:
GUI Rules
Events
Conditions
Collapse Actions
Custom script: endfunction
Custom script: struct guiStruct
Custom script: //struct stuff in here
Custom script: endstruct
Custom script: function empty takes nothing returns nothing

Collapse JASS:
function Trig_GUI_Rules_Actions takes nothing returns nothing
    endfunction
    struct guiStruct
    //struct stuff in here
    endstruct
    function empty takes nothing returns nothing
endfunction

//===========================================================================
function InitTrig_GUI_Rules takes nothing returns nothing
    set gg_trg_GUI_Rules = CreateTrigger(  )
    call TriggerAddAction( gg_trg_GUI_Rules, function Trig_GUI_Rules_Actions )
endfunction

I just thought it was cute. A complete abomination but cute none the less :p
04-29-2009, 01:51 PM#2
Veev
Who would have thought you could use Custom Script to do this?!
04-29-2009, 01:52 PM#3
Opossum
Awesome discovery by awesome Fled...
I doubt people will thank you for that though. You got my +rep anyway.
04-29-2009, 01:52 PM#4
DioD
You cant map structs with gui.
04-29-2009, 01:56 PM#5
Seshiro
Wow, maybe you will earn the Nobel-Price!

Thats normal, because cs equal jass one liners!
04-29-2009, 02:00 PM#6
Fledermaus
I know that this is what CustomScript does (notice I posted the conversion to jass), it just made me laugh so I though I'd make some other people laugh too.
04-29-2009, 02:12 PM#7
Anitarf
If it's just for the laughs you should have posted in off-topic.
04-29-2009, 02:28 PM#8
moyack
sigh....
04-29-2009, 07:10 PM#9
Kyrbi0
So what's a struct?
04-29-2009, 08:22 PM#10
Alevice
SOMETHING YOU SEE ON VJASS
04-29-2009, 08:29 PM#11
Kyrbi0
I have no time for your insulin.
04-29-2009, 10:13 PM#12
Bobo_The_Kodo
So?
04-30-2009, 04:20 PM#13
Troll-Brain
Quote:
Originally Posted by Bobo_The_Kodo
So?
I'm waiting for a textmacro in gui :p
04-30-2009, 04:26 PM#14
Alevice
Just as a proof of conepct, it would be interesting to give the option via GUI (and not custom script) to define structs. Something like

Start definition new Struct of name '(Your strutcname)'
Add to (Defined Structure) a filed of type "integer" named "(My field name)"
End Structure definition

Create new struct of type '(Your Structname)'
Set my structinstance to (Last Created Struct).
04-30-2009, 06:25 PM#15
cosmicat
The GUI interface would need to be altered so that struct declaration wouldn't disrupt the thread (or something), since a lot of GUIers these days rely on the localized global bug. If that's being done, the interface might as well also be set up to inline most of the GUI function calls.