mirror of
https://github.com/Drezil/imgui.git
synced 2024-11-26 05:27:01 +00:00
Minor bits
This commit is contained in:
parent
355dae5d99
commit
de61fcc619
@ -4916,8 +4916,7 @@ void ImGui::SetWindowFocus(const char* name)
|
||||
{
|
||||
if (name)
|
||||
{
|
||||
ImGuiWindow* window = FindWindowByName(name);
|
||||
if (window)
|
||||
if (ImGuiWindow* window = FindWindowByName(name))
|
||||
FocusWindow(window);
|
||||
}
|
||||
else
|
||||
@ -9470,7 +9469,7 @@ void ImGui::ValueColor(const char* prefix, const ImVec4& v)
|
||||
ColorButton(v, true);
|
||||
}
|
||||
|
||||
void ImGui::ValueColor(const char* prefix, unsigned int v)
|
||||
void ImGui::ValueColor(const char* prefix, ImU32 v)
|
||||
{
|
||||
Text("%s: %08X", prefix, v);
|
||||
SameLine();
|
||||
|
2
imgui.h
2
imgui.h
@ -352,7 +352,7 @@ namespace ImGui
|
||||
IMGUI_API void Value(const char* prefix, unsigned int v);
|
||||
IMGUI_API void Value(const char* prefix, float v, const char* float_format = NULL);
|
||||
IMGUI_API void ValueColor(const char* prefix, const ImVec4& v);
|
||||
IMGUI_API void ValueColor(const char* prefix, unsigned int v);
|
||||
IMGUI_API void ValueColor(const char* prefix, ImU32 v);
|
||||
|
||||
// Tooltips
|
||||
IMGUI_API void SetTooltip(const char* fmt, ...) IM_PRINTFARGS(1); // set tooltip under mouse-cursor, typically use with ImGui::IsHovered(). last call wins
|
||||
|
@ -1020,24 +1020,24 @@ void ImGui::ShowTestWindow(bool* p_open)
|
||||
ImGui::Text("Hello\nWorld"); ImGui::SameLine();
|
||||
ImGui::Text("One\nTwo\nThree");
|
||||
|
||||
ImGui::Button("HOP"); ImGui::SameLine();
|
||||
ImGui::Button("HOP##1"); ImGui::SameLine();
|
||||
ImGui::Text("Banana"); ImGui::SameLine();
|
||||
ImGui::Text("Hello\nWorld"); ImGui::SameLine();
|
||||
ImGui::Text("Banana");
|
||||
|
||||
ImGui::Button("HOP"); ImGui::SameLine();
|
||||
ImGui::Button("HOP##2"); ImGui::SameLine();
|
||||
ImGui::Text("Hello\nWorld"); ImGui::SameLine();
|
||||
ImGui::Text("Banana");
|
||||
|
||||
ImGui::Button("TEST"); ImGui::SameLine();
|
||||
ImGui::Button("TEST##1"); ImGui::SameLine();
|
||||
ImGui::Text("TEST"); ImGui::SameLine();
|
||||
ImGui::SmallButton("TEST");
|
||||
ImGui::SmallButton("TEST##2");
|
||||
|
||||
ImGui::AlignFirstTextHeightToWidgets(); // If your line starts with text, call this to align it to upcoming widgets.
|
||||
ImGui::Text("Text aligned to Widget"); ImGui::SameLine();
|
||||
ImGui::Button("Widget"); ImGui::SameLine();
|
||||
ImGui::Button("Widget##1"); ImGui::SameLine();
|
||||
ImGui::Text("Widget"); ImGui::SameLine();
|
||||
ImGui::SmallButton("Widget");
|
||||
ImGui::SmallButton("Widget##2");
|
||||
|
||||
// Tree
|
||||
const float spacing = ImGui::GetStyle().ItemInnerSpacing.x;
|
||||
|
@ -481,7 +481,7 @@ struct ImGuiContext
|
||||
ScalarAsInputTextId = 0;
|
||||
DragCurrentValue = 0.0f;
|
||||
DragLastMouseDelta = ImVec2(0.0f, 0.0f);
|
||||
DragSpeedDefaultRatio = 0.01f;
|
||||
DragSpeedDefaultRatio = 1.0f / 100.0f;
|
||||
DragSpeedScaleSlow = 0.01f;
|
||||
DragSpeedScaleFast = 10.0f;
|
||||
ScrollbarClickDeltaToGrabCenter = ImVec2(0.0f, 0.0f);
|
||||
@ -643,7 +643,7 @@ struct IMGUI_API ImGuiWindow
|
||||
ImGuiWindow* RootNonPopupWindow; // If we are a child window, this is pointing to the first non-child non-popup parent window. Else point to ourself.
|
||||
ImGuiWindow* ParentWindow; // If we are a child window, this is pointing to our parent window. Else point to NULL.
|
||||
|
||||
// Focus
|
||||
// Navigation / Focus
|
||||
int FocusIdxAllCounter; // Start at -1 and increase as assigned via FocusItemRegister()
|
||||
int FocusIdxTabCounter; // (same, but only count widgets which you can Tab through)
|
||||
int FocusIdxAllRequestCurrent; // Item being requested for focus
|
||||
|
Loading…
Reference in New Issue
Block a user