mirror of
https://github.com/4jcraft/4jcraft.git
synced 2026-04-24 08:43:59 +00:00
37 lines
685 B
C++
37 lines
685 B
C++
#pragma once
|
|
#include <string>
|
|
|
|
#include "Screen.h"
|
|
|
|
class Button;
|
|
|
|
class NameEntryScreen : public Screen {
|
|
private:
|
|
Screen* lastScreen;
|
|
|
|
protected:
|
|
std::string title;
|
|
|
|
private:
|
|
int slot;
|
|
std::string name;
|
|
int frame;
|
|
|
|
public:
|
|
NameEntryScreen(Screen* lastScreen, const std::string& oldName, int slot);
|
|
virtual void init() override;
|
|
virtual void removed() override;
|
|
virtual void tick() override;
|
|
|
|
protected:
|
|
virtual void buttonClicked(Button button);
|
|
|
|
private:
|
|
static const std::string allowedChars;
|
|
|
|
protected:
|
|
virtual void keyPressed(char ch, int eventKey) override;
|
|
|
|
public:
|
|
virtual void render(int xm, int ym, float a) override;
|
|
}; |