21 #include "../Engine/InteractiveSurface.h" 37 static const int MINI_SIZE = 14;
39 std::vector<Base*> *_bases;
41 size_t _base, _hoverBase;
44 static const size_t MAX_BASES = 8;
46 MiniBaseView(
int width,
int height,
int x = 0,
int y = 0);
50 void setBases(std::vector<Base*> *bases);
Container for all the information associated with a given user action, like mouse clicks...
Definition: Action.h:32
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
size_t getHoveredBase() const
Gets the base the mouse is over.
Definition: MiniBaseView.cpp:72
void setBases(std::vector< Base *> *bases)
Sets the base list to display.
Definition: MiniBaseView.cpp:52
void setSelectedBase(size_t base)
Sets the selected base for the mini base view.
Definition: MiniBaseView.cpp:82
void setTexture(SurfaceSet *texture)
Sets the texture for the mini base view.
Definition: MiniBaseView.cpp:63
void mouseOver(Action *action, State *state)
Special handling for mouse hovers.
Definition: MiniBaseView.cpp:156
Container of a set of surfaces.
Definition: SurfaceSet.h:35
void setSecondaryColor(Uint8 color)
Sets the secondary color of the surface.
Definition: MiniBaseView.cpp:166
void draw()
Draws the mini base view.
Definition: MiniBaseView.cpp:92
MiniBaseView(int width, int height, int x=0, int y=0)
Creates a new mini base view at the specified position and size.
Definition: MiniBaseView.cpp:37
Mini view of a base.
Definition: MiniBaseView.h:34
~MiniBaseView()
Cleans up the mini base view.
Definition: MiniBaseView.cpp:44
void setColor(Uint8 color)
Sets the color of the surface.
Definition: MiniBaseView.cpp:162
Definition: BaseInfoState.cpp:40