TModLoader v1.4.4.9
TModLoader source code documentation
Loading...
Searching...
No Matches

◆ DrawSelf()

override void Terraria.ModLoader.Config.UI.ConfigElement< T >.DrawSelf ( SpriteBatch spriteBatch)
inlineprotectedvirtualinherited

Reimplemented from Terraria.UI.UIElement.

Reimplemented in Terraria.ModLoader.Config.UI.RangeElement.

Definition at line 163 of file ConfigElement.cs.

164 {
165 //IL_0027: Unknown result type (might be due to invalid IL or missing references)
166 //IL_0047: Unknown result type (might be due to invalid IL or missing references)
167 //IL_0040: Unknown result type (might be due to invalid IL or missing references)
168 //IL_004c: Unknown result type (might be due to invalid IL or missing references)
169 //IL_005a: Unknown result type (might be due to invalid IL or missing references)
170 //IL_005f: Unknown result type (might be due to invalid IL or missing references)
171 //IL_008a: Unknown result type (might be due to invalid IL or missing references)
172 //IL_0069: Unknown result type (might be due to invalid IL or missing references)
173 //IL_007d: Unknown result type (might be due to invalid IL or missing references)
174 //IL_0082: Unknown result type (might be due to invalid IL or missing references)
175 //IL_008f: Unknown result type (might be due to invalid IL or missing references)
176 //IL_0091: Unknown result type (might be due to invalid IL or missing references)
177 //IL_0094: Unknown result type (might be due to invalid IL or missing references)
178 //IL_00a7: Unknown result type (might be due to invalid IL or missing references)
179 //IL_0120: Unknown result type (might be due to invalid IL or missing references)
180 //IL_0122: Unknown result type (might be due to invalid IL or missing references)
181 //IL_0128: Unknown result type (might be due to invalid IL or missing references)
182 //IL_012d: Unknown result type (might be due to invalid IL or missing references)
183 //IL_0134: Unknown result type (might be due to invalid IL or missing references)
184 //IL_0195: Unknown result type (might be due to invalid IL or missing references)
185 base.DrawSelf(spriteBatch);
188 Vector2 val = new Vector2(dimensions.X, dimensions.Y);
189 Vector2 baseScale = default(Vector2);
190 ((Vector2)(ref baseScale))._002Ector(0.8f);
191 Color color = (base.IsMouseHovering ? Color.White : Color.White);
192 if (!MemberInfo.CanWrite)
193 {
194 color = Color.Gray;
195 }
196 Color panelColor = (base.IsMouseHovering ? backgroundColor : backgroundColor.MultiplyRGBA(new Color(180, 180, 180)));
197 Vector2 position = val;
198 DrawPanel2(spriteBatch, position, TextureAssets.SettingsPanel.Value, settingsWidth, dimensions.Height, panelColor);
199 if (DrawLabel)
200 {
201 position.X += 8f;
202 position.Y += 8f;
203 string label = TextDisplayFunction();
205 {
206 label = label + " - [c/FF0000:" + Language.GetTextValue("tModLoader.ModReloadRequired") + "]";
207 }
208 ChatManager.DrawColorCodedStringWithShadow(spriteBatch, FontAssets.ItemStack.Value, label, position, color, 0f, Vector2.Zero, baseScale, settingsWidth);
209 }
210 if (base.IsMouseHovering && TooltipFunction != null)
211 {
212 string tooltip = TooltipFunction();
214 {
215 tooltip += (string.IsNullOrEmpty(tooltip) ? "" : "\n");
216 tooltip = tooltip + "[c/" + Color.Orange.Hex3() + ":" + Language.GetTextValue("tModLoader.ModReloadRequiredMemberTooltip") + "]";
217 }
218 UIModConfig.Tooltip = tooltip;
219 }
220 }
static Asset< DynamicSpriteFont > ItemStack
Definition FontAssets.cs:8
static Asset< Texture2D > SettingsPanel
static string GetTextValue(string key)
Retrieves the text value for a specified localization key. The text returned will be for the currentl...
Definition Language.cs:35
Contains methods to access or retrieve localization values. The Localization Guideteaches more about ...
Definition Language.cs:12
static void DrawPanel2(SpriteBatch spriteBatch, Vector2 position, Texture2D texture, float width, float height, Color color)
static Vector2 DrawColorCodedStringWithShadow(SpriteBatch spriteBatch, DynamicSpriteFont font, TextSnippet[] snippets, Vector2 position, float rotation, Vector2 origin, Vector2 baseScale, out int hoveredSnippet, float maxWidth=-1f, float spread=2f)
CalculatedStyle GetDimensions()
Definition UIElement.cs:460

References Terraria.ModLoader.Config.UI.ConfigElement< T >.backgroundColor, Terraria.ModLoader.Config.UI.PropertyFieldWrapper.CanWrite, Terraria.UI.Chat.ChatManager.DrawColorCodedStringWithShadow(), Terraria.ModLoader.Config.UI.ConfigElement< T >.DrawLabel, Terraria.ModLoader.Config.UI.ConfigElement< T >.DrawPanel2(), Terraria.UI.UIElement.GetDimensions(), Terraria.Localization.Language.GetTextValue(), Terraria.GameContent.FontAssets.ItemStack, Terraria.ModLoader.Config.UI.ConfigElement< T >.List, Terraria.ModLoader.Config.UI.ConfigElement< T >.MemberInfo, Terraria.ModLoader.Config.UI.ConfigElement< T >.ReloadRequired, Terraria.GameContent.TextureAssets.SettingsPanel, Terraria.ModLoader.Config.UI.ConfigElement< T >.ShowReloadRequiredTooltip, Terraria.ModLoader.Config.UI.ConfigElement< T >.TextDisplayFunction, Terraria.ModLoader.Config.UI.ConfigElement< T >.TooltipFunction, and Terraria.ModLoader.Config.UI.ConfigElement< T >.ValueChanged.

+ Here is the call graph for this function: