Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // DO NOT TOUCH:
- uiscrollsteptime
- uislidersteptime
- uisensitivity
- uitextrows
- uislotviewtime
- // ^^^^^^^^^^^^^
- // NOTES:
- // Y stands for relative height
- // X stands for relative width
- // E stands for relative padding
- // S stands for relative character size
- // their scale is 1 = 1024px for ui children sizes, for anything else 1 is default size
- // any letters not described here are explained in the individual comments
- // create a new UI, self explanatory
- newui "STRING" [ children ] [ on-show ] [ on-hide ] 0/1(ALLOW INPUT)
- // other self explanatory commands
- showui "STRING" // show the ui, duh
- hideui "STRING" // now hide it, why do i have to explain?
- toggleui "STRING" // if open, hide it and vice-verca
- holdui "STRING" // will stay open as long as key is held
- // draws a simple colored line
- uiline 0xAARRGGBB [ children ]
- // draws a colored outline with dimensions X and Y
- uioutline 0xAARRGGBB X Y [ children ]
- // draws a colored rectangle with dimensions X and Y
- uicolor 0xAARRGGBB X Y [ children ]
- uimodcolor 0xAARRGGBB X Y [ children ] // modulated
- // draws a gradient colored rectangle with dimensions X and Y
- uihgradient 0xAARRGGBB 0xAARRGGBB X Y [ children ] // horizontal
- uivgradient 0xAARRGGBB 0xAARRGGBB X Y [ children ] // vertical
- uimodhgradient 0xAARRGGBB 0xAARRGGBB X Y [ children ] // horizontal, modulated
- uimodvgradient 0xAARRGGBB 0xAARRGGBB X Y [ children ] // vertical, modulated
- // changes the orientation of UI children within, applying padding of size E between them
- uihlist E [ children ] // horizontal
- uivlist E [ children ] // vertical
- uilist E [ children ] // alternates between h/v according to parent
- // defines an area as a table and applies X and Y padding between its children
- uitable X Y [ children ]
- // defines an area as a table row, where the column children are treated as items of the table
- // and the background children span the entire row. the headers cannot be targeted by ui states
- // and the rows cannot be inside any other ui elements besides their table.
- uitableheader [ column children ] [ background children ]
- uitablerow [ column children ] [ background children ]
- // formats all direct children into a grid, with C amount of columns and X and Y padding applied between them
- uigrid C X Y [ children ]
- // defines a space where all direct children are grouped on the same spot
- uigroup [ children ]
- // creates a space with dimensions X and Y around its UI children
- uispace X Y [ children ]
- // creates a space with dimensions X and Y where it places its UI children
- uifill X Y [ children ]
- // same as uifill, except it can be targeted by color and input
- uitarget X Y [ children ]
- // defines a space with dimensions X and Y where everything inside will be clipped off it exceeds the boundaries
- uiclip X Y [ children ]
- // offsets its children by size X and Y from their center (groups them if more than one)
- uioffset X Y [ children ]
- // creates a text editor with the name #1, with character amount L and R rows, text size S
- // and initialisation text #2, WARNING: UNKNOWN ARGUMENT DETECTED! EXTERMINATE!
- uitexteditor "STRING #1" L R S "STRING #2" ? [ children ]
- // creates text string with size S (default 1)
- uitext "STRING" S [ children ]
- uicolortext "STRING" 0xAARRGGBB S [ children ] // allows color
- // creates text string with size S which wraps if length beyond size X
- uiwraptext "STRING" X S [ children ]
- uiwrapcolortext "STRING" X 0xAARRGGBB S [ children ] // allows color
- // creates a (key)field with name VAR, string length L and character size S
- uifield "VAR" L [ on-change ] S [ children ]
- uikeyfield "VAR" L [ on-change ] S [ children ]
- // creates a rectangle of dimensions X and Y with the texture matching index I
- uislotview I X Y [ children ]
- uivslotview I X Y [ children ]
- // creates a rectangle of dimensions X and Y with an image inside
- uiimage "path/goes/here.png" X Y [ children ]
- // creates a rectangle of dimensions X and Y with an image that stretches to fit the size of
- // children, stretching the image at the middle in a cross-like fashion to fit.
- uistretchedimage "path/goes/here.png" X Y [ children ]
- // creates a rectangle of dimensions X and Y with an image tiled along the surface, sized W and H
- uitiledimage "path/goes/here.png" W H X Y [ children ]
- // creates a rectangle of dimensions X and Y with an image portion cropped between the points C* (0.0 to 1.0)
- uicroppedimage "path/goes/here.png" X Y Cx-start Cy-start Cx-end Cy-end [ children ]
- // creates a rectangle of sorts and does stuff. this thing sucks, don't use it.
- // T is texture size, B is for extension size around children (shit's broken yo)
- uiborderedimage "path/goes/here.png" T B [ children ]
- // creates a rectangle of dimensions X and Y which shows a preview of the model at given path and animation
- uimodelpreview "path/goes/here" "animation" X Y [ children ]
- // creates a rectangle of dimensions X and Y which shows a preview of a playermodel, in team
- // color and weapon given the three indexes respectively for model, team and weapon (Im, It, Iw).
- uiplayerpreview Im It Iw X Y [ children ]
- // clamping attempts to "stretch" a child/parent within its available space through its four arguments
- // in the case of lists, clamping will ignore list children padding, so use carefully
- uiclamp L R T B // clamps the parent
- uiclamp- L R T B // clamps the previous child
- uiclamp* L R T B // clamps all previous children
- // -2 : do not attempt to align (use instead of 0 if you DON'T NEED to align something to the center)
- // -1 : left justified/top,
- // 0 : center
- // 1 : right justified/bottom
- uialign X-align Y-align // aligns the parent
- uialign- X-align Y-align // aligns the previous child
- uialign* X-align Y-align // aligns all previous children
- // creates a rectangle with dimensions X and Y where its UI children are affected by scrollbars
- uiscroll X Y [ children ]
- // creates a scroll arrow with value step V, must be outside ui(h/v)scrollbar
- uiscrollarrow V [ children ]
- // creates a scroll button, must be inside ui(h/v)scrollbar
- uiscrollbutton [ children ]
- // creates a rectangle which acts as the scroll bar, the scroll button must be inside
- ui(h/v)scrollbar [ children ]
- // creates a slider with size X, MIN and MAX, which modifies VAR in V steps.
- ui(h/v)slider "VAR" MIN MAX V X [ on-change ] [ children ]
- // creates a slider arrow with value step V, must be outside ui(h/v)slider
- uisliderarrow V [ children ]
- // creates a slider button, must be inside ui(h/v)slider
- uisliderbutton [ children ]
- // creates a UI state check which executes/results a true or false condition, see the legend below
- ui(!)[PREFIX|STATE](+)(?) T F
- // SYMBOL NONE : checks parent for given STATE
- // ! : checks parent for given STATE and if non of the children in it share it
- // + : checks the next ui children to be created for given STATE
- // ? : makes the STATE check behave like '?' and results its T/F conditions instead.
- // ------------------------------
- // ONLY APPLICABLE TO STATES: press, hold, release
- // PREFIX NONE : left mouse click check (default)
- // alt : middle mouse check
- // esc : right mouse click
- // ------------------------------
- // STATE press : executes when button is pressed
- // hold : executes when button is held
- // release : executes when button is released
- // hover : executes when cursor hovers over
- // focus : executes when a child has input focus
- // scrolldown : executes when scrolling down
- // scrollup : executes when scrolling up
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement