19 #ifndef OPENXCOM_SLIDER_H
20 #define OPENXCOM_SLIDER_H
22 #include "../Engine/InteractiveSurface.h"
40 Text *_txtMinus, *_txtPlus;
43 int _min, _max, _value;
45 ActionHandler _change;
46 int _thickness, _textness, _minX, _maxX, _offsetX;
49 void setPosition(
double pos);
52 Slider(
int width,
int height,
int x = 0,
int y = 0);
68 void setPalette(SDL_Color *colors,
int firstcolor = 0,
int ncolors = 256);
84 void onChange(ActionHandler handler);
void blit(Surface *surface)
Blits the slider onto another surface.
Definition: Slider.cpp:246
Container for all the information associated with a given user action, like mouse clicks...
Definition: Action.h:34
void mousePress(Action *action, State *state)
Special handling for mouse presses.
Definition: Slider.cpp:263
A game state that receives user input and reacts accordingly.
Definition: State.h:44
void handle(Action *action, State *state)
Moves the slider.
Definition: Slider.cpp:173
Surface that the user can interact with.
Definition: InteractiveSurface.h:39
Horizontal slider control to select from a range of values.
Definition: Slider.h:36
Text string displayed on screen.
Definition: Text.h:41
void initText(Font *big, Font *small, Language *lang)
Initializes the slider's resources.
Definition: Slider.cpp:111
void setValue(int value)
Sets the slider's value.
Definition: Slider.cpp:219
void setColor(Uint8 color)
Sets the slider's color.
Definition: Slider.cpp:135
void setHighContrast(bool contrast)
Sets the slider's high contrast color setting.
Definition: Slider.cpp:123
Slider(int width, int height, int x=0, int y=0)
Creates a new slider with the specified size and position.
Definition: Slider.cpp:37
Contains strings used throughout the game for localization.
Definition: Language.h:42
void setY(int y)
Sets the Y position of the surface.
Definition: Slider.cpp:93
Takes care of loading and storing each character in a sprite font.
Definition: Font.h:40
void setRange(int min, int max)
Sets the slider's range.
Definition: Slider.cpp:207
void mouseRelease(Action *action, State *state)
Special handling for mouse releases.
Definition: Slider.cpp:286
int getValue() const
Gets the slider's value.
Definition: Slider.cpp:237
Coloured button with a text label.
Definition: TextButton.h:40
Element that is blit (rendered) onto the screen.
Definition: Surface.h:39
void onChange(ActionHandler handler)
Hooks an action handler to when the slider changes.
Definition: Slider.cpp:300
void setX(int x)
Sets the X position of the surface.
Definition: Slider.cpp:77
Fancy frame border thing used for windows and other elements.
Definition: Frame.h:30
void setPalette(SDL_Color *colors, int firstcolor=0, int ncolors=256)
Sets the slider's palette.
Definition: Slider.cpp:158
~Slider()
Cleans up the slider.
Definition: Slider.cpp:65
Uint8 getColor() const
Gets the slider's color.
Definition: Slider.cpp:147