-WIP to add proper key swapping according to keyboard layout

-fix with non working removal of collision exception in 3D physics
This commit is contained in:
Juan Linietsky 2015-01-04 21:16:40 -03:00
parent a8bcb96ad4
commit 8c4dd8de39
5 changed files with 25 additions and 1 deletions

View file

@ -353,3 +353,8 @@ int find_keycode(const String& p_code) {
return 0;
}
int latin_keyboard_keycode_convert(int p_keycode){
return p_keycode;
}

View file

@ -328,5 +328,6 @@ enum KeyModifierMask {
String keycode_get_string(uint32_t p_code);
bool keycode_has_unicode(uint32_t p_unicode);
int find_keycode(const String& p_code);
int latin_keyboard_keycode_convert(int p_keycode);
#endif

View file

@ -485,6 +485,11 @@ void OS::set_time_scale(float p_scale) {
_time_scale=p_scale;
}
OS::LatinKeyboardVariant OS::get_latin_keyboard_variant() const {
return LATIN_KEYBOARD_QWERTY;
}
float OS::get_time_scale() const {
return _time_scale;

View file

@ -34,6 +34,7 @@
#include "vector.h"
#include "os/main_loop.h"
#include <stdarg.h>
/**
@author Juan Linietsky <reduzio@gmail.com>
*/
@ -348,6 +349,18 @@ public:
virtual Error dialog_input_text(String p_title, String p_description, String p_partial, Object* p_obj, String p_callback);
enum LatinKeyboardVariant {
LATIN_KEYBOARD_QWERTY,
LATIN_KEYBOARD_QWERTZ,
LATIN_KEYBOARD_AZERTY,
LATIN_KEYBOARD_QZERTY,
LATIN_KEYBOARD_DVORAK,
LATIN_KEYBOARD_NEO,
};
virtual LatinKeyboardVariant get_latin_keyboard_variant() const;
void set_time_scale(float p_scale);
float get_time_scale() const;

View file

@ -770,7 +770,7 @@ void PhysicsServerSW::body_remove_collision_exception(RID p_body, RID p_body_b)
BodySW *body = body_owner.get(p_body);
ERR_FAIL_COND(!body);
body->remove_exception(p_body);
body->remove_exception(p_body_b);
};