Multiple Control Schemes

TheFinalHero
New member
 
Posts: 2
Joined: Wed Nov 23, 2011 18:16

Multiple Control Schemes

by TheFinalHero » Wed Nov 23, 2011 18:52

So I've been fooling around with the idea of multiple control schemes being stored, similar to how games might have Southpaw vs Regular control schemes. I tried to implement this idea, but I'm having a few issues with it. I'd upload the code to GitHub, but I confess my experience with it is limited and I'm not sure how.

I've altered guiKEyChangeMenu.h and .cpp to have new KeyPresses and IGUIBUTTONs for actively changing between control schemes. In utility.h, I changed the Settings class to replace the private maps representing the settings and defaults with arrays of 3 maps, each representing a different control scheme (core::map<std::string, std::string> M_settings[3]; core::map<std::string, std::string> M_defaults[3];) I also added an integer to signify the currently selected control type (int controlType). I also performed the necessary aesthetic alterations to the Keybindings menu.

The result can be seen in this picture: http://i.imgur.com/CBBNU.png

While I'm able to cycle through the control schemes (i.e. the number at the top changes), the keybindings are the same for each control type. When I change one key for one control type, it changes for all the control types.

I know this is a longshot, but does anyone have any ideas? I'll upload it to Github if someone tells me how. I'm open to anything.
 

TheFinalHero
New member
 
Posts: 2
Joined: Wed Nov 23, 2011 18:16

by TheFinalHero » Wed Nov 23, 2011 19:06

 


Return to Minetest Features

Who is online

Users browsing this forum: No registered users and 8 guests