Skip to content

huequare

Thomas edited this page Dec 22, 2019 · 3 revisions

obj_uiZ_huesquare
An object version of the draw_huesquare script, but the obect has some input options.
Adds little pointer square that can be dragged to any position on the square to return a color.

Settings
-h[0]: The hue value (0 for left, 255 for right) of where the pointer is. This setting can be changed by user input.
-s[0]: The saturation value (0 for bottom, 255 for top) of where the pointer is. This setting can be changed by user input.
-v[255]: The value value (from 0 to 255) of what the square should be. This setting can NOT be changed by user input.
-squaresize[3]: How big the pointer square should be, from the center to the closest edge. A value of 3 whould mean a size of 6x6 pixels.
-animation[true]: whether animations on this object should be enabled.
-hanimationtype[uiz_quadratic_out]: What animation the pointer should have for the h value when you move it.
-sanimationtype[uiz_quadratic_out]: What animation the pointer should have for the s value when you move it.
-rgbanimationtype[uiz_quadratic_out]: What animation the inr, inb and ing value should have.
-anicountspeed[0.1]: How long the animation should take in seconds.

Functions
-uiz_huesquare_setcolor_hsv(instanceid,h[0],s[0],v[255])
-color=uiz_huesquare_getcolor(instanceid)
-uiz_huesquare_setpointersettings(instanceid,size[3])
-uiz_huesquare_setanimation(instanceid,enabled[true],hanimation[uiz_quadratic_out],sanimation[uiz_quadratic_out],rgbanimation[uiz_quadratic_out],time[0.1])
-uiz_huesquare_setvalues(instanceid,h,s,v)

Readable variables
-anicount: A value from 0 to one indicating how far an animation is with playing.
-h: A value indicating the hue value of where the pointer is. Animations are ignored and this value will change instantly when the user presses somewhere on the huesquare.
-inh: This is a hue value that is constantly updated during animations.
-fromh: The old hue value of where the hue used to be during an animation.
-s: A value indicating the saturation value of where the pointer is. Animations are ignored and this value will change instantly when the user presses somewhere on the huesquare.
-ins: This is a saturation value that is constantly updated during animations.
-froms: The old saturation value of where the saturation used to be during an animation.
-color: Which color the user selected(a game maker color code).

-tor: Will give you a converted red color value. Animations are ignored and this value will change instantly when the user presses somewhere on the huesquare.
-inr: Will give you a converted red color value which updates during animations.
-fromr: The old red value of what the old red value was before an animation, while an animation is going on.

-tob: Will give you a converted blue color value. Animations are ignored and this value will change instantly when the user presses somewhere on the huesquare.
-inb: Will give you a converted blue color value which updates during animations.
-fromb: The old blue value of what the old blue value was before an animation, while an animation is going on.

-tog: Will give you a converted green color value. Animations are ignored and this value will change instantly when the user presses somewhere on the huesquare.
-ing: Will give you a converted green color value which updates during animations.
-fromg: The old green value of what the old green value was before an animation, while an animation is going on.

-incolor: Will give you a color value which updates during animations.
-icolor: Which color the little pointer square has.
-update: Whenever any value changes during an animation.
-updated: Whenever the color changes, but it ignores animations, and is only true for one step.

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