1 parent
0dc0c2f5fd
commit
74cfec5a2a
2 files changed
+56
No files matched your search
@@ -708,6 +708,36 @@ public final class ImGuiIO {
|
||||
ImGui::GetIO().KeysDown[i] = keysDown[i];
|
||||
*/
|
||||
|
||||
/**
|
||||
* Gamepad inputs. Cleared back to zero by EndFrame(). Keyboard keys will be auto-mapped and be written here by NewFrame().
|
||||
*/
|
||||
public native void getNavInputs(float[] buff); /*
|
||||
for (int i = 0; i < ImGuiNavInput_COUNT; i++)
|
||||
buff[i] = ImGui::GetIO().NavInputs[i];
|
||||
*/
|
||||
|
||||
/**
|
||||
* Gamepad inputs. Cleared back to zero by EndFrame(). Keyboard keys will be auto-mapped and be written here by NewFrame().
|
||||
*/
|
||||
public native float getNavInputs(int idx); /*
|
||||
return ImGui::GetIO().NavInputs[idx];
|
||||
*/
|
||||
|
||||
/**
|
||||
* Gamepad inputs. Cleared back to zero by EndFrame(). Keyboard keys will be auto-mapped and be written here by NewFrame().
|
||||
*/
|
||||
public native void setNavInputs(int idx, float input); /*
|
||||
ImGui::GetIO().NavInputs[idx] = input;
|
||||
*/
|
||||
|
||||
/**
|
||||
* Gamepad inputs. Cleared back to zero by EndFrame(). Keyboard keys will be auto-mapped and be written here by NewFrame().
|
||||
*/
|
||||
public native void setNavInputs(float[] navInputs); /*
|
||||
for (int i = 0; i < ImGuiNavInput_COUNT; i++)
|
||||
ImGui::GetIO().NavInputs[i] = navInputs[i];
|
||||
*/
|
||||
|
||||
//------------------------------------------------------------------
|
||||
// Output - Updated by NewFrame() or EndFrame()/Render()
|
||||
// (when reading from the io.WantCaptureMouse, io.WantCaptureKeyboard flags to dispatch your inputs, it is
|
||||
|
||||
@@ -69,4 +69,30 @@ public final class ImGuiNavInput {
|
||||
* e.g. R1 or R2 (PS4), RB or RT (Xbox), R or ZL (Switch)
|
||||
*/
|
||||
public static final int TweakFast = 15;
|
||||
|
||||
// [Internal] Don't use directly! This is used internally to differentiate keyboard from gamepad inputs for behaviors that require to differentiate them.
|
||||
// Keyboard behavior that have no corresponding gamepad mapping (e.g. CTRL+TAB) will be directly reading from io.KeysDown[] instead of io.NavInputs[].
|
||||
|
||||
/**
|
||||
* Toggle menu.
|
||||
*/
|
||||
public static final int KeyMenu = 16;
|
||||
/**
|
||||
* Move left.
|
||||
*/
|
||||
public static final int KeyLeft = 17;
|
||||
/**
|
||||
* Move right.
|
||||
*/
|
||||
public static final int KeyRight = 18;
|
||||
/**
|
||||
* Move up.
|
||||
*/
|
||||
public static final int KeyUp = 19;
|
||||
/**
|
||||
* Move down.
|
||||
*/
|
||||
public static final int KeyDown = 20;
|
||||
|
||||
public static final int COUNT = 21;
|
||||
}
|
||||
Reference in new issue
Block a user