Skip to content

valuebox

Thomas edited this page Dec 22, 2019 · 1 revision

obj_uiZ_valuebox
A nice little input box for numbers only.
Has a plus and minus button on the right side.
When typing there will be a "|" character on the place the user is typing at with a breathing effect defined by you.
This object has some custom background code, making all the _in variables activated when the user is typing inside the stringbox.

Settings
-value[0]: You can just set the value the valuebox displays.
-plusbuttoncolor[c_green]: The color the little plus button should have.
-plusbuttononcolor[c_olive]: The color the little plus button should have when the mouse hovers over it.
-plusbuttonincolor[c_lime]: The color the little plus button should have when the mouse clicks it.
-minbuttoncolor[c_red]: The color the little minus button should have.
-minbuttononcolor[c_orange]: The color the little minus button should have when the mouse hovers over it.
-minbuttonincolor[c_yellow]: The color the little minus button should have when the mouse clicks it.
-iconcolor[c_white]: The color of the plus and minus signs on the buttons.
-textcolor[c_black]: The color the text indicating the current value should be.
-butmargin[2]: The space around the plus and minus buttons.
-butrightmargin[0]: The distance from the plus and minus buttons to the right edge of the bar .
-font[-1]: the font to use, a value of -1 means font will be ignored.
-butsteps[0.5]: Time in seconds of how long it will take before the plus or minus button enters "rapid mode".
-valuespeed[1]: How much the valuebox value should go up when you press a plus or minus button.
-valuefastspeed[180]: How much the valuebox value should go up per second when you press a plus or minus button.
-typeanimationin[uiz_exponential_in]: The animation when the "|" icon appears when typing.
-typeanimationout[uiz_exponential_in]: The animation when the "|" icon disappears when typing.
-countspeed[1]: The time in seconds the typeanimationin and typeanimationout will take.
-allowdec[true]: Whether to allow decimal numbers or not.
-maxvalue[10000]: The largest value allowed in the valuebox anything typed above this number wil be clamped down.
-minvalue[-10000]: The smallest value allowed in the valuebox anything typed above this number wil be clamped up. -messagetext["Enter a value"]: Will be what's shown in the messagebox when you are on a platform which doesn't support a keyboard.

This object has a background, and all its associated variables about which you can learn more here

Readable variables
-update: Whenever the user in typing in the box and adds a character or presses the plus or minus button.
-updated: Whenever the user is done typing or presses the plus or minus button.
-value: What number is inside the box

Functions
-uiz_valuebox_setvalue(instanceid,value[""])
-value=uiz_valuebox_getvalue(instanceid)
-uiz_valuebox_setcolor(instanceid,textcolor[c_black],plusbuttoncolor[c_green],plusbuttononcolor[c_olive],plusbuttonincolor[c_lime],minbuttoncolor[c_red],minbuttononcolor[c_orange],minbuttonincolor[c_yellow],iconcolor[c_white])
-uiz_valuebox_setmargin(instanceid,button knob margins[2], button right margin[0])
-uiz_valuebox_setfont(instanceid,font[-1])
-uiz_valuebox_setbuttonspeed(instanceid,increase amount[1], rapid speed[180], rapid time[0.5])
-uiz_valuebox_setcursoranimation(instanceid,animation in[uiz_exponential_in],animation out[uiz_exponential_in],time[1])
-uiz_valuebox_setcriteria(instanceid,max[10000],min[-10000],decimals[true])
-uiz_valuebox_setmessagetext(instanceid,text["Enter a value"])

Visuals

Wiki pages

🏑Home / General
πŸ“ƒTutorials
πŸ‘ͺ Parent
↕️ Positioning
πŸ›  Fixing & Updating
πŸ• Depth
πŸ“ƒ Templates and Examples
πŸŒ† Background
πŸ“‡ 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


🎈 Your own objects
🚫 Destroy
🐭 Mouse
πŸ’» Windows (uiz)
🌌 Animations
❓ General
πŸ“’ Numbers
πŸ“’ Strings
✏️ Draw
🚩 Popup
πŸ“‚ Files
πŸ’» Windows (os)
Clone this wiki locally