Barotrauma Client Doc
|
Public Types | |
enum class | ComponentState { None , Hover , Pressed , Selected , HoverSelected } |
Public Member Functions | |
delegate bool | SecondaryButtonDownHandler (GUIComponent component, object userData) |
T | GetChild< T > () |
T | GetAnyChild< T > () |
IEnumerable< T > | GetAllChildren< T > () |
IEnumerable< GUIComponent > | GetAllChildren () |
Returns all child elements in the hierarchy. More... | |
GUIComponent | GetChild (int index) |
int | GetChildIndex (GUIComponent child) |
GUIComponent | GetChildByUserData (object obj) |
bool | IsParentOf (GUIComponent component, bool recursive=true) |
bool | IsChildOf (GUIComponent component, bool recursive=true) |
virtual void | RemoveChild (GUIComponent child) |
GUIComponent | FindChild (Func< GUIComponent, bool > predicate, bool recursive=false) |
GUIComponent | FindChild (object userData, bool recursive=false) |
IEnumerable< GUIComponent > | FindChildren (object userData) |
IEnumerable< GUIComponent > | FindChildren (Func< GUIComponent, bool > predicate) |
virtual void | ClearChildren () |
void | SetAsFirstChild () |
void | SetAsLastChild () |
virtual void | AddToGUIUpdateList (bool ignoreChildren=false, int order=0) |
void | RemoveFromGUIUpdateList (bool alsoChildren=true) |
void | UpdateAuto (float deltaTime) |
Only GUI should call this method. Auto updating follows the order of GUI update list. This order can be tweaked by changing the UpdateOrder property. More... | |
void | UpdateManually (float deltaTime, bool alsoChildren=false, bool recursive=true) |
By default, all the gui elements are updated automatically in the same order they appear on the update list. More... | |
virtual void | ForceLayoutRecalculation () |
void | ForceUpdate () |
void | UpdateChildren (float deltaTime, bool recursive) |
Updates all the children manually. More... | |
void | DrawAuto (SpriteBatch spriteBatch) |
Only GUI should call this method. Auto drawing follows the order of GUI update list. This order can be tweaked by changing the UpdateOrder property. More... | |
virtual void | DrawManually (SpriteBatch spriteBatch, bool alsoChildren=false, bool recursive=true) |
By default, all the gui elements are drawn automatically in the same order they appear on the update list. More... | |
virtual void | DrawChildren (SpriteBatch spriteBatch, bool recursive) |
Draws all the children manually. More... | |
void | DrawToolTip (SpriteBatch spriteBatch) |
Creates and draws a tooltip. More... | |
virtual void | Flash (Color? color=null, float flashDuration=1.5f, bool useRectangleFlash=false, bool useCircularFlash=false, Vector2? flashRectInflate=null) |
void | ImmediateFlash (Color? color=null) |
void | FadeOut (float duration, bool removeAfter, float wait=0.0f, Action onRemove=null) |
void | FadeIn (float wait, float duration) |
void | SlideIn (float wait, float duration, int amount, SlideDirection direction) |
void | SlideOut (float duration, int amount, SlideDirection direction) |
void | Pulsate (Vector2 startScale, Vector2 endScale, float duration) |
virtual void | ApplyStyle (GUIComponentStyle style) |
void | ApplySizeRestrictions (GUIComponentStyle style) |
Static Public Member Functions | |
static void | DrawToolTip (SpriteBatch spriteBatch, RichString toolTip, Vector2 pos) |
static void | DrawToolTip (SpriteBatch spriteBatch, RichString toolTip, Rectangle targetElement, Anchor anchor=Anchor.BottomCenter, Pivot pivot=Pivot.TopLeft) |
static GUIComponent | FromXML (ContentXElement element, RectTransform parent) |
Public Attributes | |
CursorState | HoverCursor = CursorState.Default |
bool | AlwaysOverrideCursor = false |
SecondaryButtonDownHandler | OnSecondaryClicked |
Action< GUIComponent > | OnAddedToGUIUpdateList |
bool | CanBeFocused |
Dictionary< ComponentState, List< UISprite > > | sprites |
SpriteEffects | SpriteEffects |
object | UserData |
bool | ExternalHighlight = false |
Protected Member Functions | |
Rectangle | ClampRect (Rectangle r) |
GUIComponent (string style, RectTransform rectT) | |
This is the new constructor. More... | |
GUIComponent (string style) | |
virtual void | Update (float deltaTime) |
virtual Color | GetColor (ComponentState state) |
Color | GetBlendedColor (Color targetColor, ref Color blendedColor) |
virtual void | Draw (SpriteBatch spriteBatch) |
virtual void | SetAlpha (float a) |
Protected Attributes | |
Alignment | alignment |
Identifier[] | styleHierarchy |
Color | color |
Color | hoverColor |
Color | selectedColor |
Color | disabledColor |
Color | pressedColor |
Color | flashColor |
float | flashDuration = 1.5f |
float | flashTimer |
bool | enabled |
ComponentState | _state |
ComponentState | _previousState |
bool | isSelected |
Color | _currentColor |
Properties | |
GUIComponent | Parent [get] |
IEnumerable< GUIComponent > | Children [get] |
bool | AutoUpdate = true [get, set] |
bool | AutoDraw = true [get, set] |
int | UpdateOrder [get, set] |
bool | Bounce [get, set] |
bool | GlowOnSelect [get, set] |
Vector2 | UVOffset [get, set] |
virtual float | FlashTimer [get] |
bool | IgnoreLayoutGroups [get, set] |
virtual GUIFont | Font [get, set] |
virtual RichString | ToolTip [get, set] |
GUIComponentStyle | Style [get] |
bool | Visible [get, set] |
virtual bool | Enabled [get, set] |
Vector2 | Center [get] |
virtual Rectangle | Rect [get] |
bool | ClampMouseRectToParent = false [get, set] |
virtual Rectangle? | MouseRect [get] |
virtual Color | OutlineColor [get, set] |
virtual bool | Selected [get, set] |
virtual ComponentState | State [get, set] |
int | CountChildren [get] |
Color | DefaultColor [get, set] |
Currently only used for the fade effect in GUIListBox, should be set to the same value as Color but only assigned once More... | |
virtual Color | Color [get, set] |
virtual Color | HoverColor [get, set] |
virtual Color | SelectedColor [get, set] |
virtual Color | DisabledColor [get, set] |
virtual Color | PressedColor [get, set] |
TransitionMode | ColorTransition [get] |
SpriteFallBackState | FallBackState [get] |
float | SpriteCrossFadeTime [get] |
float | ColorCrossFadeTime [get] |
virtual bool | PlaySoundOnSelect = false [get, set] |
RectTransform | RectTransform [get] |
Definition at line 18 of file GUIComponent.cs.
|
strong |
Enumerator | |
---|---|
None | |
Hover | |
Pressed | |
Selected | |
HoverSelected |
Definition at line 162 of file GUIComponent.cs.
|
protected |
This is the new constructor.
Definition at line 407 of file GUIComponent.cs.
|
protected |
Definition at line 419 of file GUIComponent.cs.
|
virtual |
Reimplemented in Barotrauma.GUIScissorComponent, Barotrauma.GUIListBox, and Barotrauma.GUIDropDown.
Definition at line 430 of file GUIComponent.cs.
void Barotrauma.GUIComponent.ApplySizeRestrictions | ( | GUIComponentStyle | style | ) |
Definition at line 970 of file GUIComponent.cs.
|
virtual |
Reimplemented in Barotrauma.GUIButton, and Barotrauma.GUITextBlock.
Definition at line 945 of file GUIComponent.cs.
|
protected |
Definition at line 251 of file GUIComponent.cs.
|
virtual |
Reimplemented in Barotrauma.GUIListBox, and Barotrauma.GUIDropDown.
Definition at line 135 of file GUIComponent.cs.
|
protectedvirtual |
Reimplemented in Barotrauma.SlideshowPlayer, Barotrauma.GUITextBlock, Barotrauma.GUIScissorComponent, Barotrauma.GUIProgressBar, Barotrauma.GUIListBox, Barotrauma.GUIImage, Barotrauma.GUIFrame, Barotrauma.GUICustomComponent, Barotrauma.GUIColorPicker, and Barotrauma.GUIButton.
Definition at line 618 of file GUIComponent.cs.
void Barotrauma.GUIComponent.DrawAuto | ( | SpriteBatch | spriteBatch | ) |
Only GUI should call this method. Auto drawing follows the order of GUI update list. This order can be tweaked by changing the UpdateOrder property.
Definition at line 561 of file GUIComponent.cs.
|
virtual |
Draws all the children manually.
Reimplemented in Barotrauma.GUIScissorComponent, and Barotrauma.GUIListBox.
Definition at line 587 of file GUIComponent.cs.
|
virtual |
By default, all the gui elements are drawn automatically in the same order they appear on the update list.
Reimplemented in Barotrauma.GUIDropDown.
Definition at line 572 of file GUIComponent.cs.
void Barotrauma.GUIComponent.DrawToolTip | ( | SpriteBatch | spriteBatch | ) |
Creates and draws a tooltip.
Definition at line 732 of file GUIComponent.cs.
|
static |
Definition at line 761 of file GUIComponent.cs.
|
static |
Definition at line 738 of file GUIComponent.cs.
void Barotrauma.GUIComponent.FadeIn | ( | float | wait, |
float | duration | ||
) |
Definition at line 833 of file GUIComponent.cs.
void Barotrauma.GUIComponent.FadeOut | ( | float | duration, |
bool | removeAfter, | ||
float | wait = 0.0f , |
||
Action | onRemove = null |
||
) |
Definition at line 828 of file GUIComponent.cs.
GUIComponent Barotrauma.GUIComponent.FindChild | ( | Func< GUIComponent, bool > | predicate, |
bool | recursive = false |
||
) |
Definition at line 96 of file GUIComponent.cs.
GUIComponent Barotrauma.GUIComponent.FindChild | ( | object | userData, |
bool | recursive = false |
||
) |
Definition at line 110 of file GUIComponent.cs.
IEnumerable<GUIComponent> Barotrauma.GUIComponent.FindChildren | ( | Func< GUIComponent, bool > | predicate | ) |
Definition at line 130 of file GUIComponent.cs.
IEnumerable<GUIComponent> Barotrauma.GUIComponent.FindChildren | ( | object | userData | ) |
Definition at line 125 of file GUIComponent.cs.
|
virtual |
Reimplemented in Barotrauma.GUITextBox, and Barotrauma.GUIButton.
Definition at line 811 of file GUIComponent.cs.
|
virtual |
Reimplemented in Barotrauma.GUIListBox.
Definition at line 531 of file GUIComponent.cs.
void Barotrauma.GUIComponent.ForceUpdate | ( | ) |
|
static |
Definition at line 986 of file GUIComponent.cs.
IEnumerable<GUIComponent> Barotrauma.GUIComponent.GetAllChildren | ( | ) |
Returns all child elements in the hierarchy.
Definition at line 50 of file GUIComponent.cs.
IEnumerable<T> Barotrauma.GUIComponent.GetAllChildren< T > | ( | ) |
T | : | GUIComponent |
Definition at line 42 of file GUIComponent.cs.
T Barotrauma.GUIComponent.GetAnyChild< T > | ( | ) |
T | : | GUIComponent |
Definition at line 37 of file GUIComponent.cs.
|
protected |
Definition at line 612 of file GUIComponent.cs.
GUIComponent Barotrauma.GUIComponent.GetChild | ( | int | index | ) |
Definition at line 55 of file GUIComponent.cs.
T Barotrauma.GUIComponent.GetChild< T > | ( | ) |
T | : | GUIComponent |
Definition at line 32 of file GUIComponent.cs.
GUIComponent Barotrauma.GUIComponent.GetChildByUserData | ( | object | obj | ) |
Definition at line 67 of file GUIComponent.cs.
int Barotrauma.GUIComponent.GetChildIndex | ( | GUIComponent | child | ) |
Definition at line 61 of file GUIComponent.cs.
|
protectedvirtual |
Definition at line 597 of file GUIComponent.cs.
void Barotrauma.GUIComponent.ImmediateFlash | ( | Color? | color = null | ) |
Definition at line 821 of file GUIComponent.cs.
bool Barotrauma.GUIComponent.IsChildOf | ( | GUIComponent | component, |
bool | recursive = true |
||
) |
Definition at line 82 of file GUIComponent.cs.
bool Barotrauma.GUIComponent.IsParentOf | ( | GUIComponent | component, |
bool | recursive = true |
||
) |
Definition at line 76 of file GUIComponent.cs.
void Barotrauma.GUIComponent.Pulsate | ( | Vector2 | startScale, |
Vector2 | endScale, | ||
float | duration | ||
) |
Definition at line 923 of file GUIComponent.cs.
|
virtual |
Reimplemented in Barotrauma.GUIListBox.
Definition at line 88 of file GUIComponent.cs.
void Barotrauma.GUIComponent.RemoveFromGUIUpdateList | ( | bool | alsoChildren = true | ) |
Definition at line 443 of file GUIComponent.cs.
delegate bool Barotrauma.GUIComponent.SecondaryButtonDownHandler | ( | GUIComponent | component, |
object | userData | ||
) |
|
protectedvirtual |
Reimplemented in Barotrauma.GUITextBlock.
Definition at line 805 of file GUIComponent.cs.
void Barotrauma.GUIComponent.SetAsFirstChild | ( | ) |
Definition at line 140 of file GUIComponent.cs.
void Barotrauma.GUIComponent.SetAsLastChild | ( | ) |
Definition at line 145 of file GUIComponent.cs.
void Barotrauma.GUIComponent.SlideIn | ( | float | wait, |
float | duration, | ||
int | amount, | ||
SlideDirection | direction | ||
) |
Definition at line 839 of file GUIComponent.cs.
void Barotrauma.GUIComponent.SlideOut | ( | float | duration, |
int | amount, | ||
SlideDirection | direction | ||
) |
Definition at line 852 of file GUIComponent.cs.
|
protectedvirtual |
Reimplemented in Barotrauma.SlideshowPlayer, Barotrauma.CreditsPlayer, Barotrauma.GUITickBox, Barotrauma.GUITextBox, Barotrauma.GUITextBlock, Barotrauma.GUIScrollBar, Barotrauma.GUIScissorComponent, Barotrauma.GUINumberInput, Barotrauma.GUIMessageBox, Barotrauma.GUIListBox, Barotrauma.GUILayoutGroup, Barotrauma.GUIDropDown, Barotrauma.GUIDragHandle, Barotrauma.GUICustomComponent, Barotrauma.GUIColorPicker, and Barotrauma.GUIButton.
Definition at line 474 of file GUIComponent.cs.
void Barotrauma.GUIComponent.UpdateAuto | ( | float | deltaTime | ) |
Only GUI should call this method. Auto updating follows the order of GUI update list. This order can be tweaked by changing the UpdateOrder property.
Definition at line 451 of file GUIComponent.cs.
void Barotrauma.GUIComponent.UpdateChildren | ( | float | deltaTime, |
bool | recursive | ||
) |
Updates all the children manually.
Definition at line 548 of file GUIComponent.cs.
void Barotrauma.GUIComponent.UpdateManually | ( | float | deltaTime, |
bool | alsoChildren = false , |
||
bool | recursive = true |
||
) |
By default, all the gui elements are updated automatically in the same order they appear on the update list.
Definition at line 462 of file GUIComponent.cs.
|
protected |
Definition at line 595 of file GUIComponent.cs.
|
protected |
Definition at line 306 of file GUIComponent.cs.
|
protected |
Definition at line 305 of file GUIComponent.cs.
|
protected |
Definition at line 164 of file GUIComponent.cs.
bool Barotrauma.GUIComponent.AlwaysOverrideCursor = false |
Definition at line 25 of file GUIComponent.cs.
bool Barotrauma.GUIComponent.CanBeFocused |
Definition at line 168 of file GUIComponent.cs.
|
protected |
Definition at line 170 of file GUIComponent.cs.
|
protected |
Definition at line 173 of file GUIComponent.cs.
|
protected |
Definition at line 237 of file GUIComponent.cs.
bool Barotrauma.GUIComponent.ExternalHighlight = false |
Definition at line 385 of file GUIComponent.cs.
|
protected |
Definition at line 182 of file GUIComponent.cs.
|
protected |
Definition at line 183 of file GUIComponent.cs.
|
protected |
Definition at line 191 of file GUIComponent.cs.
|
protected |
Definition at line 171 of file GUIComponent.cs.
CursorState Barotrauma.GUIComponent.HoverCursor = CursorState.Default |
Definition at line 23 of file GUIComponent.cs.
|
protected |
Definition at line 307 of file GUIComponent.cs.
Action<GUIComponent> Barotrauma.GUIComponent.OnAddedToGUIUpdateList |
Definition at line 160 of file GUIComponent.cs.
SecondaryButtonDownHandler Barotrauma.GUIComponent.OnSecondaryClicked |
Definition at line 28 of file GUIComponent.cs.
|
protected |
Definition at line 174 of file GUIComponent.cs.
|
protected |
Definition at line 172 of file GUIComponent.cs.
SpriteEffects Barotrauma.GUIComponent.SpriteEffects |
Definition at line 301 of file GUIComponent.cs.
Dictionary<ComponentState, List<UISprite> > Barotrauma.GUIComponent.sprites |
Definition at line 299 of file GUIComponent.cs.
|
protected |
Definition at line 166 of file GUIComponent.cs.
object Barotrauma.GUIComponent.UserData |
Definition at line 336 of file GUIComponent.cs.
|
getset |
Definition at line 152 of file GUIComponent.cs.
|
getset |
Definition at line 151 of file GUIComponent.cs.
|
getset |
Definition at line 155 of file GUIComponent.cs.
|
get |
Definition at line 246 of file GUIComponent.cs.
|
get |
Definition at line 30 of file GUIComponent.cs.
|
getset |
Definition at line 287 of file GUIComponent.cs.
|
getset |
Definition at line 348 of file GUIComponent.cs.
|
get |
Definition at line 380 of file GUIComponent.cs.
|
get |
Definition at line 377 of file GUIComponent.cs.
|
get |
Definition at line 338 of file GUIComponent.cs.
|
getset |
Currently only used for the fade effect in GUIListBox, should be set to the same value as Color but only assigned once
Definition at line 346 of file GUIComponent.cs.
|
getset |
Definition at line 365 of file GUIComponent.cs.
|
getset |
Definition at line 238 of file GUIComponent.cs.
|
get |
Definition at line 378 of file GUIComponent.cs.
|
get |
Definition at line 187 of file GUIComponent.cs.
|
getset |
Definition at line 209 of file GUIComponent.cs.
|
getset |
Definition at line 176 of file GUIComponent.cs.
|
getset |
Definition at line 354 of file GUIComponent.cs.
|
getset |
Definition at line 195 of file GUIComponent.cs.
|
get |
Definition at line 289 of file GUIComponent.cs.
|
getset |
Definition at line 303 of file GUIComponent.cs.
|
get |
Definition at line 21 of file GUIComponent.cs.
|
getset |
Definition at line 387 of file GUIComponent.cs.
|
getset |
Definition at line 371 of file GUIComponent.cs.
|
get |
Definition at line 282 of file GUIComponent.cs.
|
get |
Definition at line 390 of file GUIComponent.cs.
|
getset |
Definition at line 308 of file GUIComponent.cs.
|
getset |
Definition at line 360 of file GUIComponent.cs.
|
get |
Definition at line 379 of file GUIComponent.cs.
|
getset |
Definition at line 320 of file GUIComponent.cs.
|
get |
Definition at line 228 of file GUIComponent.cs.
|
getset |
Definition at line 216 of file GUIComponent.cs.
|
getset |
Definition at line 153 of file GUIComponent.cs.
|
getset |
Definition at line 178 of file GUIComponent.cs.
|
getset |
Definition at line 231 of file GUIComponent.cs.