20 #include "../Engine/InteractiveSurface.h" 44 bool _contrast, _geoscapeButton;
47 void setSecondaryColor(Uint8 color) {
setTextColor(color); }
51 static Sound *soundPress;
53 TextButton(
int width,
int height,
int x = 0,
int y = 0);
73 void setText(
const std::string &text);
79 void setPalette(SDL_Color *colors,
int firstcolor = 0,
int ncolors = 256);
90 void setGeoscapeButton(
bool geo);
Container for all the information associated with a given user action, like mouse clicks...
Definition: Action.h:32
Uint8 getColor() const
Gets the text button's color.
Definition: TextButton.cpp:84
void setText(const std::string &text)
Sets the text button's text.
Definition: TextButton.cpp:157
A game state that receives user input and reacts accordingly.
Definition: State.h:44
Surface that the user can interact with.
Definition: InteractiveSurface.h:37
std::string getText() const
Gets the text button's text.
Definition: TextButton.cpp:167
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:40
Container for sound effects.
Definition: Sound.h:30
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:282
void setComboBox(ComboBox *comboBox)
Attaches this button to a combobox.
Definition: TextButton.cpp:332
void setHeight(int height)
Sets the height of the surface.
Definition: TextButton.cpp:351
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:39
void draw()
Draws the text button.
Definition: TextButton.cpp:199
Text button with a list dropdown when pressed.
Definition: ComboBox.h:36
Takes care of loading and storing each character in a sprite font.
Definition: Font.h:46
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:38
void setHighContrast(bool contrast)
Sets the text button's high contrast color setting.
Definition: TextButton.cpp:146
void setWidth(int width)
Sets the width of the surface.
Definition: TextButton.cpp:345
void mouseRelease(Action *action, State *state)
Special handling for mouse releases.
Definition: TextButton.cpp:317
~TextButton()
Cleans up the text button.
Definition: TextButton.cpp:52
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
Definition: BaseInfoState.cpp:40