-
-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BeginChild: Upgraded 'bool border = true' parameter to use a ImGuiChi…
- Loading branch information
Showing
6 changed files
with
60 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,7 +24,7 @@ | |
// Library Version | ||
// (Integer encoded as XYYZZ for use in #if preprocessor conditionals, e.g. '#if IMGUI_VERSION_NUM >= 12345') | ||
#define IMGUI_VERSION "1.90 WIP" | ||
#define IMGUI_VERSION_NUM 18996 | ||
#define IMGUI_VERSION_NUM 18997 | ||
#define IMGUI_HAS_TABLE | ||
|
||
/* | ||
|
@@ -191,6 +191,7 @@ typedef int ImDrawListFlags; // -> enum ImDrawListFlags_ // Flags: f | |
typedef int ImFontAtlasFlags; // -> enum ImFontAtlasFlags_ // Flags: for ImFontAtlas build | ||
typedef int ImGuiBackendFlags; // -> enum ImGuiBackendFlags_ // Flags: for io.BackendFlags | ||
typedef int ImGuiButtonFlags; // -> enum ImGuiButtonFlags_ // Flags: for InvisibleButton() | ||
typedef int ImGuiChildFlags; // -> enum ImGuiChildFlags_ // Flags: for BeginChild() | ||
typedef int ImGuiColorEditFlags; // -> enum ImGuiColorEditFlags_ // Flags: for ColorEdit4(), ColorPicker4() etc. | ||
typedef int ImGuiConfigFlags; // -> enum ImGuiConfigFlags_ // Flags: for io.ConfigFlags | ||
typedef int ImGuiComboFlags; // -> enum ImGuiComboFlags_ // Flags: for BeginCombo() | ||
|
@@ -343,8 +344,8 @@ namespace ImGui | |
// [Important: due to legacy reason, this is inconsistent with most other functions such as BeginMenu/EndMenu, | ||
// BeginPopup/EndPopup, etc. where the EndXXX call should only be called if the corresponding BeginXXX function | ||
// returned true. Begin and BeginChild are the only odd ones out. Will be fixed in a future update.] | ||
IMGUI_API bool BeginChild(const char* str_id, const ImVec2& size = ImVec2(0, 0), bool border = false, ImGuiWindowFlags window_flags = 0); | ||
IMGUI_API bool BeginChild(ImGuiID id, const ImVec2& size = ImVec2(0, 0), bool border = false, ImGuiWindowFlags window_flags = 0); | ||
IMGUI_API bool BeginChild(const char* str_id, const ImVec2& size = ImVec2(0, 0), ImGuiChildFlags child_flags = 0, ImGuiWindowFlags window_flags = 0); | ||
IMGUI_API bool BeginChild(ImGuiID id, const ImVec2& size = ImVec2(0, 0), ImGuiChildFlags child_flags = 0, ImGuiWindowFlags window_flags = 0); | ||
IMGUI_API void EndChild(); | ||
|
||
// Windows Utilities | ||
|
@@ -1010,6 +1011,14 @@ enum ImGuiWindowFlags_ | |
ImGuiWindowFlags_ChildMenu = 1 << 28, // Don't use! For internal use by BeginMenu() | ||
}; | ||
|
||
// Flags for ImGui::BeginChild() | ||
// (Legacy: bit 0 must always correspond to ImGuiChildFlags_Border to be backward compatible with old API using 'bool border'. | ||
enum ImGuiChildFlags_ | ||
{ | ||
ImGuiChildFlags_None = 0, | ||
ImGuiChildFlags_Border = 1 << 0, // Show an outer border and enable WindowPadding. (Important: this is always == 1 for legacy reason) | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
ocornut
Author
Owner
|
||
}; | ||
|
||
// Flags for ImGui::InputText() | ||
// (Those are per-item flags. There are shared flags in ImGuiIO: io.ConfigInputTextCursorBlink and io.ConfigInputTextEnterKeepActive) | ||
enum ImGuiInputTextFlags_ | ||
|
@@ -3114,6 +3123,8 @@ namespace ImGui | |
namespace ImGui | ||
{ | ||
// OBSOLETED in 1.90.0 (from September 2023) | ||
static inline bool BeginChild(const char* str_id, const ImVec2& size_arg, bool border, ImGuiWindowFlags window_flags) { return BeginChild(str_id, size_arg, border ? ImGuiChildFlags_Border : ImGuiChildFlags_None, window_flags); } | ||
static inline bool BeginChild(ImGuiID id, const ImVec2& size_arg, bool border, ImGuiWindowFlags window_flags) { return BeginChild(id, size_arg, border ? ImGuiChildFlags_Border : ImGuiChildFlags_None, window_flags); } | ||
static inline void ShowStackToolWindow(bool* p_open = NULL) { ShowIDStackToolWindow(p_open); } | ||
IMGUI_API bool ListBox(const char* label, int* current_item, bool (*old_callback)(void* user_data, int idx, const char** out_text), void* user_data, int items_count, int height_in_items = -1); | ||
IMGUI_API bool Combo(const char* label, int* current_item, bool (*old_callback)(void* user_data, int idx, const char** out_text), void* user_data, int items_count, int popup_max_height_in_items = -1); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
All
TableFlags_Borders*
flags are in plural. Maybe the ChildFlags one should be as well?ImGuiChildFlags_Borders