19 #ifndef OPENXCOM_TEXTBUTTON_H
20 #define OPENXCOM_TEXTBUTTON_H
22 #include "../Engine/InteractiveSurface.h"
51 static Sound *soundPress;
53 TextButton(
int width,
int height,
int x = 0,
int y = 0);
73 void setText(
const std::wstring &text);
79 void setPalette(SDL_Color *colors,
int firstcolor = 0,
int ncolors = 256);
Container for all the information associated with a given user action, like mouse clicks...
Definition: Action.h:34
std::wstring getText() const
Gets the text button's text.
Definition: TextButton.cpp:167
A game state that receives user input and reacts accordingly.
Definition: State.h:44
Surface that the user can interact with.
Definition: InteractiveSurface.h:39
TextButton(int width, int height, int x=0, int y=0)
Creates a new text button with the specified size and position.
Definition: TextButton.cpp:40
void setColor(Uint8 color)
Sets the text button's color.
Definition: TextButton.cpp:73
Text string displayed on screen.
Definition: Text.h:41
Container for sound effects.
Definition: Sound.h:32
bool isButtonHandled(Uint8 button=0)
Is this mouse button event handled?
Definition: TextButton.cpp:57
void mousePress(Action *action, State *state)
Special handling for mouse presses.
Definition: TextButton.cpp:268
Uint8 getColor() const
Gets the text button's color.
Definition: TextButton.cpp:84
void setComboBox(ComboBox *comboBox)
Attaches this button to a combobox.
Definition: TextButton.cpp:318
void initText(Font *big, Font *small, Language *lang)
Initializes the text edit's resources.
Definition: TextButton.cpp:135
Contains strings used throughout the game for localization.
Definition: Language.h:42
void draw()
Draws the text button.
Definition: TextButton.cpp:199
Text button with a list dropdown when pressed.
Definition: ComboBox.h:38
Takes care of loading and storing each character in a sprite font.
Definition: Font.h:40
void setGroup(TextButton **group)
Sets the text button's group.
Definition: TextButton.cpp:177
void setPalette(SDL_Color *colors, int firstcolor=0, int ncolors=256)
Sets the text button's palette.
Definition: TextButton.cpp:189
void setSmall()
Sets the text size to small.
Definition: TextButton.cpp:111
Font * getFont() const
Gets the text button's current font.
Definition: TextButton.cpp:121
Coloured button with a text label.
Definition: TextButton.h:40
void setHighContrast(bool contrast)
Sets the text button's high contrast color setting.
Definition: TextButton.cpp:146
void mouseRelease(Action *action, State *state)
Special handling for mouse releases.
Definition: TextButton.cpp:303
~TextButton()
Cleans up the text button.
Definition: TextButton.cpp:52
void setText(const std::wstring &text)
Sets the text button's text.
Definition: TextButton.cpp:157
void setTextColor(Uint8 color)
Sets the text button's text color.
Definition: TextButton.cpp:93
void setBig()
Sets the text size to big.
Definition: TextButton.cpp:102