Renamed GetWindowFont()->GetFont(), GetWindowFontSize()->GetFontSize() (related to #340)

This commit is contained in:
ocornut
2016-03-21 22:29:11 +01:00
parent 928832a5bc
commit a274a09955
3 changed files with 11 additions and 11 deletions

View File

@ -149,6 +149,7 @@
Here is a change-log of API breaking changes, if you are using one of the functions listed, expect to have to fix some code.
Also read releases logs https://github.com/ocornut/imgui/releases for more details.
- 2016/03/21 (1.48) - renamed GetWindowFont() to GetFont(), GetWindowFontSize() to GetFontSize(). Kept inline redirection function (will obsolete).
- 2016/03/02 (1.48) - InputText() completion/history/always callbacks: if you modify the text buffer manually (without using DeleteChars()/InsertChars() helper) you need to maintain the BufTextLen field. added an assert.
- 2016/01/23 (1.48) - fixed not honoring exact width passed to PushItemWidth(), previously it would add extra FramePadding.x*2 over that width. if you had manual pixel-perfect alignment in place it might affect you.
- 2015/12/27 (1.48) - fixed ImDrawList::AddRect() which used to render a rectangle 1 px too large on each axis.
@ -424,7 +425,6 @@
- window: get size/pos helpers given names (see discussion in #249)
- window: a collapsed window can be stuck behind the main menu bar?
- window: detect extra End() call that pop the "Debug" window out and assert at call site instead of later.
- window: consider renaming "GetWindowFont" which conflict with old Windows #define (#340)
- window/tooltip: allow to set the width of a tooltip to allow TextWrapped() etc. while keeping the height automatic.
- window: increase minimum size of a window with menus or fix the menu rendering so that it doesn't look odd.
- draw-list: maintaining bounding box per command would allow to merge draw command when clipping isn't relied on (typical non-scrolling window or non-overflowing column would merge with previous command).
@ -4828,16 +4828,14 @@ ImDrawList* ImGui::GetWindowDrawList()
return window->DrawList;
}
ImFont* ImGui::GetWindowFont()
ImFont* ImGui::GetFont()
{
ImGuiState& g = *GImGui;
return g.Font;
return GImGui->Font;
}
float ImGui::GetWindowFontSize()
float ImGui::GetFontSize()
{
ImGuiState& g = *GImGui;
return g.FontSize;
return GImGui->FontSize;
}
void ImGui::SetWindowFontScale(float scale)