mirror of
git://projects.qi-hardware.com/gmenu2x.git
synced 2025-04-21 12:27:27 +03:00
Use a simple array instead of a hashmap for the colors.
This commit is contained in:
@@ -47,6 +47,17 @@ const int LOOP_DELAY=30000;
|
||||
|
||||
extern void jz_cpuspeed(unsigned clockspeed);
|
||||
|
||||
enum color {
|
||||
COLOR_TOP_BAR_BG,
|
||||
COLOR_BOTTOM_BAR_BG,
|
||||
COLOR_SELECTION_BG,
|
||||
COLOR_MESSAGE_BOX_BG,
|
||||
COLOR_MESSAGE_BOX_BORDER,
|
||||
COLOR_MESSAGE_BOX_SELECTION,
|
||||
|
||||
NUM_COLORS,
|
||||
};
|
||||
|
||||
using std::string;
|
||||
using fastdelegate::FastDelegate0;
|
||||
using google::dense_hash_map;
|
||||
@@ -54,7 +65,6 @@ using google::dense_hash_map;
|
||||
typedef FastDelegate0<> MenuAction;
|
||||
typedef dense_hash_map<string, string, hash<string> > ConfStrHash;
|
||||
typedef dense_hash_map<string, int, hash<string> > ConfIntHash;
|
||||
typedef dense_hash_map<string, RGBAColor, hash<string> > ConfRGBAHash;
|
||||
|
||||
typedef struct {
|
||||
unsigned short batt;
|
||||
@@ -129,6 +139,9 @@ private:
|
||||
void gp2x_deinit();
|
||||
void toggleTvOut();
|
||||
|
||||
enum color stringToColor(const string &name);
|
||||
const string &colorToString(enum color);
|
||||
|
||||
public:
|
||||
GMenu2X(int argc, char *argv[]);
|
||||
~GMenu2X();
|
||||
@@ -154,7 +167,7 @@ public:
|
||||
//Configuration hashes
|
||||
ConfStrHash confStr, skinConfStr;
|
||||
ConfIntHash confInt, skinConfInt;
|
||||
ConfRGBAHash skinConfColors;
|
||||
RGBAColor skinConfColors[NUM_COLORS];
|
||||
|
||||
//Configuration settings
|
||||
bool useSelectionPng;
|
||||
|
||||
Reference in New Issue
Block a user