mirror of
https://github.com/Drezil/imgui.git
synced 2025-04-16 16:14:01 +00:00
Comments
This commit is contained in:
parent
4ee5a792ff
commit
ff35d24bcc
@ -10246,9 +10246,9 @@ static void ShowExampleAppManipulatingWindowTitle(bool* opened)
|
|||||||
ImGui::Text("This is window 2.\nMy title is the same as window 1, but my identifier is unique.");
|
ImGui::Text("This is window 2.\nMy title is the same as window 1, but my identifier is unique.");
|
||||||
ImGui::End();
|
ImGui::End();
|
||||||
|
|
||||||
// Using "###" to display a changing title but keep a static identifier "MyWindow"
|
// Using "###" to display a changing title but keep a static identifier "AnimatedTitle"
|
||||||
char buf[128];
|
char buf[128];
|
||||||
ImFormatString(buf, IM_ARRAYSIZE(buf), "Animated title %c %d###MyWindow", "|/-\\"[(int)(ImGui::GetTime()/0.25f)&3], rand());
|
ImFormatString(buf, IM_ARRAYSIZE(buf), "Animated title %c %d##AnimatedTitle", "|/-\\"[(int)(ImGui::GetTime()/0.25f)&3], rand());
|
||||||
ImGui::SetNextWindowPos(ImVec2(100,300), ImGuiSetCond_FirstUseEver);
|
ImGui::SetNextWindowPos(ImVec2(100,300), ImGuiSetCond_FirstUseEver);
|
||||||
ImGui::Begin(buf);
|
ImGui::Begin(buf);
|
||||||
ImGui::Text("This window has a changing title.");
|
ImGui::Text("This window has a changing title.");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user