mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-07 21:39:54 +02:00
Nav: Internals: Moved some enums and functions to internals, renamed ImGuiNavReadMode to ImGuiInputReadMode as well. (#787)
This commit is contained in:
@ -47,6 +47,7 @@ typedef int ImGuiLayoutType; // enum: horizontal or vertical
|
||||
typedef int ImGuiButtonFlags; // flags: for ButtonEx(), ButtonBehavior() // enum ImGuiButtonFlags_
|
||||
typedef int ImGuiItemFlags; // flags: for PushItemFlag() // enum ImGuiItemFlags_
|
||||
typedef int ImGuiNavHighlightFlags; // flags: for RenderNavHighlight() // enum ImGuiNavHighlightFlags_
|
||||
typedef int ImGuiNavDirSourceFlags; // flags: for GetNavInputAmount2d() // enum ImGuiNavDirSourceFlags_
|
||||
typedef int ImGuiSeparatorFlags; // flags: for Separator() - internal // enum ImGuiSeparatorFlags_
|
||||
typedef int ImGuiSliderFlags; // flags: for SliderBehavior() // enum ImGuiSliderFlags_
|
||||
|
||||
@ -254,6 +255,17 @@ enum ImGuiInputSource
|
||||
ImGuiInputSource_Count_,
|
||||
};
|
||||
|
||||
// FIXME-NAV: Clarify/expose various repeat delay/rate
|
||||
enum ImGuiInputReadMode
|
||||
{
|
||||
ImGuiInputReadMode_Down,
|
||||
ImGuiInputReadMode_Pressed,
|
||||
ImGuiInputReadMode_Released,
|
||||
ImGuiInputReadMode_Repeat,
|
||||
ImGuiInputReadMode_RepeatSlow,
|
||||
ImGuiInputReadMode_RepeatFast
|
||||
};
|
||||
|
||||
enum ImGuiDir
|
||||
{
|
||||
ImGuiDir_None = -1,
|
||||
@ -271,6 +283,13 @@ enum ImGuiNavHighlightFlags_
|
||||
ImGuiNavHighlightFlags_AlwaysDraw = 1 << 2
|
||||
};
|
||||
|
||||
enum ImGuiNavDirSourceFlags_
|
||||
{
|
||||
ImGuiNavDirSourceFlags_Key = 1 << 0,
|
||||
ImGuiNavDirSourceFlags_PadLStick = 1 << 1,
|
||||
ImGuiNavDirSourceFlags_PadRStick = 1 << 2
|
||||
};
|
||||
|
||||
// 2D axis aligned bounding-box
|
||||
// NB: we can't rely on ImVec2 math operators being available here
|
||||
struct IMGUI_API ImRect
|
||||
@ -1001,6 +1020,8 @@ namespace ImGui
|
||||
IMGUI_API void NavInitWindow(ImGuiWindow* window, bool force_reinit);
|
||||
IMGUI_API void ActivateItem(ImGuiID id); // Remotely activate a button, checkbox, tree node etc. given its unique ID. activation is queued and processed on the next frame when the item is encountered again.
|
||||
|
||||
IMGUI_API float GetNavInputAmount(ImGuiNavInput n, ImGuiInputReadMode mode);
|
||||
IMGUI_API ImVec2 GetNavInputAmount2d(ImGuiNavDirSourceFlags dir_sources, ImGuiInputReadMode mode, float slow_factor = 0.0f, float fast_factor = 0.0f);
|
||||
IMGUI_API int CalcTypematicPressedRepeatAmount(float t, float t_prev, float repeat_delay, float repeat_rate);
|
||||
|
||||
IMGUI_API void Scrollbar(ImGuiLayoutType direction);
|
||||
|
Reference in New Issue
Block a user