David Rose 17 лет назад
Родитель
Сommit
30671d09a8

+ 12 - 0
panda/src/tinydisplay/config_tinydisplay.cxx

@@ -60,6 +60,18 @@ ConfigVariableInt x_wheel_down_button
           "mouse button number does the system report when the mouse wheel "
           "is rolled one notch down?"));
 
+ConfigVariableInt x_wheel_left_button
+("x-wheel-left-button", 6,
+ PRC_DESC("This is the mouse button index of the wheel_left event: which "
+          "mouse button number does the system report when one scrolls "
+          "to the left?"));
+
+ConfigVariableInt x_wheel_right_button
+("x-wheel-right-button", 7,
+ PRC_DESC("This is the mouse button index of the wheel_right event: which "
+          "mouse button number does the system report when one scrolls "
+          "to the right?"));
+
 ConfigVariableBool show_resize_box
 ("show-resize-box", true,
  PRC_DESC("When this variable is true, then resizable OSX Panda windows will "

+ 2 - 0
panda/src/tinydisplay/config_tinydisplay.h

@@ -30,6 +30,8 @@ extern ConfigVariableString display_cfg;
 extern ConfigVariableBool x_error_abort;
 extern ConfigVariableInt x_wheel_up_button;
 extern ConfigVariableInt x_wheel_down_button;
+extern ConfigVariableInt x_wheel_left_button;
+extern ConfigVariableInt x_wheel_right_button;
 
 extern ConfigVariableBool show_resize_box;
 extern ConfigVariableBool osx_disable_event_loop;

+ 2 - 2
panda/src/tinydisplay/tinyXGraphicsWindow.cxx

@@ -1398,12 +1398,12 @@ get_button(XKeyEvent &key_event, bool allow_shift) {
 }
 
 ////////////////////////////////////////////////////////////////////
-//     Function: glxGraphicsWindow::map_button
+//     Function: TinyXGraphicsWindow::map_button
 //       Access: Private
 //  Description: Maps from a single X keysym to Panda's ButtonHandle.
 //               Called by get_button(), above.
 ////////////////////////////////////////////////////////////////////
-ButtonHandle glxGraphicsWindow::
+ButtonHandle TinyXGraphicsWindow::
 map_button(KeySym key) {
   switch (key) {
   case XK_BackSpace: