80 if (iconTexturePath !=
null)
94 uIText.TextColor = textColor;
113 uIText.TextColor = color;
146 Utils.
DrawSplicedPanel(spriteBatch,
_BasePanelTexture.
Value, (
int)dimensions.
X, (int)dimensions.
Y, (
int)dimensions.
Width, (int)dimensions.
Height, 10, 10, 10, 10,
Color.
Lerp(
Color.
Black, color,
FadeFromBlack) * num);
149 Utils.
DrawSplicedPanel(spriteBatch,
_selectedBorderTexture.
Value, (
int)dimensions.X + 7, (int)dimensions.
Y + 7, (
int)dimensions.Width - 14, (int)dimensions.
Height - 14, 10, 10, 10, 10,
Color.
Lerp(color,
Color.
White,
_whiteLerp) * num);
153 Utils.
DrawSplicedPanel(spriteBatch,
_hoveredBorderTexture.
Value, (
int)dimensions.
X, (int)dimensions.
Y, (
int)dimensions.
Width, (int)dimensions.
Height, 10, 10, 10, 10,
_borderColor);
169 base.LeftMouseDown(evt);
void Draw(Texture2D texture, Vector2 position, Color color)
static void PlaySound(int type, Vector2 position, int style=1)
bool ShowHighlightWhenSelected
readonly LocalizedText Description
float _overrideOpacityPicked
readonly Asset< Texture2D > _selectedBorderTexture
Color _overrideUnpickedColor
readonly Asset< Texture2D > _BasePanelTexture
override void MouseOut(UIMouseEvent evt)
Color _overridePickedColor
float _overrideOpacityUnpicked
GroupOptionButton(T option, LocalizedText title, LocalizedText description, Color textColor, string iconTexturePath, float textSize=1f, float titleAlignmentX=0.5f, float titleWidthReduction=10f)
void SetText(LocalizedText text, float textSize, Color color)
readonly Asset< Texture2D > _iconTexture
readonly Asset< Texture2D > _hoveredBorderTexture
override void DrawSelf(SpriteBatch spriteBatch)
override void MouseOver(UIMouseEvent evt)
void SetCurrentOption(T option)
void SetBorderColor(Color color)
void SetColorsBasedOnSelectionState(Color pickedColor, Color unpickedColor, float opacityPicked, float opacityNotPicked)
override void LeftMouseDown(UIMouseEvent evt)
void SetColor(Color color, float opacity)
static readonly Color InventoryDefaultColor
static IAssetRepository Assets
void Append(UIElement element)
CalculatedStyle GetDimensions()
static void DrawSplicedPanel(SpriteBatch sb, Texture2D texture, int x, int y, int w, int h, int leftEnd, int rightEnd, int topEnd, int bottomEnd, Color c)
static Color Lerp(Color value1, Color value2, float amount)
static StyleDimension FromPixels(float pixels)
static StyleDimension FromPixelsAndPercent(float pixels, float percent)