Bläddra i källkod

Merge pull request #189 from sanikoyes/hotfix-ime

Merging!
reduz 11 år sedan
förälder
incheckning
777c045bfc

+ 1 - 1
core/os/memory_pool_dynamic_static.h

@@ -38,7 +38,7 @@ class MemoryPoolDynamicStatic : public MemoryPoolDynamic {
 	_THREAD_SAFE_CLASS_
 
 	enum {
-		MAX_CHUNKS=16384
+		MAX_CHUNKS=65536
 	};
 	
 	

+ 1 - 0
modules/gdscript/gd_parser.cpp

@@ -215,6 +215,7 @@ GDParser::Node* GDParser::_parse_expression(Node *p_parent,bool p_static,bool p_
 			String path = tokenizer->get_token_constant();
 			if (!path.is_abs_path() && base_path!="")
 				path=base_path+"/"+path;
+            path = path.replace("///","//");
 
 			Ref<Resource> res = ResourceLoader::load(path);
 			if (!res.is_valid()) {

+ 22 - 0
platform/windows/os_windows.cpp

@@ -608,6 +608,28 @@ void OS_Windows::process_key_events() {
 		switch(ke.uMsg) {
 
 			case WM_CHAR: {
+                if ((i==0 && ke.uMsg==WM_CHAR) || (i>0 && key_event_buffer[i-1].uMsg==WM_CHAR))
+                {
+				    InputEvent event;
+				    event.type=InputEvent::KEY;
+				    event.ID=++last_id;
+				    InputEventKey &k=event.key;
+
+
+				    k.mod=ke.mod_state;
+				    k.pressed=true;
+				    k.scancode=KeyMappingWindows::get_keysym(ke.wParam);
+                    k.unicode=ke.wParam;
+				    if (k.unicode && gr_mem) {
+					    k.mod.alt=false;
+					    k.mod.control=false;
+				    }
+
+				    if (k.unicode<32)
+					    k.unicode=0;
+
+				    input->parse_input_event(event);
+                }
 
 				//do nothing
 			} break;

+ 2 - 0
tools/editor/editor_node.h

@@ -410,6 +410,8 @@ public:
 
 	static void add_editor_plugin(EditorPlugin *p_editor);
 	static void remove_editor_plugin(EditorPlugin *p_editor);
+    static EditorNode * get_singleton() { return singleton; }
+
 
 	void edit_node(Node *p_node);
 	void edit_resource(const Ref<Resource>& p_resource);

+ 2 - 1
tools/editor/scene_tree_editor.cpp

@@ -706,7 +706,8 @@ void SceneTreeDialog::_cancel() {
 void SceneTreeDialog::_select() {
 
 	if (tree->get_selected()) {
-		emit_signal("selected",tree->get_selected()->get_path());
+        Node *scene = EditorNode::get_singleton()->get_edited_scene();
+        emit_signal("selected","/root/" + scene->get_parent()->get_path_to(tree->get_selected()));
 		hide();
 	}
 }