77 return new UIImageFramed(powerIconAsset, powerIconAsset.Frame(21, 1, iconLocation.
X, iconLocation.
Y))
83 IgnoresMouseInteraction =
true
92 groupOptionButton.ShowHighlightWhenSelected =
false;
96 return groupOptionButton;
104 groupOptionButton.ShowHighlightWhenSelected =
false;
107 return groupOptionButton;
115 groupOptionButton.ShowHighlightWhenSelected =
false;
118 return groupOptionButton;
125 string textValue =
Language.
GetTextValue(
"CreativePowers.CantUsePowerBecauseOfNoPermissionFromServer");
126 originalText = originalText +
"\n" + textValue;
135 originalText = originalText +
"\n" + textValue;
144 originalText = originalText +
"\n" + textValue;
158 FilledColor = Color.CornflowerBlue
166 Main.LocalPlayer.mouseInterface =
true;
173 if (asButton !=
null)
175 button.OnUpdate += delegate
static bool ShouldPowersBeElaborated
static readonly Point RainFreeze
static readonly Point Unassigned
static readonly Point TimeMidnight
static readonly Point WindDirection
static readonly Point WindFreeze
static readonly Point StopBiomeSpread
static readonly Point WeatherCategory
static readonly Point BlockPlacementRange
static readonly Point TimeNoon
static readonly Point ModifyTime
static readonly Point TimeCategory
static readonly Point TimeDawn
static readonly Point EnemyStrengthSlider
static readonly Point FreezeTime
static readonly Point RainStrength
static readonly Point ItemResearch
static readonly Point ItemDuplication
static readonly Point Godmode
static readonly Point EnemySpawnRate
static readonly Point PersonalCategory
static readonly Point Deprecated
static readonly Point TimeDusk
static readonly Point GameEvents
static GroupOptionButton< bool > CreateToggleButton(CreativePowerUIElementRequestInfo info)
static Color CommonSelectedColor
const int TextureIconColumns
static void AddPermissionTextIfNeeded(ICreativePower power, ref string originalText)
static void AddDescriptionIfNeeded(ref string originalText, string descriptionKey)
static void UpdateUnlockStateByPowerInternal(ICreativePower power, Color colorWhenSelected, IGroupOptionButton asButton)
const int TextureIconRows
static void UpdateUnlockStateByPower(ICreativePower power, UIElement button, Color colorWhenSelected)
static GroupOptionButton< bool > CreateSimpleButton(CreativePowerUIElementRequestInfo info)
static void UpdateUseMouseInterface(UIElement affectedElement)
static GroupOptionButton< T > CreateCategoryButton< T >(CreativePowerUIElementRequestInfo info, T option, T currentOption)
static Asset< Texture2D > GetPowerIconAsset(string path)
static bool IsAvailableForPlayer(ICreativePower power, int playerIndex)
static UIVerticalSlider CreateSlider(Func< float > GetSliderValueMethod, Action< float > SetValueKeyboardMethod, Action SetValueGamepadMethod)
static UIImageFramed GetIconImage(Point iconLocation)
static void AddUnlockTextIfNeeded(ref string originalText, bool needed, string descriptionKey)
void SetCurrentOption(T option)
void SetColorsBasedOnSelectionState(Color pickedColor, Color unpickedColor, float opacityPicked, float opacityNotPicked)
static readonly Color InventoryDefaultColor
static string GetTextValue(string key)
static bool[] countsAsHostForGameplay
static Microsoft.Xna.Framework.Color OurFavoriteColor
static IAssetRepository Assets
PowerPermissionLevel CurrentPermissionLevel
void SetColorsBasedOnSelectionState(Color pickedColor, Color unpickedColor, float opacityPicked, float opacityNotPicked)
void SetBorderColor(Color color)