Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Functions that serves as a conditional button that responds to a specific case, changing color, action, and even
- // icon, usage: /guicondbutton (case) "text 1" "text 0" "default text" [action 1] [action 0] (icon 1) (icon 0)
- // You may use 1 for either action 0 or icon 0 if you do not want to provide a different command set.
- guicondbutton = [
- guibutton (concatword (? $arg1 $arg2 $arg3) $arg4) (
- ? $arg1 $arg5 (? (= $arg6 1) $arg5 $arg6)
- ) (? $arg1 $arg7 (? (= $arg8 1) $arg7 $arg8))
- ]
- _swl_vetomaps = ["neondevastation douze neondevastation" "complex arbana mbt12" "capture_night secondevermap authentic" "firstevermap twinforts eternal_valley"]
- _swl_pickmaps = []
- _swl_teams = [good evil spam haxx]
- _swl_cur = 1
- newgui "swlmappick" [
- guistayopen [
- guilist [
- loop l (listlen $_swl_teams) [
- guispring
- guilist [
- guistrut 4 1
- guititle (format "^f7%2%1" (at $_swl_teams $l) (? (= $l $_swl_cur) "^f2"))
- ]
- guispring
- if (< $l (- (listlen $_swl_teams) 1)) guibar
- ]
- ]
- guibar
- guistrut 0.5
- looplist i $_swl_vetomaps [
- guilist [
- guistrut 0.5
- loop p (listlen $i) [
- guilist [
- guistrut 12.8 1 // minimum for monospace font
- push p (at $i $p) [
- guicondbutton (> (indexof $_swl_pickmaps $p) -1) "^f4" "" $p [] [
- //SWL_SENDINFO "vetomap" @p
- append _swl_pickmaps @p // placeholder until the above is implemented
- ] 0 0
- ]
- ]
- if (< $p 2) guibar [ guistrut 0.5 ]
- ]
- ]
- ]
- ]
- ] 0 // another arg after here will specify stuff to execute whenever the GUI is opened (does not work when reopened while already open)
Advertisement
Add Comment
Please, Sign In to add comment