1
SFML projects / Re: Thor 2.0
« on: June 06, 2014, 01:05:06 pm »
I have created a new class called PlayerInput that inherited de thor::ActionMap<std::string> in order to create two new method : loadFromFile and saveToFile.
- LoadFromFile : it reads the xml file (PlayerInput.xml for example) that contains the player input saved and add them to mActionMap (i had to set it as protected).
- SaveToFile : the same that LoadFromFile but it saves instead of to load player input.
The goal is to load/save directly player input from/to a xml file from this class.
Thanks you for your answer. It's not a problem, i will do it in another class that will contain a map<std::string,std::string> with for example the first string, the action name and the second string, the keyboard key string.
- LoadFromFile : it reads the xml file (PlayerInput.xml for example) that contains the player input saved and add them to mActionMap (i had to set it as protected).
- SaveToFile : the same that LoadFromFile but it saves instead of to load player input.
The goal is to load/save directly player input from/to a xml file from this class.
Thanks you for your answer. It's not a problem, i will do it in another class that will contain a map<std::string,std::string> with for example the first string, the action name and the second string, the keyboard key string.