Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
Terraria.GameContent.UI.States.UIWorldCreation Class Reference

Public Member Functions

 UIWorldCreation ()
 
void ShowOptionDescription (UIMouseEvent evt, UIElement listeningElement)
 
void ClearOptionDescription (UIMouseEvent evt, UIElement listeningElement)
 
override void Draw (SpriteBatch spriteBatch)
 
delegate void MouseEvent (UIMouseEvent evt, UIElement listeningElement)
 
delegate void ScrollWheelEvent (UIScrollWheelEvent evt, UIElement listeningElement)
 
delegate void ElementEvent (UIElement affectedElement)
 
delegate void UIElementAction (UIElement element)
 
void SetSnapPoint (string name, int id, Vector2? anchor=null, Vector2? offset=null)
 
bool GetSnapPoint (out SnapPoint point)
 
virtual void ExecuteRecursively (UIElementAction action)
 
void Append (UIElement element)
 
void Remove ()
 
void RemoveChild (UIElement child)
 
void RemoveAllChildren ()
 
virtual void Update (GameTime gameTime)
 
Rectangle GetClippingRectangle (SpriteBatch spriteBatch)
 
virtual List< SnapPoint > GetSnapPoints ()
 
virtual void Recalculate ()
 
UIElement GetElementAt (Vector2 point)
 
virtual bool ContainsPoint (Vector2 point)
 
virtual Rectangle GetViewCullingArea ()
 
void SetPadding (float pixels)
 
virtual void RecalculateChildren ()
 
CalculatedStyle GetInnerDimensions ()
 
CalculatedStyle GetDimensions ()
 
CalculatedStyle GetOuterDimensions ()
 
void CopyStyle (UIElement element)
 
virtual void LeftMouseDown (UIMouseEvent evt)
 
virtual void LeftMouseUp (UIMouseEvent evt)
 
virtual void LeftClick (UIMouseEvent evt)
 
virtual void LeftDoubleClick (UIMouseEvent evt)
 
virtual void RightMouseDown (UIMouseEvent evt)
 
virtual void RightMouseUp (UIMouseEvent evt)
 
virtual void RightClick (UIMouseEvent evt)
 
virtual void RightDoubleClick (UIMouseEvent evt)
 
virtual void MouseOver (UIMouseEvent evt)
 
virtual void MouseOut (UIMouseEvent evt)
 
virtual void ScrollWheel (UIScrollWheelEvent evt)
 
void Activate ()
 
virtual void OnActivate ()
 
void DrawDebugHitbox (BasicDebugDrawer drawer, float colorIntensity=0f)
 
void Deactivate ()
 
virtual void OnDeactivate ()
 
void Initialize ()
 
virtual void OnInitialize ()
 
virtual int CompareTo (object obj)
 
int CompareTo (object? obj)
 
int CompareTo (T? other)
 

Static Public Member Functions

static void ProcessSpecialWorldSeeds (string processedSeed)
 

Public Attributes

StyleDimension Top
 
StyleDimension Left
 
StyleDimension Width
 
StyleDimension Height
 
StyleDimension MaxWidth = StyleDimension.Fill
 
StyleDimension MaxHeight = StyleDimension.Fill
 
StyleDimension MinWidth = StyleDimension.Empty
 
StyleDimension MinHeight = StyleDimension.Empty
 
bool IgnoresMouseInteraction
 
bool OverflowHidden
 
SamplerState OverrideSamplerState
 
float PaddingTop
 
float PaddingLeft
 
float PaddingRight
 
float PaddingBottom
 
float MarginTop
 
float MarginLeft
 
float MarginRight
 
float MarginBottom
 
float HAlign
 
float VAlign
 
bool UseImmediateMode
 

Static Public Attributes

const int MAX_NAME_LENGTH = 27
 
const int MAX_SEED_LENGTH = 40
 

Protected Member Functions

virtual void DrawSelf (SpriteBatch spriteBatch)
 
virtual void DrawChildren (SpriteBatch spriteBatch)
 

Protected Attributes

readonly List< UIElementElements = new List<UIElement>()
 

Properties

UIElement Parent [get, private set]
 
int UniqueId [get, private set]
 
IEnumerable< UIElementChildren [get]
 
bool IsMouseHovering [get, private set]
 

Events

MouseEvent OnLeftMouseDown
 
MouseEvent OnLeftMouseUp
 
MouseEvent OnLeftClick
 
MouseEvent OnLeftDoubleClick
 
