mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-04 20:18:47 +02:00
Merge branch 'master' into docking
# Conflicts: # docs/CHANGELOG.txt # examples/imgui_impl_opengl3.cpp # imgui.cpp
This commit is contained in:
16
imgui.h
16
imgui.h
@ -480,7 +480,7 @@ namespace ImGui
|
||||
IMGUI_API bool VSliderScalar(const char* label, const ImVec2& size, ImGuiDataType data_type, void* p_data, const void* p_min, const void* p_max, const char* format = NULL, float power = 1.0f);
|
||||
|
||||
// Widgets: Input with Keyboard
|
||||
// - If you want to use InputText() with a dynamic string type such as std::string or your own, see misc/cpp/imgui_stdlib.h
|
||||
// - If you want to use InputText() with std::string or any custom dynamic string type, see misc/cpp/imgui_stdlib.h and comments in imgui_demo.cpp.
|
||||
// - Most of the ImGuiInputTextFlags flags are only useful for InputText() and not for InputFloatX, InputIntX, InputDouble etc.
|
||||
IMGUI_API bool InputText(const char* label, char* buf, size_t buf_size, ImGuiInputTextFlags flags = 0, ImGuiInputTextCallback callback = NULL, void* user_data = NULL);
|
||||
IMGUI_API bool InputTextMultiline(const char* label, char* buf, size_t buf_size, const ImVec2& size = ImVec2(0,0), ImGuiInputTextFlags flags = 0, ImGuiInputTextCallback callback = NULL, void* user_data = NULL);
|
||||
@ -707,7 +707,7 @@ namespace ImGui
|
||||
// - For 'int user_key_index' you can use your own indices/enums according to how your backend/engine stored them in io.KeysDown[].
|
||||
// - We don't know the meaning of those value. You can use GetKeyIndex() to map a ImGuiKey_ value into the user index.
|
||||
IMGUI_API int GetKeyIndex(ImGuiKey imgui_key); // map ImGuiKey_* values into user's key index. == io.KeyMap[key]
|
||||
IMGUI_API bool IsKeyDown(int user_key_index); // is key being held. == io.KeysDown[user_key_index].
|
||||
IMGUI_API bool IsKeyDown(int user_key_index); // is key being held. == io.KeysDown[user_key_index].
|
||||
IMGUI_API bool IsKeyPressed(int user_key_index, bool repeat = true); // was key pressed (went from !Down to Down)? if repeat=true, uses io.KeyRepeatDelay / KeyRepeatRate
|
||||
IMGUI_API bool IsKeyReleased(int user_key_index); // was key released (went from Down to !Down)?
|
||||
IMGUI_API int GetKeyPressedAmount(int key_index, float repeat_delay, float rate); // uses provided repeat rate/delay. return a count, most often 0 or 1 but might be >1 if RepeatRate is small enough that DeltaTime > RepeatRate
|
||||
@ -1252,7 +1252,7 @@ enum ImGuiColorEditFlags_
|
||||
#endif
|
||||
};
|
||||
|
||||
// Identify a mouse button.
|
||||
// Identify a mouse button.
|
||||
// Those values are guaranteed to be stable and we frequently use 0/1 directly. Named enums provided for convenience.
|
||||
enum ImGuiMouseButton_
|
||||
{
|
||||
@ -1284,7 +1284,7 @@ enum ImGuiMouseCursor_
|
||||
#endif
|
||||
};
|
||||
|
||||
// Enumateration for ImGui::SetWindow***(), SetNextWindow***(), SetNextItem***() functions
|
||||
// Enumeration for ImGui::SetWindow***(), SetNextWindow***(), SetNextItem***() functions
|
||||
// Represent a condition.
|
||||
// Important: Treat as a regular enum! Do NOT combine multiple values using binary operators! All the functions above treat 0 as a shortcut to ImGuiCond_Always.
|
||||
enum ImGuiCond_
|
||||
@ -1824,9 +1824,13 @@ struct ImGuiStorage
|
||||
// - Step 3: the clipper validate that we have reached the expected Y position (corresponding to element DisplayEnd), advance the cursor to the end of the list and then returns 'false' to end the loop.
|
||||
struct ImGuiListClipper
|
||||
{
|
||||
float StartPosY;
|
||||
int DisplayStart, DisplayEnd;
|
||||
int ItemsCount;
|
||||
|
||||
// [Internal]
|
||||
int StepNo;
|
||||
float ItemsHeight;
|
||||
int ItemsCount, StepNo, DisplayStart, DisplayEnd;
|
||||
float StartPosY;
|
||||
|
||||
// items_count: Use -1 to ignore (you can call Begin later). Use INT_MAX if you don't know how many items you have (in which case the cursor won't be advanced in the final step).
|
||||
// items_height: Use -1.0f to be calculated automatically on first step. Otherwise pass in the distance between your items, typically GetTextLineHeightWithSpacing() or GetFrameHeightWithSpacing().
|
||||
|
Reference in New Issue
Block a user