-
Notifications
You must be signed in to change notification settings - Fork 25
OGWidget
Jeppe Zapp edited this page Apr 11, 2014
·
20 revisions
The base class for every widget
Variable | Type | |
---|---|---|
isDrawn | boolean |
Is the widget drawn? |
isDisabled | boolean |
Is the widget disabled? |
isSelectable | boolean |
Does the widget receive mouse events? |
isDraggable | boolean |
Is the widget draggable? |
resetAfterDrag | boolean |
Should the widget snap back after drag? |
color | Color |
Color tint |
pivot | Pivot |
Pivot point (relative to widget size) |
anchor | Anchor |
Anchor point (relative to screen size) |
stretch | Stretch |
Stretch widget (relative to screen size) |
clipTo | OGScrollView |
Scrollview to clip drawing rect to |
styles | OGStyleSet |
Set of styles to use |
currentStyle | OGStyle |
The style currently displayed |
drawRct | Rect |
The drawing rect |
mouseRct | Rect |
The rect used for mouse events |
drawDepth | float |
Z-buffer order (adapted from Transform.position.z) |
scrollOffset | Vector3 |
Position offset used by OGScrollView
|
dragOffset | Vector3 |
Position offset used when mouse dragging |
dragOrigPos | Vector3 |
Position used after mouse dragging |
offset | Vector3 |
General use offset |
isAlwaysOnTop | boolean |
Does the widget have visual priority over others despite drawDepth? |
Method | Return type | |
---|---|---|
ToEnum | OGWidgetType |
Return widget as enum value |
CombineRects ( a : Rect , b : Rect ) |
Rect |
Combine 2 rects into one |
CheckMouseOver | boolean |
Check for mouse over event |
GetRoot | OGRoot |
Gets the root object |
OnMouseDown | void |
Mouse down event |
OnMouseUp | void |
Mouse up event |
OnMouseOver | void |
Mouse over event |
OnMouseDrag | void |
Mouse drag event |
OnMouseCancel | void |
Mouse exit event |
UpdateWidget | void |
Widget update |
ApplyDefaultStyles | void |
Reset styles in use to default ones |
DrawGL | void |
Draw directly with GL interface |
DrawSkin | void |
Draw sprites with OGDrawHelper
|
DrawText | void |
Draw glyphs with OGDrawHelper
|