Barotrauma Client Doc
|
Public Types | |
enum class | Type { Default , InGame , Vote , Hint , Tutorial , Warning } |
Public Types inherited from Barotrauma.GUIComponent | |
enum class | ComponentState { None , Hover , Pressed , Selected , HoverSelected } |
Public Member Functions | |
GUIMessageBox (LocalizedString headerText, LocalizedString text, Vector2? relativeSize=null, Point? minSize=null, Type type=Type.Default) | |
GUIMessageBox (RichString headerText, RichString text, LocalizedString[] buttons, Vector2? relativeSize=null, Point? minSize=null, Alignment textAlignment=Alignment.TopLeft, Type type=Type.Default, string tag="", Sprite icon=null, string iconStyle="", Sprite backgroundIcon=null, Func< bool > autoCloseCondition=null, bool hideCloseButton=false) | |
GUIMessageBox (Identifier hintIdentifier, LocalizedString text, Sprite icon) | |
Use to create a message box of Hint type More... | |
void | SetBackgroundIcon (Sprite icon) |
void | Close () |
bool | Close (GUIButton button, object obj) |
void | AddButton (RectTransform rectT, string text, GUIButton.OnClickedHandler onClick) |
Parent does not matter. It's overridden. More... | |
Public Member Functions inherited from Barotrauma.GUIFrame | |
GUIFrame (RectTransform rectT, string style="", Color? color=null) | |
Public Member Functions inherited from Barotrauma.GUIComponent | |
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 | AddActiveToGUIUpdateList () |
static void | CloseAll () |
static void | Close (Identifier tag) |
static void | Close (string tag) |
static GUIMessageBox | CreateLoadingBox (LocalizedString text,(LocalizedString Label, Action< GUIMessageBox > Action)[] buttons=null, Vector2? relativeSize=null) |
Static Public Member Functions inherited from Barotrauma.GUIComponent | |
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 | |
bool | DisplayInLoadingScreens |
Vector2 | DraggingPosition = Vector2.Zero |
bool | AutoClose |
Close the message box automatically after enough time has passed (inGameCloseTime) More... | |
Public Attributes inherited from Barotrauma.GUIComponent | |
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 |
Static Public Attributes | |
static readonly List< GUIComponent > | MessageBoxes = new List<GUIComponent>() |
Protected Member Functions | |
override void | Update (float deltaTime) |
Protected Member Functions inherited from Barotrauma.GUIFrame | |
override void | Draw (SpriteBatch spriteBatch) |
Protected Member Functions inherited from Barotrauma.GUIComponent | |
Rectangle | ClampRect (Rectangle r) |
GUIComponent (string style, RectTransform rectT) | |
This is the new constructor. More... | |
GUIComponent (string style) | |
virtual Color | GetColor (ComponentState state) |
Color | GetBlendedColor (Color targetColor, ref Color blendedColor) |
virtual void | SetAlpha (float a) |
Properties | |
List< GUIButton > | Buttons = new List<GUIButton>() [get] |
GUILayoutGroup | Content [get] |
GUIFrame | InnerFrame [get] |
GUITextBlock | Header [get] |
GUITextBlock | Text [get] |
Identifier | Tag [get] |
bool | Closed [get] |
GUIImage | Icon [get] |
Color? | IconColor [get, set] |
bool | Draggable [get, set] |
GUIImage | BackgroundIcon [get] |
bool | FlashOnAutoCloseCondition [get, set] |
Action | OnEnterPressed [get, set] |
Type | MessageBoxType [get] |
static GUIComponent | VisibleBox [get] |
Properties inherited from Barotrauma.GUIFrame | |
float | OutlineThickness [get, set] |
Properties inherited from Barotrauma.GUIComponent | |
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] |
Additional Inherited Members | |
Protected Attributes inherited from Barotrauma.GUIComponent | |
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 |
Definition at line 10 of file GUIMessageBox.cs.
|
strong |
Enumerator | |
---|---|
Default | |
InGame | |
Vote | |
Hint | |
Tutorial | |
Warning |
Definition at line 22 of file GUIMessageBox.cs.
Barotrauma.GUIMessageBox.GUIMessageBox | ( | LocalizedString | headerText, |
LocalizedString | text, | ||
Vector2? | relativeSize = null , |
||
Point? | minSize = null , |
||
Type | type = Type.Default |
||
) |
Definition at line 91 of file GUIMessageBox.cs.
Barotrauma.GUIMessageBox.GUIMessageBox | ( | RichString | headerText, |
RichString | text, | ||
LocalizedString[] | buttons, | ||
Vector2? | relativeSize = null , |
||
Point? | minSize = null , |
||
Alignment | textAlignment = Alignment.TopLeft , |
||
Type | type = Type.Default , |
||
string | tag = "" , |
||
Sprite | icon = null , |
||
string | iconStyle = "" , |
||
Sprite | backgroundIcon = null , |
||
Func< bool > | autoCloseCondition = null , |
||
bool | hideCloseButton = false |
||
) |
Definition at line 101 of file GUIMessageBox.cs.
Barotrauma.GUIMessageBox.GUIMessageBox | ( | Identifier | hintIdentifier, |
LocalizedString | text, | ||
Sprite | icon | ||
) |
Use to create a message box of Hint type
Definition at line 452 of file GUIMessageBox.cs.
|
static |
Definition at line 468 of file GUIMessageBox.cs.
void Barotrauma.GUIMessageBox.AddButton | ( | RectTransform | rectT, |
string | text, | ||
GUIButton.OnClickedHandler | onClick | ||
) |
Parent does not matter. It's overridden.
Definition at line 703 of file GUIMessageBox.cs.
void Barotrauma.GUIMessageBox.Close | ( | ) |
Definition at line 660 of file GUIMessageBox.cs.
bool Barotrauma.GUIMessageBox.Close | ( | GUIButton | button, |
object | obj | ||
) |
Definition at line 675 of file GUIMessageBox.cs.
|
static |
Definition at line 687 of file GUIMessageBox.cs.
|
static |
|
static |
Definition at line 682 of file GUIMessageBox.cs.
|
static |
Definition at line 709 of file GUIMessageBox.cs.
void Barotrauma.GUIMessageBox.SetBackgroundIcon | ( | Sprite | icon | ) |
Definition at line 506 of file GUIMessageBox.cs.
|
protectedvirtual |
Reimplemented from Barotrauma.GUIComponent.
Definition at line 524 of file GUIMessageBox.cs.
bool Barotrauma.GUIMessageBox.AutoClose |
Close the message box automatically after enough time has passed (inGameCloseTime)
Definition at line 69 of file GUIMessageBox.cs.
bool Barotrauma.GUIMessageBox.DisplayInLoadingScreens |
Definition at line 42 of file GUIMessageBox.cs.
Vector2 Barotrauma.GUIMessageBox.DraggingPosition = Vector2.Zero |
Definition at line 61 of file GUIMessageBox.cs.
|
static |
Definition at line 13 of file GUIMessageBox.cs.
|
get |
Definition at line 63 of file GUIMessageBox.cs.
Definition at line 34 of file GUIMessageBox.cs.
|
get |
Definition at line 40 of file GUIMessageBox.cs.
|
get |
Definition at line 35 of file GUIMessageBox.cs.
|
getset |
Definition at line 60 of file GUIMessageBox.cs.
|
getset |
Definition at line 83 of file GUIMessageBox.cs.
|
get |
Definition at line 37 of file GUIMessageBox.cs.
|
get |
Definition at line 44 of file GUIMessageBox.cs.
|
getset |
Definition at line 50 of file GUIMessageBox.cs.
|
get |
Definition at line 36 of file GUIMessageBox.cs.
|
get |
Definition at line 87 of file GUIMessageBox.cs.
|
getset |
Definition at line 85 of file GUIMessageBox.cs.
|
get |
Definition at line 39 of file GUIMessageBox.cs.
|
get |
Definition at line 38 of file GUIMessageBox.cs.
|
staticget |
Definition at line 89 of file GUIMessageBox.cs.