-
Notifications
You must be signed in to change notification settings - Fork 2
tabslider
This is a simple mobile android app style tab slider. It has a little bar on the bottom showing what tab is selected.
This object only works horizontally.
This object can be combined with a obj_uiZ_sliderstruct.
This object doesn't have any type of background meaning that it is fully opaque in some places.
By default, all horizontal space given to this object is divided horizontally equally between all tablist items. However, should you want differently you could technically edit the "spacinglist" ds list and change the spacings of your slider. This is quite manual though.
- tablist[-1]: Which ds list to use for the tabs(each item in this ds_list will be one item on the bar). This list must only contain strings. The number of tabs is decided by the size of this list.
- textcolor[c_black]: The color all text on the slider should have.
- font[-1]: The font to use, a value of -1 means font will be ignored.
- halign[fa_center]: The horizontal alignment of text in the space each tab is given.
- valign[fa_center]: The vertical alignment of text on the slider.
- animationtime[0.25]: The time in seconds the animation of moving the little bar on the bottom to a new tab takes.
- placeanimation[uiz_circular_in]: The animation of moving the little bar on the bottom to a new tab takes.
- widthanimation[uiz_circular_in]: The animation of resizing the little bar on the bottom to a new tab takes. Doesn't do much by default.
- marksize[0.1]: The size the little tab marks has on the bottom of the bar.
- marksizetype[fc]: The type of size the little tab marks has on the bottom of the bar.
- markcolor[c_white]: The color of the marker.
- mouseoncolor[c_ltgray]: The color of the square drawn when the mouse hovers over a tab.
- mouseonalpha[0.2]: The alpha of the square drawn when the mouse hovers over a tab.
- mouseincolor[c_white]: The color of the square drawn when the mouse clicks a tab.
- mouseinalpha[0.2]: The alpha of the square drawn when the mouse clicks a tab.
- value: What tab the slider is on. 0 is the left most tab.
- updated: When a tab has been clicked.
-
uiz_tabslider_setvalue(instance id,newvalue,[optional inanimation],[optional isdragging]):
- instanceid: the instance id of the instance you want to modify
- newvalue: What tab the slider should be on where 0 is the left most tab. Cannot be higher than the size of your tablist.
- inanimation: Optional arguments stating how far the tabslider should be in its animation. 0 is at the beginning (this is the default of this optional paramter) while 1 is at the ending.
- isdragging: setting this to true will disable the automatic animation of the tabslider for a single step.
-
uiz_tabslider_settablist(instanceid,ds list[-1]):
- instanceid: the instance id of the instance you want to modify
- ds list Which ds list to use for the tabs(each item in this ds_list will be one item on the bar). This list must only contain strings. The number of tabs is decided by the size of this list.
-
uiz_tabslider_settextsettings(instanceid,color[c_black],font[-1],halign[fa_center],valign[fa_center]):
- instanceid: the instance id of the instance you want to modify
- color: The color all text on the slider should have.
- font: The font to use, a value of -1 means font will be ignored.
- halign: The horizontal alignment of text in the space each tab is given.
- valign: The vertical alignment of text on the slider.
-
uiz_tabslider_setanimation(instanceid,place[uiz_circular_in],width[uiz_spring],time[0.25]):
- instanceid: the instance id of the instance you want to modify
- place: The animation of moving the little bar on the bottom to a new tab takes.
- width: The animation of resizing the little bar on the bottom to a new tab takes. Doesn't do much by default.
- time: The time in seconds the animation of moving the little bar on the bottom to a new tab takes.
-
uiz_tabslider_setmarkersettings(instanceid,size[0.1],sizetype[dp],color[c_white]):
- instanceid: the instance id of the instance you want to modify
- size: The size the little tab marks has on the bottom of the bar.
- sizetype: The type of size the little tab marks has on the bottom of the bar.
- color: The color of the marker.
-
uiz_tabslider_setmousesettings(instanceid,over color[c_ltgray],over alpha[0.2],click color[c_white],click alpha[0.2]):
- instanceid: the instance id of the instance you want to modify
- over color[c_ltgray]: The color of the square drawn when the mouse hovers over a tab.
- over alpha[0.2]: The alpha of the square drawn when the mouse hovers over a tab.
- click color[c_white]: The color of the square drawn when the mouse clicks a tab.
- click alpha[0.2]: The alpha of the square drawn when the mouse clicks a tab.
-
value=uiz_tabslider_gettab(instanceid):
- value: What tab the slider is on. 0 is the left most tab.
- instanceid: the instance id of the instance you want to modify
The tabslider on its own:

The tabslider in template 1:

π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