MouseEvent OnRightMouseDown
 
MouseEvent OnRightMouseUp
 
MouseEvent OnRightClick
 
MouseEvent OnRightDoubleClick
 
MouseEvent OnMouseOver
 
MouseEvent OnMouseOut
 
ScrollWheelEvent OnScrollWheel
 
ElementEvent OnUpdate
 

Private Types

enum  WorldSizeId { Small , Medium , Large }
 
enum  WorldDifficultyId { Normal , Expert , Master , Creative }
 
enum  WorldEvilId { Random , Corruption , Crimson }
 

Private Member Functions

void BuildPage ()
 
void MakeInfoMenu (UIElement parentContainer)
 
void SetDefaultOptions ()
 
void AddDescriptionPanel (UIElement container, float accumulatedHeight, string tagGroup)
 
void AddWorldSizeOptions (UIElement container, float accumualtedHeight, MouseEvent clickEvent, string tagGroup, float usableWidthPercent)
 
void AddWorldDifficultyOptions (UIElement container, float accumualtedHeight, MouseEvent clickEvent, string tagGroup, float usableWidthPercent)
 
void AddWorldEvilOptions (UIElement container, float accumualtedHeight, MouseEvent clickEvent, string tagGroup, float usableWidthPercent)
 
void ClickRandomizeName (UIMouseEvent evt, UIElement listeningElement)
 
void ClickRandomizeSeed (UIMouseEvent evt, UIElement listeningElement)
 
void ClickSizeOption (UIMouseEvent evt, UIElement listeningElement)
 
void ClickDifficultyOption (UIMouseEvent evt, UIElement listeningElement)
 
void ClickEvilOption (UIMouseEvent evt, UIElement listeningElement)
 
void UpdatePreviewPlate ()
 
void UpdateSliders ()
 
void MakeBackAndCreatebuttons (UIElement outerContainer)
 
void Click_GoBack (UIMouseEvent evt, UIElement listeningElement)
 
void FadedMouseOver (UIMouseEvent evt, UIElement listeningElement)
 
void FadedMouseOut (UIMouseEvent evt, UIElement listeningElement)
 
void Click_SetName (UIMouseEvent evt, UIElement listeningElement)
 
void Click_SetSeed (UIMouseEvent evt, UIElement listeningElement)
 
void Click_NamingAndCreating (UIMouseEvent evt, UIElement listeningElement)
 
void OnFinishedSettingName (string name)
 
void UpdateInputFields ()
 
void OnFinishedSettingSeed (string seed)
 
void GoBackHere ()
 
void OnFinishedNamingAndCreating (string name)
 
void FinishCreatingWorld ()
 
void ProcessSeed (out string processedSeed)
 
void AssignRandomWorldName ()
 
void AssignRandomWorldSeed ()
 
void SetupGamepadPoints (SpriteBatch spriteBatch)
 
void EstablishUpDownRelationship (UILinkPoint[] topSide, UILinkPoint[] bottomSide)
 
void LoopHorizontalLineLinks (UILinkPoint[] pointsLine)
 
List< SnapPointGetSnapGroup (List< SnapPoint > ptsOnPage, string groupName)
 
int SortPoints (SnapPoint a, SnapPoint b)
 
CalculatedStyle GetDimensionsBasedOnParentDimensions (CalculatedStyle parentDimensions)
 

Static Private Member Functions

static void AddHorizontalSeparator (UIElement Container, float accumualtedHeight)
 

Private Attributes

WorldSizeId _optionSize
 
WorldDifficultyId _optionDifficulty
 
WorldEvilId _optionEvil
 
string _optionwWorldName
 
string _optionSeed
 
UICharacterNameButton _namePlate
 
UICharacterNameButton _seedPlate
 
UIWorldCreationPreview _previewPlate
 
GroupOptionButton< WorldSizeId >[] _sizeButtons
 
GroupOptionButton< WorldDifficultyId >[] _difficultyButtons
 
GroupOptionButton< WorldEvilId >[] _evilButtons
 
UIText _descriptionText
 
bool _isInitialized
 
CalculatedStyle _innerDimensions
 
CalculatedStyle _dimensions
 
CalculatedStyle _outerDimensions
 
SnapPoint _snapPoint
 

Static Private Attributes

static readonly RasterizerState OverflowHiddenRasterizerState
 
static int _idCounter = 0
 

Detailed Description

Definition at line 18 of file UIWorldCreation.cs.


The documentation for this class was generated from the following file: