mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-23 21:15:11 +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;
|
||||
}
|
||||
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)) {
|
||||
float regionX=ImGui::GetContentRegionAvail().x;
|
||||
ImVec2 prevSpacing=ImGui::GetStyle().ItemSpacing;
|
||||
|
|
|
@ -32,6 +32,15 @@
|
|||
#endif
|
||||
|
||||
String getHomeDir() {
|
||||
#ifdef IS_MOBILE
|
||||
|
||||
#ifdef ANDROID
|
||||
return "/storage/emulated/0/";
|
||||
#else
|
||||
return "/";
|
||||
#endif
|
||||
|
||||
#else
|
||||
String ret;
|
||||
char tempDir[4096];
|
||||
|
||||
|
@ -73,6 +82,7 @@ String getHomeDir() {
|
|||
}
|
||||
|
||||
return ret;
|
||||
#endif
|
||||
}
|
||||
|
||||
String getKeyName(int key, bool emptyNone) {
|
||||
|
@ -101,4 +111,4 @@ String getKeyName(int key, bool emptyNone) {
|
|||
ret+=name;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue