the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
at main 36 lines 740 B view raw
1#pragma once 2#include "GuiComponent.h" 3using namespace std; 4class Font; 5class Screen; 6 7class EditBox : public GuiComponent 8{ 9private: 10 Font *font; 11 int x; 12 int y; 13 int width; 14 int height; 15 wstring value; 16 unsigned int maxLength; 17 int frame; 18 19public: 20 bool inFocus; 21 bool active; 22private: 23 Screen *screen; 24 25public: 26 EditBox(Screen *screen, Font *font, int x, int y, int width, int height, const wstring& value); 27 void setValue(const wstring& value); 28 wstring getValue(); 29 void tick(); 30 void keyPressed(wchar_t ch, int eventKey); 31 void mouseClicked(int mouseX, int mouseY, int buttonNum); 32 void focus(bool newFocus); 33 void render(); 34 void setMaxLength(int maxLength); 35 int getMaxLength(); 36};