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
1 changed files with 38 additions and 36 deletions

View File

@ -420,10 +420,11 @@ namespace SohImGui {
const float scale = Game::Settings.controller.input_scale;
ImVec2 BtnPos = ImVec2(160 * scale, 85 * scale);
if(Game::Settings.controller.input_enabled) {
ImGui::SetNextWindowSize(BtnPos);
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::BeginGroup();
@ -464,6 +465,7 @@ namespace SohImGui {
ImGui::End();
}
}
console->Draw();