Backend abstraction + added android support + partial high DPI scaling

This commit is contained in:
AlexandreRouma
2022-02-13 17:25:23 +01:00
parent 9969ce018b
commit e5f3d1672c
36 changed files with 693 additions and 185 deletions

View File

@ -8,8 +8,10 @@
namespace credits {
ImFont* bigFont;
ImVec2 imageSize(128.0f, 128.0f);
void init() {
imageSize = ImVec2(128.0f * style::uiScale, 128.0f * style::uiScale);
}
void show() {
@ -25,7 +27,7 @@ namespace credits {
ImGui::TextUnformatted("SDR++ ");
ImGui::PopFont();
ImGui::SameLine();
ImGui::Image(icons::LOGO, ImVec2(128, 128));
ImGui::Image(icons::LOGO, imageSize);
ImGui::Spacing();
ImGui::Spacing();
ImGui::Spacing();

View File

@ -1,8 +1,6 @@
#include <gui/dialogs/loading_screen.h>
#include <gui/main_window.h>
#include <imgui.h>
#include "imgui_impl_glfw.h"
#include "imgui_impl_opengl3.h"
#include <gui/icons.h>
#include <gui/style.h>
#include <credits.h>
@ -10,6 +8,11 @@
#include <backend.h>
namespace LoadingScreen {
ImVec2 imageSize(128.0f, 128.0f);
void init() {
imageSize = ImVec2(128.0f * style::uiScale, 128.0f * style::uiScale);
}
void show(std::string msg) {
backend::beginFrame();
@ -26,7 +29,7 @@ namespace LoadingScreen {
ImGui::TextUnformatted("SDR++ ");
ImGui::PopFont();
ImGui::SameLine();
ImGui::Image(icons::LOGO, ImVec2(128, 128));
ImGui::Image(icons::LOGO, imageSize);
ImVec2 origPos = ImGui::GetCursorPos();
ImGui::SetCursorPosY(origPos.y + 50);

View File

@ -4,5 +4,6 @@
#include <mutex>
namespace LoadingScreen {
void init();
void show(std::string msg);
};