Barotrauma Client Doc
Barotrauma.GUIScrollBar Class Reference
Inheritance diagram for Barotrauma.GUIScrollBar:
Barotrauma.GUIComponent

Public Member Functions

delegate bool OnMovedHandler (GUIScrollBar scrollBar, float barScroll)
 
delegate float ScrollConversion (GUIScrollBar scrollBar, float f)
 
 GUIScrollBar (RectTransform rectT, float barSize=1, Color? color=null, string style="", bool? isHorizontal=null)
 
void MoveButton (Vector2 moveAmount)
 
- Public Member Functions inherited from Barotrauma.GUIComponent
delegate bool SecondaryButtonDownHandler (GUIComponent component, object userData)
 
GetChild< T > ()
 
GetAnyChild< T > ()
 
IEnumerable< T > GetAllChildren< T > ()
 
IEnumerable< GUIComponentGetAllChildren ()
 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< GUIComponentFindChildren (object userData)
 
IEnumerable< GUIComponentFindChildren (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)
 

Public Attributes

OnMovedHandler OnMoved
 
OnMovedHandler OnReleased
 
bool IsBooleanSwitch
 
ScrollConversion ScrollToValue = null
 
ScrollConversion ValueToScroll = null
 
float UnclampedBarSize
 ListBoxes with lots of content in them clamp the size of the scrollbar above a certain minimum size; this is the relative bar size without the clamping applied. More...
 
- Public Attributes inherited from Barotrauma.GUIComponent
CursorState HoverCursor = CursorState.Default
 
bool AlwaysOverrideCursor = false
 
SecondaryButtonDownHandler OnSecondaryClicked
 
Action< GUIComponentOnAddedToGUIUpdateList
 
bool CanBeFocused
 
Dictionary< ComponentState, List< UISprite > > sprites
 
SpriteEffects SpriteEffects
 
object UserData
 
bool ExternalHighlight = false
 

Protected Member Functions

override void Update (float deltaTime)
 
- 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 Draw (SpriteBatch spriteBatch)
 
virtual void SetAlpha (float a)
 

Properties

static GUIScrollBar DraggingBar [get]
 
GUIFrame Frame [get]
 
GUIButton Bar [get]
 
override RichString ToolTip [get, set]
 
float MinValue [get, set]
 
float MaxValue [get, set]
 
bool IsHorizontal [get]
 
override bool Enabled [get, set]
 
Vector4? Padding [get]
 
Vector2 Range [get, set]
 
float BarScrollValue [get, set]
 
float?? BarScroll [get, set]
 
float Step [get, set]
 
float StepValue [get, set]
 
float BarSize [get, set]
 
- Properties inherited from Barotrauma.GUIComponent
GUIComponent Parent [get]
 
IEnumerable< GUIComponentChildren [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

- Public Types inherited from Barotrauma.GUIComponent
enum class  ComponentState {
  None , Hover , Pressed , Selected ,
  HoverSelected
}
 
- 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)
 
- 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
 

Detailed Description

Definition at line 7 of file GUIScrollBar.cs.

Constructor & Destructor Documentation

◆ GUIScrollBar()

Barotrauma.GUIScrollBar.GUIScrollBar ( RectTransform  rectT,
float  barSize = 1,
Color color = null,
string  style = "",
bool?  isHorizontal = null 
)

Definition at line 200 of file GUIScrollBar.cs.

Member Function Documentation

◆ MoveButton()

void Barotrauma.GUIScrollBar.MoveButton ( Vector2  moveAmount)

Definition at line 330 of file GUIScrollBar.cs.

◆ OnMovedHandler()

delegate bool Barotrauma.GUIScrollBar.OnMovedHandler ( GUIScrollBar  scrollBar,
float  barScroll 
)

◆ ScrollConversion()

delegate float Barotrauma.GUIScrollBar.ScrollConversion ( GUIScrollBar  scrollBar,
float  f 
)

◆ Update()

override void Barotrauma.GUIScrollBar.Update ( float  deltaTime)
protectedvirtual

Reimplemented from Barotrauma.GUIComponent.

Definition at line 246 of file GUIScrollBar.cs.

Member Data Documentation

◆ IsBooleanSwitch

bool Barotrauma.GUIScrollBar.IsBooleanSwitch

Definition at line 29 of file GUIScrollBar.cs.

◆ OnMoved

OnMovedHandler Barotrauma.GUIScrollBar.OnMoved

Definition at line 26 of file GUIScrollBar.cs.

◆ OnReleased

OnMovedHandler Barotrauma.GUIScrollBar.OnReleased

Definition at line 27 of file GUIScrollBar.cs.

◆ ScrollToValue

ScrollConversion Barotrauma.GUIScrollBar.ScrollToValue = null

Definition at line 115 of file GUIScrollBar.cs.

◆ UnclampedBarSize

float Barotrauma.GUIScrollBar.UnclampedBarSize

ListBoxes with lots of content in them clamp the size of the scrollbar above a certain minimum size; this is the relative bar size without the clamping applied.

Definition at line 188 of file GUIScrollBar.cs.

◆ ValueToScroll

ScrollConversion Barotrauma.GUIScrollBar.ValueToScroll = null

Definition at line 116 of file GUIScrollBar.cs.

Property Documentation

◆ Bar

GUIButton Barotrauma.GUIScrollBar.Bar
get

Definition at line 17 of file GUIScrollBar.cs.

◆ BarScroll

float?? Barotrauma.GUIScrollBar.BarScroll
getset

Definition at line 132 of file GUIScrollBar.cs.

◆ BarScrollValue

float Barotrauma.GUIScrollBar.BarScrollValue
getset

Definition at line 118 of file GUIScrollBar.cs.

◆ BarSize

float Barotrauma.GUIScrollBar.BarSize
getset

Definition at line 190 of file GUIScrollBar.cs.

◆ DraggingBar

GUIScrollBar Barotrauma.GUIScrollBar.DraggingBar
staticget

Definition at line 9 of file GUIScrollBar.cs.

◆ Enabled

override bool Barotrauma.GUIScrollBar.Enabled
getset

Definition at line 75 of file GUIScrollBar.cs.

◆ Frame

GUIFrame Barotrauma.GUIScrollBar.Frame
get

Definition at line 16 of file GUIScrollBar.cs.

◆ IsHorizontal

bool Barotrauma.GUIScrollBar.IsHorizontal
get

Definition at line 64 of file GUIScrollBar.cs.

◆ MaxValue

float Barotrauma.GUIScrollBar.MaxValue
getset

Definition at line 54 of file GUIScrollBar.cs.

◆ MinValue

float Barotrauma.GUIScrollBar.MinValue
getset

Definition at line 43 of file GUIScrollBar.cs.

◆ Padding

Vector4? Barotrauma.GUIScrollBar.Padding
get

Definition at line 90 of file GUIScrollBar.cs.

◆ Range

Vector2 Barotrauma.GUIScrollBar.Range
getset

Definition at line 100 of file GUIScrollBar.cs.

◆ Step

float Barotrauma.GUIScrollBar.Step
getset

Definition at line 161 of file GUIScrollBar.cs.

◆ StepValue

float Barotrauma.GUIScrollBar.StepValue
getset

Definition at line 173 of file GUIScrollBar.cs.

◆ ToolTip

override RichString Barotrauma.GUIScrollBar.ToolTip
getset

Definition at line 31 of file GUIScrollBar.cs.