why am I working so slowly on this
This commit is contained in:
parent
a897bbcca3
commit
20ee4f4048
3 changed files with 24 additions and 6 deletions
|
|
@ -3294,6 +3294,7 @@ void FurnaceGUI::toggleMobileUI(bool enable, bool force) {
|
|||
ImGui::GetIO().ConfigFlags|=ImGuiConfigFlags_NoHoverColors;
|
||||
ImGui::GetIO().AlwaysScrollText=true;
|
||||
fileDialog->mobileUI=true;
|
||||
newFilePicker->setMobile(true);
|
||||
} else {
|
||||
ImGui::GetIO().IniFilename=NULL;
|
||||
if (!ImGui::LoadIniSettingsFromDisk(finalLayoutPath,true)) {
|
||||
|
|
@ -3304,6 +3305,7 @@ void FurnaceGUI::toggleMobileUI(bool enable, bool force) {
|
|||
ImGui::GetIO().ConfigFlags&=~ImGuiConfigFlags_NoHoverColors;
|
||||
ImGui::GetIO().AlwaysScrollText=false;
|
||||
fileDialog->mobileUI=false;
|
||||
newFilePicker->setMobile(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -7766,6 +7768,10 @@ bool FurnaceGUI::init() {
|
|||
}
|
||||
}
|
||||
|
||||
newFilePicker=new FurnaceFilePicker;
|
||||
newFilePicker->setHomeDir(getHomeDir());
|
||||
newFilePicker->open("New File Picker","/home",false);
|
||||
|
||||
updateWindowTitle();
|
||||
updateROMExportAvail();
|
||||
|
||||
|
|
@ -7871,10 +7877,6 @@ bool FurnaceGUI::init() {
|
|||
|
||||
userEvents=SDL_RegisterEvents(1);
|
||||
|
||||
newFilePicker=new FurnaceFilePicker;
|
||||
newFilePicker->setHomeDir(getHomeDir());
|
||||
newFilePicker->open("New File Picker","/home",false);
|
||||
|
||||
e->setMidiCallback([this](const TAMidiMessage& msg) -> int {
|
||||
if (introPos<11.0) return -3;
|
||||
midiLock.lock();
|
||||
|
|
|
|||
|
|
@ -291,7 +291,9 @@ bool FurnaceFilePicker::draw() {
|
|||
chosenEntries.push_back(i);
|
||||
i->isSelected=true;
|
||||
updateEntryName();
|
||||
if (ImGui::IsMouseDoubleClicked(ImGuiMouseButton_Left)) {
|
||||
if (isMobile) {
|
||||
acknowledged=true;
|
||||
} else if (ImGui::IsMouseDoubleClicked(ImGuiMouseButton_Left)) {
|
||||
acknowledged=true;
|
||||
}
|
||||
}
|
||||
|
|
@ -325,6 +327,9 @@ bool FurnaceFilePicker::draw() {
|
|||
ImGui::SameLine();
|
||||
ImGui::SetNextItemWidth(ImGui::GetContentRegionAvail().x);
|
||||
if (ImGui::InputText("##EntryName",&entryName)) {
|
||||
// find an entry with this name
|
||||
|
||||
|
||||
}
|
||||
|
||||
ImGui::BeginDisabled(chosenEntries.empty());
|
||||
|
|
@ -375,6 +380,14 @@ bool FurnaceFilePicker::open(String name, String path, bool modal) {
|
|||
return true;
|
||||
}
|
||||
|
||||
const String& FurnaceFilePicker::getEntryName() {
|
||||
return entryName;
|
||||
}
|
||||
|
||||
void FurnaceFilePicker::setMobile(bool val) {
|
||||
isMobile=val;
|
||||
}
|
||||
|
||||
FilePickerStatus FurnaceFilePicker::getStatus() {
|
||||
FilePickerStatus retStatus=curStatus;
|
||||
curStatus=FP_STATUS_WAITING;
|
||||
|
|
@ -395,6 +408,7 @@ FurnaceFilePicker::FurnaceFilePicker():
|
|||
haveStat(false),
|
||||
stopReading(false),
|
||||
isOpen(false),
|
||||
isMobile(false),
|
||||
scheduledSort(0),
|
||||
curStatus(FP_STATUS_WAITING) {
|
||||
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ class FurnaceFilePicker {
|
|||
String homeDir;
|
||||
String entryName;
|
||||
ImGuiListClipper listClipper;
|
||||
bool haveFiles, haveStat, stopReading, isOpen;
|
||||
bool haveFiles, haveStat, stopReading, isOpen, isMobile;
|
||||
int scheduledSort;
|
||||
FilePickerStatus curStatus;
|
||||
|
||||
|
|
@ -76,7 +76,9 @@ class FurnaceFilePicker {
|
|||
void readDirectorySub();
|
||||
void setHomeDir(String where);
|
||||
FilePickerStatus getStatus();
|
||||
const String& getEntryName();
|
||||
const std::vector<FileEntry*>& getSelected();
|
||||
void setMobile(bool val);
|
||||
bool draw();
|
||||
bool open(String name, String path, bool modal);
|
||||
void loadSettings(DivConfig& conf);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue