mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-24 05:25:12 +00:00
GUI: more Android fixes
This commit is contained in:
parent
fee9f45919
commit
7ccefe6d40
2 changed files with 19 additions and 1 deletions
|
@ -29,6 +29,14 @@ void FurnaceGUI::drawOrders() {
|
||||||
nextWindow=GUI_WINDOW_NOTHING;
|
nextWindow=GUI_WINDOW_NOTHING;
|
||||||
}
|
}
|
||||||
if (!ordersOpen) return;
|
if (!ordersOpen) return;
|
||||||
|
if (mobileUI) {
|
||||||
|
patWindowPos=(portrait?ImVec2(0.0f,(mobileMenuPos*-0.65*canvasH)):ImVec2((0.16*canvasH)+0.5*canvasW*mobileMenuPos,0.0f));
|
||||||
|
patWindowSize=(portrait?ImVec2(canvasW,canvasH-(0.16*canvasW)):ImVec2(canvasW-(0.16*canvasH),canvasH));
|
||||||
|
ImGui::SetNextWindowPos(patWindowPos);
|
||||||
|
ImGui::SetNextWindowSize(patWindowSize);
|
||||||
|
} else {
|
||||||
|
//ImGui::SetNextWindowSizeConstraints(ImVec2(440.0f*dpiScale,400.0f*dpiScale),ImVec2(canvasW,canvasH));
|
||||||
|
}
|
||||||
if (ImGui::Begin("Orders",&ordersOpen,globalWinFlags)) {
|
if (ImGui::Begin("Orders",&ordersOpen,globalWinFlags)) {
|
||||||
float regionX=ImGui::GetContentRegionAvail().x;
|
float regionX=ImGui::GetContentRegionAvail().x;
|
||||||
ImVec2 prevSpacing=ImGui::GetStyle().ItemSpacing;
|
ImVec2 prevSpacing=ImGui::GetStyle().ItemSpacing;
|
||||||
|
|
|
@ -32,6 +32,15 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
String getHomeDir() {
|
String getHomeDir() {
|
||||||
|
#ifdef IS_MOBILE
|
||||||
|
|
||||||
|
#ifdef ANDROID
|
||||||
|
return "/storage/emulated/0/";
|
||||||
|
#else
|
||||||
|
return "/";
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#else
|
||||||
String ret;
|
String ret;
|
||||||
char tempDir[4096];
|
char tempDir[4096];
|
||||||
|
|
||||||
|
@ -73,6 +82,7 @@ String getHomeDir() {
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
String getKeyName(int key, bool emptyNone) {
|
String getKeyName(int key, bool emptyNone) {
|
||||||
|
|
Loading…
Reference in a new issue