Add Credits Screen and a Spritesheet. ;P

This commit is contained in:
VoltZ
2019-11-12 10:24:38 +01:00
parent 67694a5f96
commit ce426bb7bb
16 changed files with 294 additions and 55 deletions
+12 -3
View File
@@ -30,6 +30,9 @@
#include "screens/screenCommon.hpp"
#include "utils/json.hpp"
#include "utils/structs.hpp"
#include <vector>
class ScriptCreator : public Screen
{
@@ -39,13 +42,19 @@ public:
ScriptCreator();
private:
void openJson();
void save();
int Selection = 0;
void openJson(std::string fileName);
void save(std::string fileName);
void setInfoStuff(void);
void setBool(const std::string &object, const std::string &key, bool v);
void setInt(const std::string &object, const std::string &key, int v);
void setString(const std::string &object, const std::string &key, const std::string &v);
std::vector<Structs::ButtonPos> mainButtons = {
{90, 40, 140, 35, -1}, // New Script.
{90, 100, 140, 35, -1}, // Existing Script.
};
};
#endif
+22
View File
@@ -39,10 +39,29 @@ public:
void Draw(void) const override;
void Logic(u32 hDown, u32 hHeld, touchPosition touch) override;
private:
// Credits stuff.
int DisplayMode = 1;
int delay = 120;
bool discordText = false;
int colorMode = 0;
int mode = 0;
int Selection = 0;
void DrawSubMenu(void) const;
void DrawLanguageSelection(void) const;
void DrawColorChanging(void) const;
void DrawCreditsScreen(void) const;
void SubMenuLogic(u32 hDown, u32 hHeld, touchPosition touch);
void LanguageSelection(u32 hDown, touchPosition touch);
void colorChanging(u32 hDown, touchPosition touch);
void CreditsLogic(u32 hDown, touchPosition touch);
std::vector<Structs::ButtonPos> mainButtons = {
{90, 40, 140, 35, -1}, // Language.
{90, 100, 140, 35, -1}, // Colors.
{90, 160, 140, 35, -1}, // Misc.
};
std::vector<Structs::ButtonPos> langBlocks = {
{37, 32, 20, 20, -1},
@@ -63,6 +82,9 @@ private:
{220, 85, 95, 41, -1},
};
std::vector<Structs::ButtonPos> barPos = {
{0, 210, 320, 30, -1},
};
};
#endif