-
Notifications
You must be signed in to change notification settings - Fork 2
clock
Draws a clock that consists out of two different sprites:
- A sprite holding a big marking (sprite index 0) and some sort of small marking (sprite index 1). This sprites origin need to be centered. This represents the numbers on the clock.
- A sprite holding the clock pointers. A second (sprite index 0), minute (sprite index 1) and hour (sprite index 2) pointer.
This sprite's origin need to be at the place you want the pointer to connect to the middle of your clock.
This clock has a "windows 3.1" look by default, because it was originally made for the windows 3.1 example
All the animation can be set to uiz_zero to give the pointers a sudden "jump" instead of an animation.
- The pointer is a sprite. That means that if you want a line as a pointer, you will have to make a sprite with a line. This may give you weird visual interpolation issues.
- The clocks doesn't support numbers. Instead numbers are represented with dots. (see visuals at the bottom)
- The clock doesn't have a background, it's transparent.
- bigdots[12]: Number of big markings around the clock.
- smalldots[4]: Number of small markings between two big markings.
- dotsprite[spr_uiZ_analogclock_dots]: The sprite to use for the markings. Contains a big dot (img 0), and a small dot(img 1).
- pointersprite[spr_uiZ_analogclock_pointer]: The sprite to use for the pointers. Contains three pointers: seconds pointer (img 0), minutes pointer(img 1) and a hour pointer (img 2)
- pointersize[0.5]: How big the pointer should be.
- pointersizetype[fcm]: The type of the size of the pointer.
- pointercolor[c_white]: The color blend of the pointersprites in the clock.
- time[-1]: A timecode holding the amount of seconds since 1970. If this is -1 then date_current_datetime(); will be used for this value.
- seconds[true]: Whether to draw the seconds pointer.
- minutes[true]: Whether to draw the minutes pointer.
- hours[true]: Whether to draw the hour pointer.
- secondanimation[uiz_exponential_in]: The animation the secondpointer has between 2 seconds.
- minuteanimation[uiz_zero]: The animation the minutepointer has between 2 minutes.
- houranimation[uiz_straight]: The animation the hourpointer has between 2 hours.
This object has a background, and all its associated variables about which you can learn more here
-
uiz_clock_setdots(instanceid,bigdots,smalldots):
- instanceid: the instance id of the instance you want to modify
- bigdots[12]: the amount of big number dots on the clock
- smalldots[4]: the amount of small visible number dots between two big dots. If you want 5 segments between two big dots, you need 4 dots.
-
uiz_clock_setsprite(instanceid,dotsprite,pointersprite)
- instanceid: the instance id of the instance you want to modify
- dotsprite[spr_uiZ_analogclock_dots]: A sprite containing two images: A big dot (img 0), and a small dot(img 1)
- pointersprite[spr_uiZ_analogclock_pointer]: A sprite containing three pointers: seconds pointer (img 0), minutes pointer(img 1) and a hour pointer (img 2)
-
uiz_clock_setpointercolor(instanceid,pointercolor):
- instanceid: the instance id of the instance you want to modify
- pointercolor[c_white]: the color of all the pointers.
-
uiz_clock_setpointersize(instanceid,size,sizetype):
- instanceid: The instance id of the instance you want to modify
- size[0.5]: The size of the pointersize, realtive to the size of the clock
- sizetype[fcm]: The type of size for the pointer. This can be px, pxmin, dp, dpmin, fc, fcx, fcy, fcm, fcmin or fcmax.
-
uiz_clock_settime(instanceid,time):
- instanceid: the instance id of the instance you want to modify
- time[-1 for real time]: What time the clock should display in the same format as date_current_datetime(). If a value of -1 is given then the real time is used.
-
uiz_clock_enablepointers(instanceid,seconds,minutes,hours:)
- instanceid: the instance id of the instance you want to modify
- seconds[true]: Draw the seconds pointer.
- minutes[true]: Draw the minute pointer.
- hours[true]: Draw the hour pointer.
-
uiz_clock_setanimation(instanceid,secondsanimation,minutesanimation[uiz_zero],hoursanimation[uiz_straight]):
- instanceid: the instance id of the instance you want to modify
- secondsanimation[uiz_exponential_in]: What the animation the seconds pointer should have. If you have time set to -1 then this animation will be launched every second, else it will be launched every time you change the time. The animation will always take 1 second no matter what.
π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