mirror of
https://github.com/Mr-X-GTA/YimMenu.git
synced 2025-01-03 16:13:36 +08:00
Fix windows that shouldn't move (#1617)
* fix(overlay): don't move while menu closed * fix(CmdExecutor): don't move by user input
This commit is contained in:
parent
13d5d81cea
commit
a7bcaae371
@ -18,7 +18,7 @@ namespace big
|
||||
ImGui::SetNextWindowBgAlpha(0.65f);
|
||||
ImGui::SetNextWindowSize({screen_x * 0.5f, -1});
|
||||
|
||||
if (ImGui::Begin("cmd_executor", nullptr, ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoFocusOnAppearing | ImGuiWindowFlags_NoNav))
|
||||
if (ImGui::Begin("cmd_executor", nullptr, ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoFocusOnAppearing | ImGuiWindowFlags_NoNav | ImGuiWindowFlags_NoMouseInputs))
|
||||
{
|
||||
static char command_buffer[255];
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, {10.f, 15.f});
|
||||
|
@ -15,7 +15,12 @@ namespace big
|
||||
ImGui::SetNextWindowPos(ImVec2(10.0f, 10.0f), ImGuiCond_FirstUseEver, ImVec2(0.0f, 0.0f));
|
||||
ImGui::SetNextWindowBgAlpha(0.5f);
|
||||
|
||||
if (ImGui::Begin("overlay", nullptr, ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoFocusOnAppearing | ImGuiWindowFlags_NoNav))
|
||||
auto window_flags = ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoFocusOnAppearing | ImGuiWindowFlags_NoNav;
|
||||
if (!g_gui->is_open())
|
||||
{
|
||||
window_flags |= ImGuiWindowFlags_NoMouseInputs;
|
||||
}
|
||||
if (ImGui::Begin("overlay", nullptr, window_flags))
|
||||
{
|
||||
ImGui::Text("YimMenu");
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user