Skip to content

Commit 1353c74

Browse files
committed
Comments/formatting on obsolete stuff
1 parent c3af134 commit 1353c74

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

imgui.h

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1035,8 +1035,9 @@ enum ImGuiCol_
10351035

10361036
// Obsolete names (will be removed)
10371037
#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
1038-
, ImGuiCol_ChildWindowBg = ImGuiCol_ChildBg, ImGuiCol_Column = ImGuiCol_Separator, ImGuiCol_ColumnHovered = ImGuiCol_SeparatorHovered, ImGuiCol_ColumnActive = ImGuiCol_SeparatorActive
1039-
, ImGuiCol_ModalWindowDarkening = ImGuiCol_ModalWindowDimBg
1038+
, ImGuiCol_ModalWindowDarkening = ImGuiCol_ModalWindowDimBg // [renamed in 1.63]
1039+
, ImGuiCol_ChildWindowBg = ImGuiCol_ChildBg // [renamed in 1.53]
1040+
, ImGuiCol_Column = ImGuiCol_Separator, ImGuiCol_ColumnHovered = ImGuiCol_SeparatorHovered, ImGuiCol_ColumnActive = ImGuiCol_SeparatorActive // [renamed in 1.51]
10401041
//ImGuiCol_CloseButton, ImGuiCol_CloseButtonActive, ImGuiCol_CloseButtonHovered, // [unused since 1.60+] the close button now uses regular button colors.
10411042
//ImGuiCol_ComboBg, // [unused since 1.53+] ComboBg has been merged with PopupBg, so a redirect isn't accurate.
10421043
#endif
@@ -1336,7 +1337,7 @@ struct ImGuiIO
13361337
// You can obtain the ImDrawData* by calling ImGui::GetDrawData() after Render(). See example applications if you are unsure of how to implement this.
13371338
void (*RenderDrawListsFn)(ImDrawData* data);
13381339
#else
1339-
// This is only here to keep ImGuiIO the same size, so that IMGUI_DISABLE_OBSOLETE_FUNCTIONS can exceptionally be used outside of imconfig.h.
1340+
// This is only here to keep ImGuiIO the same size/layout, so that IMGUI_DISABLE_OBSOLETE_FUNCTIONS can exceptionally be used outside of imconfig.h.
13401341
void* RenderDrawListsFnUnused;
13411342
#endif
13421343

@@ -1476,21 +1477,22 @@ struct ImGuiPayload
14761477

14771478
//-----------------------------------------------------------------------------
14781479
// Obsolete functions (Will be removed! Read 'API BREAKING CHANGES' section in imgui.cpp for details)
1480+
// Please keep your copy of dear imgui up to date! Occasionally set '#define IMGUI_DISABLE_OBSOLETE_FUNCTIONS' in imconfig.h to stay ahead.
14791481
//-----------------------------------------------------------------------------
14801482

14811483
#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
14821484
namespace ImGui
14831485
{
14841486
// OBSOLETED in 1.66 (from Sep 2018)
14851487
static inline void SetScrollHere(float center_ratio=0.5f){ SetScrollHereY(center_ratio); }
1486-
// OBSOLETED in 1.63 (from Aug 2018)
1488+
// OBSOLETED in 1.63 (between Aug 2018 and Sept 2018)
14871489
static inline bool IsItemDeactivatedAfterChange() { return IsItemDeactivatedAfterEdit(); }
1488-
// OBSOLETED in 1.61 (from Apr 2018)
1490+
// OBSOLETED in 1.61 (between Apr 2018 and Aug 2018)
14891491
IMGUI_API bool InputFloat(const char* label, float* v, float step, float step_fast, int decimal_precision, ImGuiInputTextFlags flags = 0); // Use the 'const char* format' version instead of 'decimal_precision'!
14901492
IMGUI_API bool InputFloat2(const char* label, float v[2], int decimal_precision, ImGuiInputTextFlags flags = 0);
14911493
IMGUI_API bool InputFloat3(const char* label, float v[3], int decimal_precision, ImGuiInputTextFlags flags = 0);
14921494
IMGUI_API bool InputFloat4(const char* label, float v[4], int decimal_precision, ImGuiInputTextFlags flags = 0);
1493-
// OBSOLETED in 1.60 (from Dec 2017)
1495+
// OBSOLETED in 1.60 (between Dec 2017 and Apr 2018)
14941496
static inline bool IsAnyWindowFocused() { return IsWindowFocused(ImGuiFocusedFlags_AnyWindow); }
14951497
static inline bool IsAnyWindowHovered() { return IsWindowHovered(ImGuiHoveredFlags_AnyWindow); }
14961498
static inline ImVec2 CalcItemRectClosestPoint(const ImVec2& pos, bool on_edge = false, float outward = 0.f) { (void)on_edge; (void)outward; IM_ASSERT(0); return pos; }
@@ -1511,7 +1513,7 @@ namespace ImGui
15111513
static inline bool IsMouseHoveringAnyWindow() { return IsWindowHovered(ImGuiHoveredFlags_AnyWindow); }
15121514
static inline bool IsMouseHoveringWindow() { return IsWindowHovered(ImGuiHoveredFlags_AllowWhenBlockedByPopup | ImGuiHoveredFlags_AllowWhenBlockedByActiveItem); }
15131515
}
1514-
typedef ImGuiInputTextCallback ImGuiTextEditCallback; // OBSOLETE in 1.63 (from Aug 2018): made the names consistent
1516+
typedef ImGuiInputTextCallback ImGuiTextEditCallback; // OBSOLETE in 1.63 (from Aug 2018): made the names consistent
15151517
typedef ImGuiInputTextCallbackData ImGuiTextEditCallbackData;
15161518
#endif
15171519

@@ -1539,15 +1541,15 @@ struct ImGuiOnceUponAFrame
15391541
};
15401542

15411543
// Helper: Macro for ImGuiOnceUponAFrame. Attention: The macro expands into 2 statement so make sure you don't use it within e.g. an if() statement without curly braces.
1542-
#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS // Will obsolete
1543-
#define IMGUI_ONCE_UPON_A_FRAME static ImGuiOnceUponAFrame imgui_oaf; if (imgui_oaf)
1544+
#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
1545+
#define IMGUI_ONCE_UPON_A_FRAME static ImGuiOnceUponAFrame imgui_oaf; if (imgui_oaf) // OBSOLETED in 1.51, will remove!
15441546
#endif
15451547

15461548
// Helper: Parse and apply text filters. In format "aaaaa[,bbbb][,ccccc]"
15471549
struct ImGuiTextFilter
15481550
{
15491551
IMGUI_API ImGuiTextFilter(const char* default_filter = "");
1550-
IMGUI_API bool Draw(const char* label = "Filter (inc,-exc)", float width = 0.0f); // Helper calling InputText+Build
1552+
IMGUI_API bool Draw(const char* label = "Filter (inc,-exc)", float width = 0.0f); // Helper calling InputText+Build
15511553
IMGUI_API bool PassFilter(const char* text, const char* text_end = NULL) const;
15521554
IMGUI_API void Build();
15531555
void Clear() { InputBuf[0] = 0; Build(); }

0 commit comments

Comments
 (0)