-
Notifications
You must be signed in to change notification settings - Fork 2
posvaltype
The variables "posvalwtype" and "posvalhtype" affect the size of the object.
How these variables affects the position is set by posinframex,posinframey,posvalwtype and posvalhtype.
No minus functions (_nm)
Some values of posvalw/htype have a subtraction operator in them.
Some of these values have an equivalent that doesn't have such an operator.
Examples are for the case: "ret=parent.width-argument0;"
its _nm counterpart would look like: "ret=argument0;"
Adding your own
Open the script "uiz_getposx" and "uiz_getposy".
You can make a new constant of a value that hasn't been taken in the case statement, and add your own code.
For this you must set ret to the value you want in to be.
Don't forget "break;"!
In the codes in the table below "p." is referring to the parent and "spx" refers to a corresponding "setpointx/y" value.
*These variables can differ with different combinations of posvalwtype and posvalhtype.
** "all" refers only to the variables "posvalw" and "posvalh". The first point also applies to **.
Picking any other values that the given constants will default to a pixel value.
There are a few constants this variable can be set to:
| px |
Set the size of the object to an amount in pixels. Stands for "pixel". A value of 100 px will mean that the object will be 100px wide. A value of 0 px will mean the size will be 0, but this can give problems. Must be 0 or higher. ( 0<posval ) Can be set for both "posvalwtype" and "posvalhtype". **Enables all variables.** Calculated using: "ret=argument0;" |
| pxmin |
Set the size of the object to the size of its parent minus an amount in pixels. Stands for "pixel minus". A value of 0 px will mean the size will be as big as its parent. Must be 0 or higher and lower that the parents width/height. ( 0<posval<=p.width/height ) Can be set for both "posinframex" and "posinframey". **Enables all variables.** Calculated using: "ret=parent.width-argument0;" or: "ret=parent.height-argument0;" |
| dp |
Set the size of the object relative to the display density. Short for "density pixels". 2 displays may both have a resolution of 1920x1080, but one may be 5 inch and the other 27 inch. dp tries to make distances the same irl. Must be 0 or higher. ( 0<posval ) Can be set for both "posvalwtype" and "posvalhtype". **Enables all variables.** Calculated using: "ret=argument0*display_get_dpi_x();" or: "ret=argument0*display_get_dpi_y();" |
| dpmin |
Set the size of the object to the size of its parent minus a relative value to the display density. Short for "density pixels minus". 2 displays may both have a resolution of 1920x1080, but one may be 5 inch and the other 27 inch. dp tries to make distances the same irl. Must be 0 or higher and lower that the parents width/height. ( 0<posval<=p.width/height ) Can be set for both "posvalwtype" and "posvalhtype". **Enables all variables.** Calculated using: "ret=parent.width-argument0*display_get_dpi_x();" or: "ret=parent.height-argument0*display_get_dpi_y();" |
| fc |
Set the size of the object relative to the size of the parent. Stands for "factor". A value of 1 fc will mean the object will be as big as its parent. A value of 0.5 fc will mean the object will be half as big as its parent. Must be higher than 0. ( 0<posval ) Can be set for both "posvalwtype" and "posvalhtype". **Enables all variables.** Calculated using: "ret=round(argument0*parent.width);" or: "ret=round(argument0*parent.height);" |
| fcx |
Set the size of the object relative to the width of the parent. Stands for "factor-x". About the same as fc, but forces the use of the width of the object. Has no difference with fc if used on posvalwtype, but does make a difference when used with posvalhtype. Must be higher than 0. ( 0<posval ) Can be set for both "posvalwtype" and "posvalhtype". **Enables all variables.** Calculated using: "ret=round(argument0*parent.width);" or: "ret=round(min(argument0*parent.width,parent.height));" |
| fcy |
Set the size of the object relative to the height of the parent. Stands for "factor-y". About the same as fc, but forces the use of the height of the object. Has no difference with fc if used on posvalhtype, but does make a difference when used with posvalwtype. Must be higher than 0. ( 0<posval ) Can be set for both "posvalwtype" and "posvalhtype". Enables value-clamping if containposvx/y is set to uiz_auto. **Enables all variables.** Calculated using: "ret=round(min(argument0*parent.height,parent.width));" or: "ret=round(argument0*parent.height);" |
| fcm |
Set the size of the object relative to the width and height of the parent. Stands for "factor-mean". About the same as fc, but takes the mean between the width and height of the object's parent. A mix between fcx and fcy. Must be higher than 0. ( 0<posval ) Can be set for both "posvalwtype" and "posvalhtype". Enables value-clamping if containposvx/y is set to uiz_auto. **Enables all variables.** Calculated using: "ret=round(clamp(mean(argument0*parent.width,argument0*parent.height),0,parent.width))" or: "ret=round(min(mean(argument0*parent.width,argument0*parent.height),parent.height))" |
| fcmin |
Set the size of the object relative to the width and height of the parent. Stands for "factor-minimum". This checks whether the width or height is the smallest, and uses that value to perform a factor operation. Either fcx or fcy is executed. Must be higher than 0. ( 0<posval ) Can be set for both "posvalwtype" and "posvalhtype". Enables value-clamping if containposvx/y is set to uiz_auto. **Enables all variables.** |
| fcmax |
Set the size of the object relative to the width and height of the parent. Stands for "factor-miximum". This checks whether the width or height is the largest, and uses that value to perform a factor operation. Either fcx or fcy is executed. Must be higher than 0. ( 0<posval ) Can be set for both "posvalwtype" and "posvalhtype". Enables value-clamping if containposvx/y is set to uiz_auto. **Enables all variables.** |
| < |
Set the size of the object to the size of its parent minus twice an amount in pixels. Stands for "same as pixel". The main use for this is to be able to create proportional objects with equal margins on both sides. A value of 0 px will mean the size will be as big as its parent. Must be 0 or higher and lower that the parents width/height divded by 2. ( 0<posval<=(p.width or height) div 2 ) Can be set for both "posvalwtype" and "posvalhtype". Has a _nm value. **Enables all variables.** Calculated using: "ret=parent.width-argument0*2;" or: "ret=parent.height-argument0*2;" |
| sax_px |
Set the size of the object to the width of its parent minus twice an amount in pixels. Stands for "same as X pixel". The main use for this is to be able to create proportional objects with equal margins on both sides. Forces the use of the width to calculate the size/ A value of 0 px will mean the size will be as big as its parent. Must be 0 or higher and lower that the parents width divided by 2. ( 0<posval<=(p.width) div 2 ) Can be set for both "posvalwtype" and "posvalhtype". Has a _nm value. **Enables all variables.** Calculated using: "ret=parent.width-argument0*2;" or: "ret=clamp(parent.width-argument0*2,0,parent.height);" |
| say_px |
Set the size of the object to the height of its parent minus twice an amount in pixels. Stands for "same as Y pixel". The main use for this is to be able to create proportional objects with equal margins on both sides. Forces the use of the height to calculate the size/ A value of 0 px will mean the size will be as big as its parent. Must be 0 or higher and lower that the parents height divded by 2. ( 0<posval<=(p.height) div 2 ) Can be set for both "posvalwtype" and "posvalhtype". Has a _nm value. Enables value-clamping if containposvx/y is set to uiz_auto. **Enables all variables.** Calculated using: "ret=clamp(parent.height-argument0*2,0,parent.width);" or: "ret=parent.height-argument0*2;" |
| sa_fc |
Set the size of the object to the size of its parent minus twice a factor. Stands for "same as factor". The main use for this is to be able to create an object with equal margins on both sides. A value of 0 px will mean the size will be as big as its parent. Must be 0 or higher, and 1 or lower. ( 0<=posval<=1 ) Can be set for both "posvalwtype" and "posvalhtype". Has a _nm value. **Enables all variables.** Calculated using: "ret=parent.width-argument0*parent.width*2;" or: "ret=parent.height-argument0*parent.height*2;" |
| sax_fc |
Set the size of the object to the width of its parent minus twice a factor. Stands for "same as X factor". The main use for this is to be able to create an object with equal margins on both sides. Forces the use of the width to calculate the size A value of 0 fc will mean the size will be as big as its parent. Must be 0 or higher, and 1 or lower. ( 0<=posval<=1 ) Can be set for both "posvalwtype" and "posvalhtype". Has a _nm value. **Enables all variables.** Calculated using: "ret=parent.width-argument0*parent.width*2;" or: "ret=clamp(parent.width-argument0*parent.width*2,0,parent.height);" |
| say_fc |
Set the size of the object to the height of its parent minus twice a factor. Stands for "same as Y factor". The main use for this is to be able to create an object with equal margins on both sides. Forces the use of the height to calculate the size A value of 0 fc will mean the size will be as big as its parent. Must be 0 or higher, and 1 or lower. ( 0<=posval<=1 ) Can be set for both "posvalwtype" and "posvalhtype". Has a _nm value. Enables value-clamping if containposvx/y is set to uiz_auto. **Enables all variables.** Calculated using: "ret=clamp(parent.height-argument0*parent.height*2,0,parent.width);" or: "ret=parent.height-argument0*parent.height*2;" |
| saxh_fc |
Set the size of the object to the height of its parent minus twice a X-factor(a factor calculated from width). Stands for "same as X height factor". The main use for this is to be able to create an object with equal margins on both sides. Forces the use of the width to calculate the factor, and forces the use of the parent's height to be used. A value of 0 fc will mean the size will be as big as its parent's height. Must be 0 or higher, and 1 or lower. ( 0<=posval<=1 ) Can be set for both "posvalwtype" and "posvalhtype". Has a _nm value. Enables value-clamping if containposvx/y is set to uiz_auto. **Enables all variables.** Calculated using: "ret=clamp(parent.height-argument0*parent.width*2,0,parent.width);" or: "ret=clamp(parent.height-argument0*parent.width*2,0,parent.height);" |
| sayw_fc |
Set the size of the object to the width of its parent minus twice a Y-factor(a factor calculated from height). Stands for "same as Y width factor ". The main use for this is to be able to create an object with equal margins on both sides. Forces the use of the height to calculate the factor, and forces the use of the parent's width to be used. A value of 0 fc will mean the size will be as big as its parent's width. Must be 0 or higher, and 1 or lower. ( 0<=posval<=1 ) Can be set for both "posvalwtype" and "posvalhtype". Has a _nm value. Enables value-clamping if containposvx/y is set to uiz_auto. **Enables all variables.** Calculated using: "ret=parent.width-argument0*parent.height*2;" or: "ret=clamp(parent.width-argument0*parent.height*2,0,parent.height);" |
| sa_dp |
Set the size of the object to the size of its parent minus twice a density pixel. Stands for "same as density pixel". The main use for this is to be able to create an object with equal margins on both sides. A value of 0 dp will mean the size will be as big as its parent. Must be 0 or higher, and 1 or lower. ( 0<=posval<=1 ) Can be set for both "posvalwtype" and "posvalhtype". Has a _nm value. **Enables all variables.** Calculated using: "ret=parent.width-argument0*display_get_dpi_x()*2;" or: "ret=parent.height-argument0*display_get_dpi_y()*2;" |
| sax_dp |
Set the size of the object to the width of its parent minus twice a density pixel. Stands for "same as X density pixel". The main use for this is to be able to create proportional objects with equal margins on both sides. Forces the use of the width to calculate the size A value of 0 dp will mean the size will be as big as its parent's width. br> Must be 0 or higher, and 1 or lower. ( 0<=posval<=1 ) Can be set for both "posvalwtype" and "posvalhtype". Has a _nm value. Enables value-clamping if containposvx/y is set to uiz_auto. **Enables all variables.** Calculated using: "ret=parent.width-argument0*display_get_dpi_x()*2;" or: "ret=clamp(parent.width-argument0*display_get_dpi_x()*2,0,parent.height);" |
| say_dp |
Set the size of the object to the height of its parent minus twice a density pixel. Stands for "same as Y density pixel". The main use for this is to be able to create proportional objects with equal margins on both sides. Forces the use of the height to calculate the size A value of 0 dp will mean the size will be as big as its parent's height. br> Must be 0 or higher, and 1 or lower. ( 0<=posval<=1 ) Can be set for both "posvalwtype" and "posvalhtype". Has a _nm value. Enables value-clamping if containposvx/y is set to uiz_auto. **Enables all variables.** Calculated using: "clamp(parent.height-argument0*display_get_dpi_y()*2,0,parent.width);" or: "ret=parent.height-argument0*display_get_dpi_y()*2;" |
| saxh_dp |
Set the size of the object to the height of its parent minus twice a X-density(x and y density are almoast always the same). Stands for "same as X height density pixel". The main use for this is to be able to create proportional objects with equal margins on both sides. Forces the use of the dpi_x function, and forces the use of the parent's height to be used. A value of 0 dp will mean the size will be as big as its parent's height. Can be set for both "posvalwtype" and "posvalhtype". Enables value-clamping if containposvx/y is set to uiz_auto. Has a _nm value. **Enables all variables.** Calculated using: "ret=clamp(parent.height-argument0*display_get_dpi_x()*2,0,parent.width);" or: "ret=clamp(parent.height-argument0*display_get_dpi_x()*2,0,parent.height);" |
| sayw_dp |
Set the size of the object to the width of its parent minus twice a Y-density(x and y density are almoast always the same). Stands for "same as Y width density pixel". The main use for this is to be able to create proportional objects with equal margins on both sides. Forces the use of the dpi_y function, and forces the use of the parent's width to be used. A value of 0 dp will mean the size will be as big as its parent's width. Must be 0 or higher, and 1 or lower. ( 0<=posval<=1 ) Can be set for both "posvalwtype" and "posvalhtype". Has a _nm value. Enables value-clamping if containposvx/y is set to uiz_auto. **Enables all variables.** Calculated using: "ret=parent.width-argument0*display_get_dpi_y()*2" or: "ret=clamp(parent.width-argument0*parent.height*2,0,parent.height);" |
| saa |
Set the size of the object to its parents size minus the calculated position of "posinframex","posinframey","posvalx" and "posvaly". only compatible with "posinframe" of type "px","dp","fc","fcx","fcy","fcm". If incompatible, a pixel value is used. Stands for "same as another". The main use for this is to be able to create proportional objects with equal margins on both sides. Can be set for both "posvalwtype" and "posvalhtype". Has a _nm value. **Enables all variables.** Calculated using: "ret=parent.width-uiz_getposx_simple(posvalx,posinframex)" or: "ret=parent.height-uiz_getposy_simple(posvaly,posinframey);" |
| saax |
Set the size of the object to its parents width minus the calculated position of "posinframex" and "posvalx". only compatible with "posinframe" of type "px","dp","fc","fcx","fcy","fcm". If incompatible, a pixel value is used. Stands for "same as another x". Forces calculations to happen exclusively using x and width values. The main use for this is to be able to create proportional objects with equal margins on both sides. Can be set for both "posvalwtype" and "posvalhtype". Enables value-clamping if containposvy is set to uiz_auto, not for containposvx. Has a _nm value. **Enables all variables.** Calculated using: "ret=parent.width-uiz_getposx_simple(posvalx,posinframex)" or: "ret=clamp(parent.width-uiz_getposy_simple(posvalx,posinframex),0,parent.height);" |
| saay |
Set the size of the object to its parents height minus the calculated position of "posinframey" and "posvaly". only compatible with "posinframe" of type "px","dp","fc","fcx","fcy","fcm". If incompatible, a pixel value is used. Stands for "same as another y". Forces calculations to happen exclusively using y and height values. The main use for this is to be able to create proportional objects with equal margins on both sides. Can be set for both "posvalwtype" and "posvalhtype". Enables value-clamping if containposvx is set to uiz_auto, not for containposvy. Has a _nm value. **Enables all variables.** Calculated using: "ret=clamp(parent.height-uiz_getposy_simple(posvaly,posinframey),0,parent.width)" or: "ret=clamp(parent.width-uiz_getposy_simple(posvaly,posinframey),0,parent.height);" |
| saaw |
Set the size of the object to its parents width minus the calculated position of "posinframex","posinframey","posvalx" and "posvaly". only compatible with "posinframe" of type "px","dp","fc","fcx","fcy","fcm". If incompatible, a pixel value is used. Stands for "same as another width". Forces calculations to happen using the parent's width and the x or y values depending on whether you're setting posvalwtype or posvalhtype. The main use for this is to be able to create proportional objects with equal margins on both sides. Can be set for both "posvalwtype" and "posvalhtype". Enables value-clamping if containposvy is set to uiz_auto, not for containposvx. Has a _nm value. **Enables all variables.** Calculated using: "ret=parent.width-uiz_getposx_simple(posvalx,posinframex)" or: "ret=clamp(parent.width-uiz_getposy_simple(posvaly,posinframey),0,parent.height);" |
| saah |
Set the size of the object to its parents height minus the calculated position of "posinframex","posinframey","posvalx" and "posvaly". only compatible with "posinframe" of type "px","dp","fc","fcx","fcy","fcm". If incompatible, a pixel value is used. Stands for "same as another width". Forces calculations to happen using the parent's width and the x or y values depending on whether you're setting posvalwtype or posvalhtype. The main use for this is to be able to create proportional objects with equal margins on both sides. Can be set for both "posvalwtype" and "posvalhtype". Enables value-clamping if containposvx is set to uiz_auto, not for containposvy. Has a _nm value. **Enables all variables.** Calculated using: "ret=parent.width-uiz_getposx_simple(posvalx,posinframex)" or: "ret=clamp(parent.width-uiz_getposy_simple(posvaly,posinframey),0,parent.height);" |
| saayw |
Set the size of the object to its parents width minus the calculated position of "posinframey" and "posvaly". only compatible with "posinframe" of type "px","dp","fc","fcx","fcy","fcm". If incompatible, a pixel value is used. Stands for "same as another y width". Forces calculations to happen using the parent's width and the object's y values. The main use for this is to be able to create proportional objects with equal margins on both sides. Can be set for both "posvalwtype" and "posvalhtype". Has a _nm value. Enables value-clamping if containposvx/y is set to uiz_auto. **Enables all variables.** Calculated using: "ret=clamp(parent.width-uiz_getposy_simple(posvaly,posinframey),0,parent.width)" |
| saaxh |
Set the size of the object to its parents height minus the calculated position of "posinframex" and "posvalx". only compatible with "posinframe" of type "px","dp","fc","fcx","fcy","fcm". If incompatible, a pixel value is used. Stands for "same as another x height". Forces calculations to happen using the parent's height and the object's x values. The main use for this is to be able to create proportional objects with equal margins on both sides. Can be set for both "posvalwtype" and "posvalhtype". Has a _nm value. Enables value-clamping if containposvx/y is set to uiz_auto. **Enables all variables.** Calculated using: "ret=clamp(parent.height-uiz_getposx_simple(posvalx,posinframex),0,parent.height)" |
| saam |
Set the size of the object to its parents size minus the calculated mean of "posinframex","posinframey","posvalx" and "posvaly". only compatible with "posinframe" of type "px","dp","fc","fcx","fcy","fcm". If incompatible, a pixel value is used. Stands for "same as another width". Forces calculations to happen using the parent's size and mean of the object's x and y values. The main use for this is to be able to create proportional objects with equal margins on both sides. Can be set for both "posvalwtype" and "posvalhtype". Has a _nm value. Enables value-clamping if containposvx/y is set to uiz_auto. **Enables all variables.** Calculated using: "ret=clamp(parent.width-mean(uiz_getposx_simple(posvalx,posinframex),uiz_getposy_simple(posvaly,posinframey))*2,0,parent.width)" or: "ret=clamp(parent.height-mean(uiz_getposx_simple(posvalx,posinframex),uiz_getposy_simple(posvaly,posinframey))*2,0,parent.height);" |
π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