1
Window / Save Inputs to File
« on: November 28, 2010, 09:42:41 pm »
Hi everybody,
I am currently writing a small Game with Sfml 1.6.
It is a Clone of Ipcurve.
I managed dynamic Keybindings, but at the Moment they are still hardcoded.
That's why I want to save this Keybindings to a .ini-File.
But how can I do that?
I have used this tutorial for the Keybindings:
http://www.sfml-dev.org/wiki/en/tutoriels/bindevents_en
but how can i save that to an .ini-File like this?
in short:
How can I get from
a string "w" to Event::Key::W?
And how can I save Event::Key::W to a File?
Cheers Nils
I am currently writing a small Game with Sfml 1.6.
It is a Clone of Ipcurve.
I managed dynamic Keybindings, but at the Moment they are still hardcoded.
That's why I want to save this Keybindings to a .ini-File.
But how can I do that?
I have used this tutorial for the Keybindings:
http://www.sfml-dev.org/wiki/en/tutoriels/bindevents_en
but how can i save that to an .ini-File like this?
Code: [Select]
[PLAYER1]
up=w
left=a
right=d
R=255
G=0
B=0
in short:
How can I get from
a string "w" to Event::Key::W?
And how can I save Event::Key::W to a File?
Cheers Nils