Просмотр исходного кода

Merge branch 'master' of github.com:taylor001/crown

Daniele Bartolini 10 лет назад
Родитель
Сommit
56031ca151
3 измененных файлов с 19 добавлено и 4 удалено
  1. 13 3
      docs/lua_api.txt
  2. 5 0
      docs/style.css
  3. 1 1
      src/main/main.cpp

+ 13 - 3
docs/lua_api.txt

@@ -92,6 +92,10 @@ Vector3
 
 		Returns the corresponding semantic axis.
 
+	**zero** () : Vector3
+
+		Returns a vector with all values set to zero.
+
 Vector3Box
 ----------
 
@@ -837,7 +841,9 @@ Mouse Button Names
 Mouse Axis Names
 ~~~~~~~~~~~~~~~~
 
-	cursor, wheel
+	* cursor: Returns the cursor position (x, y) in screen coordinates.
+	* cursor_delta: Returns the delta of the cursor position (x, y) since last frame.
+	* wheel: Returns the movement of the mouse wheel in the y axis. Positive values of y mean upward scrolling, negative values mean downward scrolling.
 
 Touch
 -----
@@ -911,12 +917,16 @@ Pad1, Pad2, Pad3, Pad4
 Pad Button Names
 ~~~~~~~~~~~~~~~~
 
-	up, down, left, right, start, back, guide, left_thumb, right_thumb, left_shoulder, right_shoulder, a, b, x, y
+	* up, down, left, right
+	* start, back, guide
+	* left_thumb, right_thumb
+	* left_shoulder, right_shoulder
+	* a, b, x, y
 
 Pad Axis Names
 ~~~~~~~~~~~~~~
 
-	left, right
+	* left, right: Returns the direction (x, y) of the left or right thumbstick [-1; +1]. The z component represents the left or right trigger [0; +1].
 
 Window
 ======

+ 5 - 0
docs/style.css

@@ -1,3 +1,8 @@
+/*
+ * Copyright (c) 2012-2015 Daniele Bartolini and individual contributors.
+ * License: https://github.com/taylor001/crown/blob/master/LICENSE
+ */
+
 @import url(html4css1.css);
 
 * {

+ 1 - 1
src/main/main.cpp

@@ -69,7 +69,7 @@ bool process_events()
 						im->mouse()->set_axis(MouseAxis::CURSOR, vector3(ev.x, ev.y, 0.0f));
 						break;
 					case OsMouseEvent::WHEEL:
-						im->mouse()->set_axis(MouseAxis::WHEEL, vector3(ev.wheel, 0.0f, 0.0f));
+						im->mouse()->set_axis(MouseAxis::WHEEL, vector3(0.0f, ev.wheel, 0.0f));
 						break;
 					default:
 						CE_FATAL("Unknown mouse event type");