Android fixes

This commit is contained in:
Aang23 2022-09-08 21:51:50 +02:00
parent 363c1f6cd6
commit b50faee548
3 changed files with 11 additions and 11 deletions

View file

@ -120,7 +120,6 @@ class MainActivity : NativeActivity() {
extractDir(aman, fdir + "/resources", "resources");
extractDir(aman, fdir + "/plugins", "plugins");
extractFile(aman, fdir + "/satdump_cfg.json", "satdump_cfg.json");
extractFile(aman, fdir + "/Roboto-Medium.ttf", "Roboto-Medium.ttf");
//createIfDoesntExist(fdir + "/plugins");
return fdir;

View file

@ -27,7 +27,7 @@ namespace style
setFonts(resources::getResourcePath("fonts/Roboto-Medium.tff"));
ImGui::StyleColorsDark();
//ImGui::StyleColorsLight();
// ImGui::StyleColorsLight();
return true;
}
@ -180,15 +180,16 @@ namespace style
ImGui::PopStyleColor(3);
}
void setFonts(std::string fontName){
static const ImWchar icons_ranges[] = { 0xe000, 0xfd46, 0 };
void setFonts(std::string fontName)
{
static const ImWchar icons_ranges[] = {0xe000, 0xfd46, 0};
ImFontConfig config;
config.MergeMode = true;
baseFont = ImGui::GetIO().Fonts->AddFontFromFileTTF(fontName.c_str(), 16.0f);
baseFont = ImGui::GetIO().Fonts->AddFontFromFileTTF(resources::getResourcePath("fonts/3270-Medium Nerd Font Complete.ttf").c_str(), 16.0f, &config, icons_ranges);
bigFont = ImGui::GetIO().Fonts->AddFontFromFileTTF(fontName.c_str(), 45.0f);
//bigFont = ImGui::GetIO().Fonts->AddFontFromFileTTF(resources::getResourcePath("fonts/3270-Medium Nerd Font Complete.ttf").c_str(), 45.0f, &config, icons_ranges);
hugeFont = ImGui::GetIO().Fonts->AddFontFromFileTTF(fontName.c_str(), 128.0f);
//hugeFont = ImGui::GetIO().Fonts->AddFontFromFileTTF(resources::getResourcePath("fonts/3270-Medium Nerd Font Complete.ttf").c_str(), 128.0f, &config, icons_ranges);
baseFont = ImGui::GetIO().Fonts->AddFontFromFileTTF(fontName.c_str(), 16.0f * ui_scale);
baseFont = ImGui::GetIO().Fonts->AddFontFromFileTTF(resources::getResourcePath("fonts/3270-Medium Nerd Font Complete.ttf").c_str(), 16.0f * ui_scale, &config, icons_ranges);
bigFont = ImGui::GetIO().Fonts->AddFontFromFileTTF(fontName.c_str(), 45.0f * ui_scale);
// bigFont = ImGui::GetIO().Fonts->AddFontFromFileTTF(resources::getResourcePath("fonts/3270-Medium Nerd Font Complete.ttf").c_str(), 45.0f, &config, icons_ranges);
hugeFont = ImGui::GetIO().Fonts->AddFontFromFileTTF(fontName.c_str(), 128.0f * ui_scale);
// hugeFont = ImGui::GetIO().Fonts->AddFontFromFileTTF(resources::getResourcePath("fonts/3270-Medium Nerd Font Complete.ttf").c_str(), 128.0f, &config, icons_ranges);
}
}

View file

@ -23,7 +23,7 @@ namespace satdump
// loadDatasetInViewer("/home/alan/Documents/SatDump_ReWork/build/metop_ahrpt_new/dataset.json");
loadDatasetInViewer("/home/zbyszek/Downloads/metopC_15-04_1125/dataset.json");
// loadDatasetInViewer("/home/zbyszek/Downloads/metopC_15-04_1125/dataset.json");
// loadProductsInViewer("/home/alan/Documents/SatDump_ReWork/build/noaa_mhs_test/AMSU/product.cbor", "NOAA-19 HRPT");
// loadProductsInViewer("/home/alan/Documents/SatDump_ReWork/build/metop_ahrpt_new/AVHRR/product.cbor", "MetOp-B AHRPT");