mirror of
https://github.com/ApfelTeeSaft/gameBase.git
synced 2026-08-26 19:23:30 +00:00
removed string bool argument from Index constructor
This commit is contained in:
@@ -23,11 +23,11 @@ namespace gameBase {
|
|||||||
string table = "mappings";
|
string table = "mappings";
|
||||||
|
|
||||||
for(int i = firstMapping; i < firstMapping + numMappings; i++){
|
for(int i = firstMapping; i < firstMapping + numMappings; i++){
|
||||||
Index idIndex = Index(to_string(i + 1), false);
|
Index idIndex = Index(i + 1);
|
||||||
int bind = luaManager->getIntFromTable(table, vector<Index>{idIndex, Index("bind", true)});
|
int bind = luaManager->getIntFromTable(table, vector<Index>{idIndex, Index("bind")});
|
||||||
Mapping::BindType type = (Mapping::BindType)luaManager->getIntFromTable(table, vector<Index>{idIndex, Index("bindType", true)});
|
Mapping::BindType type = (Mapping::BindType)luaManager->getIntFromTable(table, vector<Index>{idIndex, Index("bindType")});
|
||||||
bool action = luaManager->getBoolFromTable(table, vector<Index>{idIndex, Index("action", true)});
|
bool action = luaManager->getBoolFromTable(table, vector<Index>{idIndex, Index("action")});
|
||||||
int trigger = luaManager->getIntFromTable(table, vector<Index>{idIndex, Index("trigger", true)});
|
int trigger = luaManager->getIntFromTable(table, vector<Index>{idIndex, Index("trigger")});
|
||||||
|
|
||||||
Mapping *m = new Mapping;
|
Mapping *m = new Mapping;
|
||||||
m->bind = bind;
|
m->bind = bind;
|
||||||
|
|||||||
+12
-2
@@ -15,9 +15,19 @@ namespace gameBase{
|
|||||||
std::string index;
|
std::string index;
|
||||||
bool string;
|
bool string;
|
||||||
|
|
||||||
Index(std::string index, bool string){
|
Index(std::string index){
|
||||||
this->index = index;
|
this->index = index;
|
||||||
this->string = string;
|
this->string = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
Index(int index){
|
||||||
|
this->index = std::to_string(index);
|
||||||
|
this->string = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
Index(float index){
|
||||||
|
this->index = std::to_string(index);
|
||||||
|
this->string = false;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user