tModLoader v2022.09
A mod to make and play Terraria mods
Terraria.ModLoader.Config.UI.PrimitiveRangeElement< T > Class Template Reference

Inherits Terraria.ModLoader.Config.UI.RangeElement.

Public Member Functions

override void OnBind ()
- Public Member Functions inherited from Terraria.ModLoader.Config.UI.RangeElement
float DrawValueBar (SpriteBatch sb, float scale, float perc, int lockState=0, Utils.ColorLerpMethod colorMethod=null)
override void OnBind ()
- Public Member Functions inherited from Terraria.ModLoader.Config.UI.ConfigElement< T >
void Bind (PropertyFieldWrapper memberInfo, object item, IList array, int index)
 Bind must always be called after the ctor and serves to facilitate a convenient inheritance workflow for custom ConfigElemets from mods.
virtual void OnBind ()
- Public Member Functions inherited from Terraria.UI.UIElement
void Activate ()
void Append (UIElement element)
virtual void Click (UIMouseEvent evt)
virtual int CompareTo (object obj)
virtual bool ContainsPoint (Vector2 point)
void CopyStyle (UIElement element)
void Deactivate ()
virtual void DoubleClick (UIMouseEvent evt)
virtual void Draw (SpriteBatch spriteBatch)
void DrawDebugHitbox (BasicDebugDrawer drawer, float colorIntensity=0f)
delegate void ElementEvent (UIElement affectedElement)
virtual void ExecuteRecursively (UIElementAction action)
Rectangle GetClippingRectangle (SpriteBatch spriteBatch)
CalculatedStyle GetDimensions ()
UIElement GetElementAt (Vector2 point)
CalculatedStyle GetInnerDimensions ()
CalculatedStyle GetOuterDimensions ()
bool GetSnapPoint (out SnapPoint point)
virtual List< SnapPointGetSnapPoints ()
virtual Rectangle GetViewCullingArea ()
bool HasChild (UIElement child)
void Initialize ()
virtual void MiddleClick (UIMouseEvent evt)
virtual void MiddleDoubleClick (UIMouseEvent evt)
virtual void MiddleMouseDown (UIMouseEvent evt)
virtual void MiddleMouseUp (UIMouseEvent evt)
virtual void MouseDown (UIMouseEvent evt)
delegate void MouseEvent (UIMouseEvent evt, UIElement listeningElement)
virtual void MouseOut (UIMouseEvent evt)
virtual void MouseOver (UIMouseEvent evt)
virtual void MouseUp (UIMouseEvent evt)
virtual void OnActivate ()
virtual void OnDeactivate ()
virtual void OnInitialize ()
virtual void Recalculate ()
virtual void RecalculateChildren ()
void Remove ()
void RemoveAllChildren ()
void RemoveChild (UIElement child)
virtual void RightClick (UIMouseEvent evt)
virtual void RightDoubleClick (UIMouseEvent evt)
virtual void RightMouseDown (UIMouseEvent evt)
virtual void RightMouseUp (UIMouseEvent evt)
virtual void ScrollWheel (UIScrollWheelEvent evt)
delegate void ScrollWheelEvent (UIScrollWheelEvent evt, UIElement listeningElement)
void SetPadding (float pixels)
void SetSnapPoint (string name, int id, Vector2? anchor=null, Vector2? offset=null)
delegate void UIElementAction (UIElement element)
virtual void Update (GameTime gameTime)
virtual void XButton1Click (UIMouseEvent evt)
virtual void XButton1DoubleClick (UIMouseEvent evt)
virtual void XButton1MouseDown (UIMouseEvent evt)
virtual void XButton1MouseUp (UIMouseEvent evt)
virtual void XButton2Click (UIMouseEvent evt)
virtual void XButton2DoubleClick (UIMouseEvent evt)
virtual void XButton2MouseDown (UIMouseEvent evt)
virtual void XButton2MouseUp (UIMouseEvent evt)

Protected Member Functions

virtual T GetValue ()
virtual void SetValue (object value)
- Protected Member Functions inherited from Terraria.ModLoader.Config.UI.RangeElement
override void DrawSelf (SpriteBatch spriteBatch)
- Protected Member Functions inherited from Terraria.ModLoader.Config.UI.ConfigElement< T >
override void DrawSelf (SpriteBatch spriteBatch)
virtual object GetObject ()
virtual void SetObject (object value)
- Protected Member Functions inherited from Terraria.UI.UIElement
virtual void DrawChildren (SpriteBatch spriteBatch)
virtual void DrawSelf (SpriteBatch spriteBatch)


