-
Notifications
You must be signed in to change notification settings - Fork 2
draw_spritebutton
Draws a quick sprite to be used as button, at specified position.
Normally returns false, but true when the mouse is released.
The sprite should have these images:
- 0: The mouse is not hovering over the button
- 1: The mouse is hovering over the button
- 2: The mouse is clicking the button
-
uiz_draw_spriteButton(x1, y1, x2, y2, color, oncolor, incolor, sprite, alpha): Draws a sprite button. (doesn't have to be on a uiZ object)
- x1: The x coordinate of the left side of your button.
- y1: The y coordinate of the top side of your button.
- x2: The x coordinate of the right side of your button.
- y2: The y coordinate of the bottom side of your button.
- color: the normal color, when the mouse is not over the button.
- oncolor: The color of the button when the mouse is over it.
- incolor: The color of the button when the mouse is pressing it.
- sprite: The sprite to use to draw the button.
- alpha: The alpha of the button.
-
uiz_draw_spriteButton_state(x1, y1, x2, y2, color, oncolor, incolor, sprite, alpha, state): Draws a sprite button. (doesn't have to be on a uiZ object). The normal function uses the mouse state to determine the blending color and sprite sub image. This function uses a custom provided argument to define the button state.
- x1: The x coordinate of the left side of your button.
- y1: The y coordinate of the top side of your button.
- x2: The x coordinate of the right side of your button.
- y2: The y coordinate of the bottom side of your button.
- color: the normal color, in state 0.
- oncolor: The color of the button in state 1.
- incolor: The color of the button in state 2
- sprite: The sprite to use to draw the button.
- alpha: The alpha of the button.
- state: What state the button should be in (0, 1 or 2). You can also feed in the return value of uiz_draw_spriteButton_step.
-
state = uiz_draw_spriteButton_step(x1, y1, x2, y2, currentState): Checks the state of the object and updates the sprite button if needed. Returns state of button (which needs to be fed to uiz_draw_spriteButton_state). If this number is negative, the state has changed. This function needs to be called on a uiZ object. It should be placed in the user ever 2 or 3.
- state: The state of the spriteButton, you can feed this into uiz_draw_spriteButton_state.
- x1: The x coordinate of the left side of your button.
- y1: The y coordinate of the top side of your button.
- x2: The x coordinate of the right side of your button.
- y2: The y coordinate of the bottom side of your button.
- currentState: What state the button is returned by this function in the last step. For the very first step, this value can be set to 0.
πTutorials
Basics 1: Basic positioning
Basics 2: Parenting system
Basics 3: Advanced positioning
Basics 4: Advanced sizing and set point
Basics 5: Canvas and containment
Basics 6: Alpha and depth
Basics 7: Using the manual and Animations
Basics 8: Object backgrounds
Basics 9: Grids
Basics 10: Framesets
Basics 11: Windows
Basics 12: Scroll bars
βοΈ Positioning
π Depth
π Structures
π Objects
obj_uiZ_3waybutton
obj_uiZ_button
obj_uiZ_checkbox
obj_uiZ_clock
obj_uiZ_colorbox
obj_uiZ_cover
obj_uiZ_drawdslist
obj_uiZ_dropdown
obj_uiZ_easybutton
obj_uiZ_frame
obj_uiZ_framescrollbar
obj_uiZ_functionbar
obj_uiZ_gradientsquare
obj_uiZ_gradientroundrect
obj_uiZ_gridlist
obj_uiZ_huesquare
obj_uiZ_loadingbar
obj_uiZ_loadingcircle
obj_uiZ_menubutton
obj_uiZ_mousemenu
obj_uiZ_radiobox
obj_uiZ_rotator
obj_uiZ_slider
obj_uiZ_scrollbar
obj_uiZ_slider_2col
obj_uiZ_slickslider
obj_uiZ_slideframe
obj_uiZ_sprbutton
obj_uiZ_spriteanimationbutton
obj_uiZ_spritecounter
obj_uiZ_stringbox
obj_uiZ_sliderstruct
obj_uiZ_surfacecanvas
obj_uiZ_sprite
obj_uiZ_square
obj_uiZ_squarebutton
obj_uiZ_swipicon
obj_uiZ_switch
obj_uiZ_tabslider
obj_uiZ_tabs
obj_uiZ_treelist
obj_uiZ_text
obj_uiZ_text_background
obj_uiZ_textarea
obj_uiZ_valuebox
π Strings
uiz_addChar
uiz_changechar
uiz_charCanHaveAddon
uiz_returnCharAddon
uiz_charIsNumber
uiz_charIsNumberOrText
uiz_getlines
uiz_gettext_contained
uiz_gettextlines_contained
uiz_getValidVariableName
uiz_isSpaceChar
uiz_lastStringChars
uiz_removeChar
uiz_replaceChars_
uiz_string_copy
uiz_string_digits
uiz_string_format
uiz_string_fromReal
uiz_string_real_getFracLength
uiz_string_real_getIntLength
uiz_string_repeat
uiz_string_replace
uiz_string_pos_at
uiz_stringUntilNewline