mirror of https://github.com/auygun/kaliber.git
Arbitrary scale-up
This commit is contained in:
parent
669ed5e098
commit
75b5046684
|
@ -27,6 +27,7 @@ ImguiBackend::~ImguiBackend() = default;
|
||||||
void ImguiBackend::Initialize() {
|
void ImguiBackend::Initialize() {
|
||||||
IMGUI_CHECKVERSION();
|
IMGUI_CHECKVERSION();
|
||||||
ImGui::CreateContext();
|
ImGui::CreateContext();
|
||||||
|
ImGui::GetIO().IniFilename = nullptr;
|
||||||
|
|
||||||
size_t buffer_size = 0;
|
size_t buffer_size = 0;
|
||||||
auto buffer = AssetFile::ReadWholeFile("engine/RobotoMono-Regular.ttf",
|
auto buffer = AssetFile::ReadWholeFile("engine/RobotoMono-Regular.ttf",
|
||||||
|
@ -43,6 +44,11 @@ void ImguiBackend::Initialize() {
|
||||||
LOG(0) << "Failed to read font file.";
|
LOG(0) << "Failed to read font file.";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Arbitrary scale-up for mobile devices.
|
||||||
|
// TODO: Put some effort into DPI awareness.
|
||||||
|
if (Engine::Get().IsMobile())
|
||||||
|
ImGui::GetStyle().ScaleAllSizes(2.0f);
|
||||||
|
|
||||||
Engine::Get().SetImageSource(
|
Engine::Get().SetImageSource(
|
||||||
"imgui_atlas",
|
"imgui_atlas",
|
||||||
[]() -> std::unique_ptr<Image> {
|
[]() -> std::unique_ptr<Image> {
|
||||||
|
|
Loading…
Reference in New Issue