Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - Chumper

Pages: [1]
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?

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

Pages: [1]