J :
* Hand option.
This commit is contained in:
@@ -54,7 +54,7 @@ class ObjectSelector : public GuiLayer
|
||||
bool CheckUserInput(u32 key);
|
||||
void Update(float dt);
|
||||
void Render();
|
||||
void Limit(LimitorFunctor<T>* limitor);
|
||||
void Limit(LimitorFunctor<T>* limitor, SelectorZone);
|
||||
void Push();
|
||||
void Pop();
|
||||
|
||||
|
||||
@@ -31,7 +31,8 @@ struct Options {
|
||||
static const string ACTIVE_PROFILE;
|
||||
static const string ACTIVE_THEME;
|
||||
static const string ACTIVE_MODE;
|
||||
static const string HANDMODE;
|
||||
static const string CLOSEDHAND;
|
||||
static const string HANDDIRECTION;
|
||||
};
|
||||
|
||||
struct Metrics {
|
||||
@@ -78,7 +79,8 @@ public:
|
||||
PIXEL_TYPE asColor(PIXEL_TYPE fallback = ARGB(255,255,255,255));
|
||||
bool isDefault(); //Returns true when number is 0 abd string is "" or "default"
|
||||
GameOption(int value = 0);
|
||||
GameOption(string value);
|
||||
GameOption(string);
|
||||
GameOption(int, string);
|
||||
};
|
||||
|
||||
|
||||
@@ -116,7 +118,7 @@ public:
|
||||
//These return a filepath accurate to the current mode/profile/theme, and can
|
||||
//optionally fallback to a file within a certain directory.
|
||||
//The sanity=false option returns the adjusted path even if the file doesn't exist.
|
||||
string profileFile(string filename="", string fallback="", bool sanity=false,bool relative=false);
|
||||
string profileFile(string filename="", string fallback="", bool sanity=true,bool relative=false);
|
||||
|
||||
void reloadProfile(bool images = true); //Reloads profile using current options[ACTIVE_PROFILE]
|
||||
void checkProfile(); //Confirms that a profile is loaded and contains a collection.
|
||||
|
||||
@@ -28,6 +28,8 @@ class GuiHand : public GuiLayer
|
||||
|
||||
static const float OpenX;
|
||||
static const float ClosedX;
|
||||
static const float OpenY;
|
||||
static const float ClosedY;
|
||||
|
||||
protected:
|
||||
const MTGHand* hand;
|
||||
|
||||
@@ -106,7 +106,7 @@ class OptionSelect:public OptionItem{
|
||||
|
||||
virtual void addSelection(string s);
|
||||
OptionSelect(string _id, string _displayValue): OptionItem(_id, _displayValue) {value = 0;};
|
||||
virtual void Reload() {initSelections();};
|
||||
virtual void Reload(){initSelections();};
|
||||
virtual void Render();
|
||||
virtual void setData();
|
||||
virtual void initSelections();
|
||||
@@ -206,4 +206,29 @@ class OptionsMenu
|
||||
|
||||
};
|
||||
|
||||
class OptionEnum : public OptionItem {
|
||||
protected:
|
||||
typedef pair<int, string> assoc;
|
||||
unsigned index;
|
||||
vector<assoc> values;
|
||||
public:
|
||||
OptionEnum(string id, string displayValue) : OptionItem(id, displayValue), index(0) {};
|
||||
virtual void Reload();
|
||||
virtual void Render();
|
||||
virtual void setData();
|
||||
virtual void updateValue();
|
||||
virtual ostream& toString(ostream& out) const;
|
||||
};
|
||||
|
||||
class OptionClosedHand : public OptionEnum {
|
||||
public:
|
||||
enum { INVISIBLE = 0, VISIBLE = 1 };
|
||||
OptionClosedHand(string id, string displayValue);
|
||||
};
|
||||
class OptionHandDirection : public OptionEnum {
|
||||
public:
|
||||
enum { VERTICAL = 0, HORIZONTAL = 1};
|
||||
OptionHandDirection(string id, string displayValue);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user