1234567891011121314151617181920212223242526272829 |
- #ifndef BUTTON_H
- #define BUTTON_H
-
- #include "olcPixelGameEngine.h"
- #include "game_state.h"
-
- #include <string>
-
- namespace pabloader {
- class Debuggers;
- typedef void (*ButtonAction)();
- class Button {
- public:
- Button(Debuggers* game, int32_t x, int32_t y, int32_t w, int32_t h, std::string txt, GameState state);
- void Draw();
- bool Update();
- void SetText(std::string txt) { text = txt; }
-
- private:
- Debuggers* game;
- olc::vi2d pos;
- olc::vi2d size;
- std::string text;
- GameState state;
- bool hover = false;
- };
- }
-
- #endif
|