Fixed console being on the corner

This commit is contained in:
KiritoDev 2022-03-21 20:25:30 -06:00 committed by Kenix3
parent 35e6c0360e
commit becfaa2cfb

View File

@ -420,10 +420,11 @@ namespace SohImGui {
const float scale = Game::Settings.controller.input_scale; const float scale = Game::Settings.controller.input_scale;
ImVec2 BtnPos = ImVec2(160 * scale, 85 * scale); ImVec2 BtnPos = ImVec2(160 * scale, 85 * scale);
if(Game::Settings.controller.input_enabled) {
ImGui::SetNextWindowSize(BtnPos); ImGui::SetNextWindowSize(BtnPos);
ImGui::SetNextWindowPos(ImVec2(main_pos.x + size.x - BtnPos.x - 20, main_pos.y + size.y - BtnPos.y - 20)); ImGui::SetNextWindowPos(ImVec2(main_pos.x + size.x - BtnPos.x - 20, main_pos.y + size.y - BtnPos.y - 20));
if (Game::Settings.controller.input_enabled && pads != nullptr && ImGui::Begin("Game Buttons", nullptr, ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoScrollbar | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoBackground)) { if (pads != nullptr && ImGui::Begin("Game Buttons", nullptr, ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoScrollbar | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoBackground)) {
ImGui::SetCursorPosY(32 * scale); ImGui::SetCursorPosY(32 * scale);
ImGui::BeginGroup(); ImGui::BeginGroup();
@ -464,6 +465,7 @@ namespace SohImGui {
ImGui::End(); ImGui::End();
} }
}
console->Draw(); console->Draw();