43 if (iconTexturePath !=
null)
50 SetText(title, textSize, textColor);
68 uIText.TextColor = color;
95 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) * opacity);
106 base.LeftMouseDown(evt);
void Draw(Texture2D texture, Vector2 position, Color color)
static byte Max(byte val1, byte val2)
static void PlaySound(int type, Vector2 position, int style=1)
override void LeftMouseDown(UIMouseEvent evt)
readonly Asset< Texture2D > _hoveredTexture
void SetHoverColor(Color color)
readonly Asset< Texture2D > _iconTexture
override void MouseOver(UIMouseEvent evt)
UIIconTextButton(LocalizedText title, Color textColor, string iconTexturePath, float textSize=1f, float titleAlignmentX=0.5f, float titleWidthReduction=10f)
void SetText(LocalizedText text, float textSize, Color color)
override void MouseOut(UIMouseEvent evt)
override void DrawSelf(SpriteBatch spriteBatch)
readonly Asset< Texture2D > _BasePanelTexture
void SetColor(Color color, float opacity)
static readonly Color InventoryDefaultColor
static IAssetRepository Assets
bool IgnoresMouseInteraction
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)
void Set(float pixels, float precent)
static StyleDimension FromPixelsAndPercent(float pixels, float percent)