Updated ImGui.
This commit is contained in:
parent
9eb9f2bef4
commit
d893638892
3
3rdparty/ocornut-imgui/imgui.cpp
vendored
3
3rdparty/ocornut-imgui/imgui.cpp
vendored
@ -77,7 +77,7 @@
|
|||||||
- ESCAPE to revert text to its original value.
|
- ESCAPE to revert text to its original value.
|
||||||
- You can apply arithmetic operators +,*,/ on numerical values. Use +- to subtract (because - would set a negative value!)
|
- You can apply arithmetic operators +,*,/ on numerical values. Use +- to subtract (because - would set a negative value!)
|
||||||
- Controls are automatically adjusted for OSX to match standard OSX text editing operations.
|
- Controls are automatically adjusted for OSX to match standard OSX text editing operations.
|
||||||
- Gamepad navigation: see suggested mappings in imgui.h ImGuiNavInput_
|
- Gamepad navigation: see suggested mappings in imgui.h ImGuiNavInput_ + download PNG/PSD at goo.gl/9LgVZW.
|
||||||
|
|
||||||
|
|
||||||
PROGRAMMER GUIDE
|
PROGRAMMER GUIDE
|
||||||
@ -229,6 +229,7 @@
|
|||||||
0.0f= not held. 1.0f= fully held. Pass intermediate 0.0f..1.0f values for analog triggers/sticks.
|
0.0f= not held. 1.0f= fully held. Pass intermediate 0.0f..1.0f values for analog triggers/sticks.
|
||||||
- We uses a simple >0.0f test for activation testing, and won't attempt to test for a dead-zone.
|
- We uses a simple >0.0f test for activation testing, and won't attempt to test for a dead-zone.
|
||||||
Your code will probably need to transform your raw inputs (such as e.g. remapping your 0.2..0.9 raw input range to 0.0..1.0 imgui range, maybe a power curve, etc.).
|
Your code will probably need to transform your raw inputs (such as e.g. remapping your 0.2..0.9 raw input range to 0.0..1.0 imgui range, maybe a power curve, etc.).
|
||||||
|
- You can download PNG/PSD files depicting the gamepad controls for common controllers at: goo.gl/9LgVZW.
|
||||||
- If you need to share inputs between your game and the imgui parts, the easiest approach is to go all-or-nothing, with a buttons combo to toggle the target.
|
- If you need to share inputs between your game and the imgui parts, the easiest approach is to go all-or-nothing, with a buttons combo to toggle the target.
|
||||||
Please reach out if you think the game vs navigation input sharing could be improved.
|
Please reach out if you think the game vs navigation input sharing could be improved.
|
||||||
- Mouse:
|
- Mouse:
|
||||||
|
11
3rdparty/ocornut-imgui/imgui.h
vendored
11
3rdparty/ocornut-imgui/imgui.h
vendored
@ -74,11 +74,14 @@ struct ImGuiListClipper; // Helper to manually clip large list of ite
|
|||||||
struct ImGuiPayload; // User data payload for drag and drop operations
|
struct ImGuiPayload; // User data payload for drag and drop operations
|
||||||
struct ImGuiContext; // ImGui context (opaque)
|
struct ImGuiContext; // ImGui context (opaque)
|
||||||
|
|
||||||
|
#ifndef ImTextureID
|
||||||
|
typedef void* ImTextureID; // user data to identify a texture (this is whatever to you want it to be! read the FAQ about ImTextureID in imgui.cpp)
|
||||||
|
#endif
|
||||||
|
|
||||||
// Typedefs and Enumerations (declared as int for compatibility and to not pollute the top of this file)
|
// Typedefs and Enumerations (declared as int for compatibility and to not pollute the top of this file)
|
||||||
typedef unsigned int ImU32; // 32-bit unsigned integer (typically used to store packed colors)
|
typedef unsigned int ImU32; // 32-bit unsigned integer (typically used to store packed colors)
|
||||||
typedef unsigned int ImGuiID; // unique ID used by widgets (typically hashed from a stack of string)
|
typedef unsigned int ImGuiID; // unique ID used by widgets (typically hashed from a stack of string)
|
||||||
typedef unsigned short ImWchar; // character for keyboard input/display
|
typedef unsigned short ImWchar; // character for keyboard input/display
|
||||||
typedef void* ImTextureID; // user data to identify a texture (this is whatever to you want it to be! read the FAQ about ImTextureID in imgui.cpp)
|
|
||||||
typedef int ImGuiCol; // enum: a color identifier for styling // enum ImGuiCol_
|
typedef int ImGuiCol; // enum: a color identifier for styling // enum ImGuiCol_
|
||||||
typedef int ImGuiCond; // enum: a condition for Set*() // enum ImGuiCond_
|
typedef int ImGuiCond; // enum: a condition for Set*() // enum ImGuiCond_
|
||||||
typedef int ImGuiKey; // enum: a key identifier (ImGui-side enum) // enum ImGuiKey_
|
typedef int ImGuiKey; // enum: a key identifier (ImGui-side enum) // enum ImGuiKey_
|
||||||
@ -712,12 +715,12 @@ enum ImGuiKey_
|
|||||||
// [BETA] Gamepad/Keyboard directional navigation
|
// [BETA] Gamepad/Keyboard directional navigation
|
||||||
// Keyboard: Set io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard to enable. NewFrame() will automatically fill io.NavInputs[] based on your io.KeyDown[] + io.KeyMap[] arrays.
|
// Keyboard: Set io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard to enable. NewFrame() will automatically fill io.NavInputs[] based on your io.KeyDown[] + io.KeyMap[] arrays.
|
||||||
// Gamepad: Set io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad to enable. Fill the io.NavInputs[] fields before calling NewFrame(). Note that io.NavInputs[] is cleared by EndFrame().
|
// Gamepad: Set io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad to enable. Fill the io.NavInputs[] fields before calling NewFrame(). Note that io.NavInputs[] is cleared by EndFrame().
|
||||||
// Read instructions in imgui.cpp for more details.
|
// Read instructions in imgui.cpp for more details. Download PNG/PSD at goo.gl/9LgVZW.
|
||||||
enum ImGuiNavInput_
|
enum ImGuiNavInput_
|
||||||
{
|
{
|
||||||
// Gamepad Mapping
|
// Gamepad Mapping
|
||||||
ImGuiNavInput_Activate, // activate / open / toggle / tweak value // e.g. Circle (PS4), A (Xbox), B (Switch), Space (Keyboard)
|
ImGuiNavInput_Activate, // activate / open / toggle / tweak value // e.g. Circle (PS4), A (Xbox), A (Switch), Space (Keyboard)
|
||||||
ImGuiNavInput_Cancel, // cancel / close / exit // e.g. Cross (PS4), B (Xbox), A (Switch), Escape (Keyboard)
|
ImGuiNavInput_Cancel, // cancel / close / exit // e.g. Cross (PS4), B (Xbox), B (Switch), Escape (Keyboard)
|
||||||
ImGuiNavInput_Input, // text input / on-screen keyboard // e.g. Triang.(PS4), Y (Xbox), X (Switch), Return (Keyboard)
|
ImGuiNavInput_Input, // text input / on-screen keyboard // e.g. Triang.(PS4), Y (Xbox), X (Switch), Return (Keyboard)
|
||||||
ImGuiNavInput_Menu, // tap: toggle menu / hold: focus, move, resize // e.g. Square (PS4), X (Xbox), Y (Switch), Alt (Keyboard)
|
ImGuiNavInput_Menu, // tap: toggle menu / hold: focus, move, resize // e.g. Square (PS4), X (Xbox), Y (Switch), Alt (Keyboard)
|
||||||
ImGuiNavInput_DpadLeft, // move / tweak / resize window (w/ PadMenu) // e.g. D-pad Left/Right/Up/Down (Gamepads), Arrow keys (Keyboard)
|
ImGuiNavInput_DpadLeft, // move / tweak / resize window (w/ PadMenu) // e.g. D-pad Left/Right/Up/Down (Gamepads), Arrow keys (Keyboard)
|
||||||
|
Loading…
Reference in New Issue
Block a user