class
GUITimeline
Base class that can be implemented by GUI elements needing to elements along draw a horizontal timeline.
Public
Methods
staticGetGuiTypeName
Returns type name of the GUI element used for finding GUI element styles.
SetRange
Determines the range of values to display on the timeline, in seconds.
GetRange
SetOffset
Determines the offset at which the displayed timeline values start at, in seconds.
GetOffset
SetFps
Number of frames per second, used for frame selection and marking.
GetFps
SetMarkedFrame
Frame to display the frame marker on.
Set to -1 to clear the frame marker.
SetMarkedFrame
GetFrame
Uses the assigned FPS, range and physical size to calculate the frame that is under the provided coordinates.
- pixelCoords
- Coordinates relative to this GUI element.
Returns: Frame that was clicked on, or -1 if the coordinates are outside of valid bounds.
GetTime
Returns the time at the specified pixel value along the timeline.
- pixel
- X coordinate to sample at, relative to this GUI element in pixels.
Returns: Time along the curve at the specified coordinate.
GetOffset
Finds the pixel offset relative to the GUI element's origin for the specified time.
- time
- Time value to return the offset for.
Returns: Offset in pixels relative to GUI element's origin
GetTimeForFrame
Returns time for a frame with the specified index.
Depends on set range and FPS.
- index
- Index of the frame (not a key-frame) to get the time for.
Returns: Time of the frame with the provided index.
SetPadding
Sets the size of padding to apply to the left and right sides of the curve drawing, in pixels.
GetPadding2
Internal
Methods
CalculateUnconstrainedOptimalSize
Calculates the optimal size for the GUI element, ignoring size constraints.
Protected
Constructors
GUITimeline
Methods
~GUITimeline
GetDrawableWidth
Returns the width of the GUI element that can be drawn to (width minus padding).
GetRangeWithPadding
Similar to getRange() but expands the range so it's expanded to encompas the right-most padding area.
DrawFrameMarker
Draws a vertical frame marker at the specified time.
DrawFrameMarker
Draws a frame marker at the currently selected frame.
UpdateLayoutForChildren
Calculates sizes and relative positions for all child elements.
Should be preceded with a call to UpdateOptimalLayoutSizes().
NotifyStyleChanged
Method that gets triggered whenever element style changes.