浏览代码

IO: Added unused MultiSelectUsesSuperKey dummy field to convey semantic for OS X compatible behavior (#473)

ocornut 9 年之前
父节点
当前提交
f48fc51777
共有 2 个文件被更改,包括 5 次插入3 次删除
  1. 4 3
      imgui.cpp
  2. 1 0
      imgui.h

+ 4 - 3
imgui.cpp

@@ -790,9 +790,10 @@ ImGuiIO::ImGuiIO()
 
     // Set OS X style defaults based on __APPLE__ compile time flag
 #ifdef __APPLE__
-    WordMovementUsesAltKey = true;      // Text editing cursor movement using Alt instead of Ctrl
-    ShortcutsUseSuperKey = true;        // Shortcuts using Cmd/Super instead of Ctrl
-    DoubleClickSelectsWord = true;      // Double click selects by word instead of selecting whole text
+    WordMovementUsesAltKey = true;      // OS X style: Text editing cursor movement using Alt instead of Ctrl
+    ShortcutsUseSuperKey = true;        // OS X style: Shortcuts using Cmd/Super instead of Ctrl
+    DoubleClickSelectsWord = true;      // OS X style: Double click selects by word instead of selecting whole text
+    MultiSelectUsesSuperKey = true;     // OS X style: Multi-selection in lists uses Cmd/Super instead of Ctrl 
 #endif
 }
 

+ 1 - 0
imgui.h

@@ -712,6 +712,7 @@ struct ImGuiIO
     bool          WordMovementUsesAltKey;   // = defined(__APPLE__) // OS X style: Text editing cursor movement using Alt instead of Ctrl
     bool          ShortcutsUseSuperKey;     // = defined(__APPLE__) // OS X style: Shortcuts using Cmd/Super instead of Ctrl
     bool          DoubleClickSelectsWord;   // = defined(__APPLE__) // OS X style: Double click selects by word instead of selecting whole text
+    bool          MultiSelectUsesSuperKey;  // = defined(__APPLE__) // OS X style: Multi-selection in lists uses Cmd/Super instead of Ctrl [unused yet]
 
     //------------------------------------------------------------------
     // User Functions