mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-30 16:33:01 +00:00
GUI: add backdrop if system file picker is open
This commit is contained in:
parent
52c0044bd9
commit
ba657fe4db
4 changed files with 18 additions and 1 deletions
1
TODO.md
1
TODO.md
|
@ -13,7 +13,6 @@
|
||||||
- maybe YMU759 ADPCM channel
|
- maybe YMU759 ADPCM channel
|
||||||
- ADPCM chips
|
- ADPCM chips
|
||||||
- more effects for FM param control
|
- more effects for FM param control
|
||||||
- store system presets in new file
|
|
||||||
- Game Boy envelope macro/sequence
|
- Game Boy envelope macro/sequence
|
||||||
- option to display chip names instead of "multi-system" on title bar
|
- option to display chip names instead of "multi-system" on title bar
|
||||||
- rewrite the system name detection function anyway
|
- rewrite the system name detection function anyway
|
||||||
|
|
|
@ -95,6 +95,10 @@ bool FurnaceGUIFileDialog::render(const ImVec2& min, const ImVec2& max) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool FurnaceGUIFileDialog::isOpen() {
|
||||||
|
return opened;
|
||||||
|
}
|
||||||
|
|
||||||
String FurnaceGUIFileDialog::getPath() {
|
String FurnaceGUIFileDialog::getPath() {
|
||||||
if (sysDialog) {
|
if (sysDialog) {
|
||||||
if (curPath.size()>1) {
|
if (curPath.size()>1) {
|
||||||
|
|
|
@ -24,6 +24,7 @@ class FurnaceGUIFileDialog {
|
||||||
bool accepted();
|
bool accepted();
|
||||||
void close();
|
void close();
|
||||||
bool render(const ImVec2& min, const ImVec2& max);
|
bool render(const ImVec2& min, const ImVec2& max);
|
||||||
|
bool isOpen();
|
||||||
String getPath();
|
String getPath();
|
||||||
String getFileName();
|
String getFileName();
|
||||||
explicit FurnaceGUIFileDialog(bool system):
|
explicit FurnaceGUIFileDialog(bool system):
|
||||||
|
|
|
@ -2882,6 +2882,19 @@ bool FurnaceGUI::loop() {
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (fileDialog->isOpen() && settings.sysFileDialog) {
|
||||||
|
ImGui::OpenPopup("System File Dialog Pending");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ImGui::BeginPopupModal("System File Dialog Pending",NULL,ImGuiWindowFlags_NoTitleBar|ImGuiWindowFlags_NoBackground|ImGuiWindowFlags_NoResize|ImGuiWindowFlags_NoMove)) {
|
||||||
|
if (!fileDialog->isOpen()) {
|
||||||
|
ImGui::CloseCurrentPopup();
|
||||||
|
}
|
||||||
|
ImDrawList* dl=ImGui::GetForegroundDrawList();
|
||||||
|
dl->AddRectFilled(ImVec2(0.0f,0.0f),ImVec2(scrW*dpiScale,scrH*dpiScale),ImGui::ColorConvertFloat4ToU32(uiColors[GUI_COLOR_MODAL_BACKDROP]));
|
||||||
|
ImGui::EndPopup();
|
||||||
|
}
|
||||||
|
|
||||||
if (fileDialog->render(ImVec2(600.0f*dpiScale,400.0f*dpiScale),ImVec2(scrW*dpiScale,scrH*dpiScale))) {
|
if (fileDialog->render(ImVec2(600.0f*dpiScale,400.0f*dpiScale),ImVec2(scrW*dpiScale,scrH*dpiScale))) {
|
||||||
bool openOpen=false;
|
bool openOpen=false;
|
||||||
//ImGui::GetIO().ConfigFlags&=~ImGuiConfigFlags_NavEnableKeyboard;
|
//ImGui::GetIO().ConfigFlags&=~ImGuiConfigFlags_NavEnableKeyboard;
|
||||||
|
|
Loading…
Reference in a new issue