Add Arrows for Entry Selection stuff.

This commit is contained in:
SuperSaiyajinStackZ
2019-12-22 00:21:53 +01:00
parent fb1d00049c
commit 5f5fcc3f24
10 changed files with 123 additions and 10 deletions
+2
View File
@@ -46,6 +46,8 @@ namespace Gui
// Draw a Sprite from the sheet.
void sprite(int key, int x, int y, float ScaleX = 1, float ScaleY = 1);
void DrawArrow(int x, int y, float rotation = 0);
// Misc.
bool Draw_Rect(float x, float y, float w, float h, u32 color);
+5
View File
@@ -32,6 +32,7 @@
#include "utils/config.hpp"
#include "utils/fileBrowse.h"
#include "utils/structs.hpp"
class ScriptBrowse : public screen
{
@@ -47,6 +48,10 @@ private:
mutable int selection = 0;
int keyRepeatDelay = 0;
int fastMode = false;
std::vector<Structs::ButtonPos> arrowPos = {
{295, 0, 25, 25, -1}, // Arrow Up.
{295, 215, 25, 25, -1}, // Arrow Down.
};
};
#endif
+8 -2
View File
@@ -31,6 +31,7 @@
#include "screens/screenCommon.hpp"
#include "utils/fileBrowse.h"
#include "utils/structs.hpp"
class ScriptList : public screen
{
@@ -43,8 +44,8 @@ private:
void DrawList(void) const;
void DrawSingleObject(void) const;
void ListSelection(u32 hDown, u32 hHeld);
void SelectFunction(u32 hDown, u32 hHeld);
void ListSelection(u32 hDown, u32 hHeld, touchPosition touch);
void SelectFunction(u32 hDown, u32 hHeld, touchPosition touch);
int mode = 0;
std::vector<DirEntry> dirContents;
@@ -57,6 +58,11 @@ private:
int keyRepeatDelay = 0;
int fastMode = false;
std::vector<Structs::ButtonPos> arrowPos = {
{295, 0, 25, 25, -1}, // Arrow Up.
{295, 215, 25, 25, -1}, // Arrow Down.
};
};
#endif
+6
View File
@@ -30,6 +30,8 @@
#include "screens/screen.hpp"
#include "screens/screenCommon.hpp"
#include "utils/structs.hpp"
class TinyDB : public screen
{
public:
@@ -44,6 +46,10 @@ private:
mutable int screenPosList = 0;
int keyRepeatDelay = 0;
int fastMode = false;
std::vector<Structs::ButtonPos> arrowPos = {
{295, 0, 25, 25, -1}, // Arrow Up.
{295, 215, 25, 25, -1}, // Arrow Down.
};
};
#endif