Advertisement
RaZgRiZ

new MM menu

Nov 28th, 2020 (edited)
869
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.39 KB | None | 0 0
  1.  
  2. // moves a gui item to any position
  3. // i.e. guiitemmove 0 -5 -15 [ guititle "Hi" ]
  4. guiitemmove = [
  5.     guialign $arg1 [
  6.         guistrut $arg2
  7.         guilist [
  8.             guistrut $arg3
  9.             arg4
  10.         ]
  11.     ]
  12. ]
  13.  
  14. newgui mapmodels [
  15.     local Xn Yn XYn mmid
  16.  
  17.     Xn   = 7
  18.     Yn   = 4
  19.     XYn  = (* $Xn $Yn)
  20.  
  21.     guikeeptab 1
  22.     guinoautotab [
  23.         loop "n" (ceil (divf $nummapmodels $XYn)) [
  24.             if $n [ guitab (+ $n 1) ]
  25.             if (= $guitabnum (+ $n 1)) [
  26.                 loop "y" $Yn [
  27.                     guilist [
  28.                         loop "x" $Xn [
  29.                             mmid = (+ (* $XYn $n) (+ (* $y $Xn) $x))
  30.                             if (< $mmid $nummapmodels) [
  31.                                 guiimage "<mad:.1/.1/.1>packages/textures/razgriz/white.png" $mmid 3 0
  32.                                 guiitemmove -1 0.0 -12.0 [ guimodelpreview (mapmodelname $mmid) "mapmodel" [ newent mapmodel @mmid ] 3 0 0 1 ]
  33.                                 guiitemmove -1 0.2 -11.3 [ guititle (concatword (? (= $guirolloverimgaction $mmid) "^f2" "^f4") $mmid) ]
  34.                             ] [ guistrut 12 ; guistrut 6 1 ]
  35.                         ]
  36.                     ]
  37.                 ]
  38.                 guistrut 0.2
  39.                 guititle (concatword "^f7" (strreplace $guirolloverpreviewname "/" "^f2/^f7"))
  40.             ]
  41.         ]
  42.     ]
  43. ]
  44.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement