the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
1#pragma once
2#include "Screen.h"
3#include "ScrolledSelectionList.h"
4class LevelSummary;
5class Button;
6class Tesselator;
7
8
9class SelectWorldScreen : public Screen
10{
11public:
12 class WorldSelectionList;
13
14protected:
15 static const int BUTTON_CANCEL_ID = 0;
16 static const int BUTTON_SELECT_ID = 1;
17 static const int BUTTON_DELETE_ID = 2;
18 static const int BUTTON_CREATE_ID = 3;
19 static const int BUTTON_UP_ID = 4;
20 static const int BUTTON_DOWN_ID = 5;
21 static const int BUTTON_RENAME_ID = 6;
22
23private:
24// final DateFormat DATE_FORMAT = new SimpleDateFormat(); // 4J - removed
25
26protected:
27 Screen *lastScreen;
28 wstring title;
29private:
30 bool done;
31 int selectedWorld;
32 vector<LevelSummary *> *levelList;
33 WorldSelectionList *worldSelectionList;
34 wstring worldLang;
35 wstring conversionLang;
36 bool isDeleting;
37
38 Button *deleteButton;
39 Button *selectButton;
40 Button *renameButton;
41
42public:
43 SelectWorldScreen(Screen *lastScreen);
44 virtual void init();
45private:
46 void loadLevelList();
47protected:
48 wstring getWorldId(int id);
49 wstring getWorldName(int id);
50public:
51 virtual void postInit();
52
53protected:
54 virtual void buttonClicked(Button *button);
55public:
56 void worldSelected(int id);
57 void confirmResult(bool result, int id);
58 virtual void render(int xm, int ym, float a);
59
60 class WorldSelectionList : public ScrolledSelectionList
61 {
62 public:
63 SelectWorldScreen *parent;
64 // 4J - had to add input parameters to ctor, original is a java subclass of the screen and can access its members
65 WorldSelectionList(SelectWorldScreen *sws);
66 protected:
67 virtual int getNumberOfItems();
68 virtual void selectItem(int item, bool doubleClick);
69 virtual bool isSelectedItem(int item);
70 virtual int getMaxPosition();
71 virtual void renderBackground();
72 virtual void renderItem(int i, int x, int y, int h, Tesselator *t);
73 };
74};