Increment [get, set]
Max [get, set]
Min [get, set]
IList< T > TList [get, set]
- Properties inherited from Terraria.ModLoader.Config.UI.RangeElement
Utils.ColorLerpMethod ColorMethod [get, set]
abstract int NumberTicks [get]
abstract float Proportion [get, set]
Color SliderColor = Color.White [get, set]
abstract float TickIncrement [get]
- Properties inherited from Terraria.ModLoader.Config.UI.ConfigElement< T >
Asset< Texture2D > CollapsedTexture = UICommon.ButtonCollapsedTexture [get, set]
Asset< Texture2D > DeleteTexture = Main.Assets.Request<Texture2D>("Images/UI/ButtonDelete") [get, set]
bool DrawLabel = true [get, set]
Asset< Texture2D > ExpandedTexture = UICommon.ButtonExpandedTexture [get, set]
int Index [get, set]
object Item [get, set]
IList List [get, set]
PropertyFieldWrapper MemberInfo [get, set]
bool NullAllowed [get, set]
Asset< Texture2D > PlayTexture = Main.Assets.Request<Texture2D>("Images/UI/ButtonPlay") [get, set]
Asset< Texture2D > PlusTexture = UICommon.ButtonPlusTexture [get, set]
Func< string > TooltipFunction [get, set]
Asset< Texture2D > UpDownTexture = UICommon.ButtonUpDownTexture [get, set]
virtual T Value [get, set]
- Properties inherited from Terraria.UI.UIElement
IEnumerable< UIElementChildren [get]
bool IsMouseHovering [get]
UIElement Parent [get]
int UniqueId [get]

Additional Inherited Members

- Static Public Member Functions inherited from Terraria.ModLoader.Config.UI.ConfigElement< T >
static void DrawPanel2 (SpriteBatch spriteBatch, Vector2 position, Texture2D texture, float width, float height, Color color)
- Public Attributes inherited from Terraria.UI.UIElement
float HAlign
StyleDimension Height
bool IgnoresMouseInteraction
StyleDimension Left
float MarginBottom
float MarginLeft
float MarginRight
float MarginTop
StyleDimension MaxHeight = StyleDimension.Fill
StyleDimension MaxWidth = StyleDimension.Fill
StyleDimension MinHeight = StyleDimension.Empty
StyleDimension MinWidth = StyleDimension.Empty
bool OverflowHidden
SamplerState OverrideSamplerState
float PaddingBottom
float PaddingLeft
float PaddingRight
float PaddingTop
StyleDimension Top
bool UseImmediateMode
float VAlign
StyleDimension Width
- Protected Attributes inherited from Terraria.ModLoader.Config.UI.ConfigElement< T >
BackgroundColorAttribute BackgroundColorAttribute
IncrementAttribute IncrementAttribute
JsonDefaultValueAttribute JsonDefaultValueAttribute
LabelAttribute LabelAttribute
RangeAttribute RangeAttribute
TooltipAttribute TooltipAttribute
- Protected Attributes inherited from Terraria.UI.UIElement
readonly List< UIElementElements = new List<UIElement>()
- Events inherited from Terraria.UI.UIElement
MouseEvent OnClick
MouseEvent OnDoubleClick
MouseEvent OnMiddleClick
MouseEvent OnMiddleDoubleClick
MouseEvent OnMiddleMouseDown
MouseEvent OnMiddleMouseUp
MouseEvent OnMouseDown
MouseEvent OnMouseOut
MouseEvent OnMouseOver
MouseEvent OnMouseUp
MouseEvent OnRightClick
MouseEvent OnRightDoubleClick
MouseEvent OnRightMouseDown
MouseEvent OnRightMouseUp
ScrollWheelEvent OnScrollWheel
ElementEvent OnUpdate
MouseEvent OnXButton1Click
MouseEvent OnXButton1DoubleClick
MouseEvent OnXButton1MouseDown
MouseEvent OnXButton1MouseUp
MouseEvent OnXButton2Click
MouseEvent OnXButton2DoubleClick
MouseEvent OnXButton2MouseDown
MouseEvent OnXButton2MouseUp

Member Function Documentation

◆ OnBind()