Daniele Bartolini пре 9 година
родитељ
комит
d742652ed0

+ 2 - 2
samples/core/editors/level_editor/level_editor.lua

@@ -1370,7 +1370,7 @@ function LevelEditor:set_mouse_state(x, y, left, middle, right)
 	self._mouse.right = right
 end
 
-function LevelEditor:set_mouse_move(x, y, dx, dy)
+function LevelEditor:mouse_move(x, y, dx, dy)
 	self._mouse.x = x
 	self._mouse.y = y
 	self._mouse.dx = dx
@@ -1379,7 +1379,7 @@ function LevelEditor:set_mouse_move(x, y, dx, dy)
 	self.tool:mouse_move(x, y)
 end
 
-function LevelEditor:set_mouse_wheel(delta)
+function LevelEditor:mouse_wheel(delta)
 	self._mouse.wheel.delta = self._mouse.wheel.delta + delta;
 end
 

+ 6 - 6
tools/level_editor/engine_view.vala

@@ -130,7 +130,7 @@ namespace Crown
 				);
 
 			if (ev.button == 1)
-				s += LevelEditorApi.set_mouse_up((int)ev.x, (int)ev.y);
+				s += LevelEditorApi.mouse_up((int)ev.x, (int)ev.y);
 
 			_client.send_script(s);
 			return false;
@@ -153,7 +153,7 @@ namespace Crown
 				);
 
 			if (ev.button == 1)
-				s += LevelEditorApi.set_mouse_down((int)ev.x, (int)ev.y);
+				s += LevelEditorApi.mouse_down((int)ev.x, (int)ev.y);
 
 			_client.send_script(s);
 			return false;
@@ -174,7 +174,7 @@ namespace Crown
 				return true;
 
 			if (!_keys[(int)ev.keyval])
-				_client.send_script(LevelEditorApi.set_key_down(key_to_string((int)ev.keyval)));
+				_client.send_script(LevelEditorApi.key_down(key_to_string((int)ev.keyval)));
 
 			_keys[(int)ev.keyval] = true;
 
@@ -187,7 +187,7 @@ namespace Crown
 				return false;
 
 			if (_keys[(int)ev.keyval])
-				_client.send_script(LevelEditorApi.set_key_up(key_to_string((int)ev.keyval)));
+				_client.send_script(LevelEditorApi.key_up(key_to_string((int)ev.keyval)));
 
 			_keys[(int)ev.keyval] = false;
 
@@ -203,7 +203,7 @@ namespace Crown
 
 			if (_even++ % 2 == 0)
 			{
-				_client.send_script(LevelEditorApi.set_mouse_move(_mouse_curr_x
+				_client.send_script(LevelEditorApi.mouse_move(_mouse_curr_x
 					, _mouse_curr_y
 					, _mouse_delta_x
 					, _mouse_delta_y
@@ -218,7 +218,7 @@ namespace Crown
 
 		private bool on_scroll(Gdk.EventScroll ev)
 		{
-			_client.send_script(LevelEditorApi.set_mouse_wheel(ev.direction == Gdk.ScrollDirection.UP ? 1.0 : -1.0));
+			_client.send_script(LevelEditorApi.mouse_wheel(ev.direction == Gdk.ScrollDirection.UP ? 1.0 : -1.0));
 			return false;
 		}