31 public UIVerticalSlider(Func<float> getStatus, Action<float> setStatusKeyboard, Action setStatusGamepad,
Color color)
33 _getSliderValue = ((getStatus !=
null) ? getStatus : ((Func<float>)(() => 0f)));
34 _slideKeyboardAction = ((setStatusKeyboard !=
null) ? setStatusKeyboard : ((Action<float>)delegate
43 UISliderBase.CurrentAimedSlider =
null;
46 UISliderBase.CurrentLockedSlider =
null;
58 UISliderBase.CurrentAimedSlider =
this;
85 sliderValueThatWasSet = 0f;
89 Utils.
DrawSplicedPanel(spriteBatch,
value, rectangle.
X, rectangle.
Y, rectangle.
Width, rectangle.
Height, rectangle2.
X, rectangle2.
Width, rectangle2.
Y, rectangle2.
Height,
Color.
White);
91 rectangle3.X += rectangle2.
Left;
92 rectangle3.Width -= rectangle2.
Right;
93 rectangle3.Y += rectangle2.
Top;
94 rectangle3.Height -= rectangle2.
Bottom;
98 Rectangle destinationRectangle = rectangle3;
99 destinationRectangle.Height = (int)((
float)destinationRectangle.Height *
FillPercent);
100 destinationRectangle.Y += rectangle3.Height - destinationRectangle.
Height;
105 Rectangle destinationRectangle2 = rectangle4;
106 destinationRectangle2.
Inflate(2, 2);
107 spriteBatch.
Draw(value2, destinationRectangle2, value3,
Color.
Black);
125 if (flag || usageLevel == 1)
void Draw(Texture2D texture, Vector2 position, Color color)
static void PlaySound(int type, Vector2 position, int style=1)
static Asset< Texture2D > MagicPixel
static Asset< Texture2D > ColorBar
static UIElement CurrentAimedSlider
static UIElement CurrentLockedSlider
Func< float, Color > _blipFunc
Action< float > _slideKeyboardAction
override void DrawSelf(SpriteBatch spriteBatch)
Func< float > _getSliderValue
UIVerticalSlider(Func< float > getStatus, Action< float > setStatusKeyboard, Action setStatusGamepad, Color color)
bool _isReallyMouseOvered
Action _slideGamepadAction
bool DrawValueBarDynamicWidth(SpriteBatch spriteBatch, out float sliderValueThatWasSet)
static Vector2 MouseScreen
static Microsoft.Xna.Framework.Color OurFavoriteColor
bool IgnoresMouseInteraction
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 float GetLerpValue(float from, float to, float t, bool clamped=false)
static Rectangle CenteredRectangle(Vector2 center, Vector2 size)
void Inflate(int horizontalAmount, int verticalAmount)
bool Contains(int x, int y)