标签框的名字取决于你传递给 ImGui::Begin 函数的字符串参数。如果你希望在程序运行时更改标签框的名字,你需要重新调用 ImGui::Begin 函数,并传递一个新的字符串参数。如果你只是想更改标签框的内部内容,可以使用 ImGui::SetNextWindowContentWidthImGui::Text 函数来更改内容。例如:

ImGui::Begin("My Window");

// ...

// Change the title of the window
ImGui::End();
ImGui::Begin("New Title");

// Change the content of the window
ImGui::SetNextWindowContentWidth(200);
ImGui::Text("New content");

ImGui::End();

原文地址: https://www.cveoy.top/t/topic/blR6 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录