GUI: some improvements
- mobile UI work - highlight channel at cursor in orders
This commit is contained in:
parent
086d9a12b0
commit
bd77bd0a81
|
|
@ -410,7 +410,7 @@ void FurnaceGUI::drawInsList(bool asChild) {
|
|||
curIns=i;
|
||||
wavePreviewInit=true;
|
||||
}
|
||||
if (ImGui::IsItemHovered() && i>=0) {
|
||||
if (ImGui::IsItemHovered() && i>=0 && !mobileUI) {
|
||||
ImGui::PushStyleColor(ImGuiCol_Text,uiColors[GUI_COLOR_TEXT]);
|
||||
ImGui::SetTooltip("%s",insType);
|
||||
ImGui::PopStyleColor();
|
||||
|
|
@ -679,7 +679,7 @@ void FurnaceGUI::actualSampleList() {
|
|||
updateSampleTex=true;
|
||||
}
|
||||
if (wantScrollList && curSample==i) ImGui::SetScrollHereY();
|
||||
if (ImGui::IsItemHovered()) {
|
||||
if (ImGui::IsItemHovered() && !mobileUI) {
|
||||
ImGui::SetTooltip("Bank %d: %s",i/12,sampleNote[i%12]);
|
||||
if (ImGui::IsMouseDoubleClicked(ImGuiMouseButton_Left)) {
|
||||
sampleEditOpen=true;
|
||||
|
|
|
|||
|
|
@ -3896,8 +3896,12 @@ bool FurnaceGUI::loop() {
|
|||
if (fileDialog->isError()) {
|
||||
#if defined(_WIN32) || defined(__APPLE__)
|
||||
showError("there was an error in the file dialog! you may want to report this issue to:\nhttps://github.com/tildearrow/furnace/issues\ncheck the Log Viewer (window > log viewer) for more information.\n\nfor now please disable the system file picker in Settings > General.");
|
||||
#else
|
||||
#ifdef ANDROID
|
||||
showError("can't do anything without Storage permissions!");
|
||||
#else
|
||||
showError("Zenity/KDialog not available!\nplease install one of these, or disable the system file picker in Settings > General.");
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
if (fileDialog->accepted()) {
|
||||
|
|
|
|||
|
|
@ -1212,6 +1212,7 @@ class FurnaceGUI {
|
|||
int midiOutMode;
|
||||
int maxRecentFile;
|
||||
int centerPattern;
|
||||
int ordersCursor;
|
||||
unsigned int maxUndoSteps;
|
||||
String mainFontPath;
|
||||
String patFontPath;
|
||||
|
|
@ -1338,6 +1339,7 @@ class FurnaceGUI {
|
|||
midiOutMode(1),
|
||||
maxRecentFile(10),
|
||||
centerPattern(0),
|
||||
ordersCursor(1),
|
||||
maxUndoSteps(100),
|
||||
mainFontPath(""),
|
||||
patFontPath(""),
|
||||
|
|
|
|||
|
|
@ -102,7 +102,7 @@ void FurnaceGUI::drawOrders() {
|
|||
//}
|
||||
|
||||
ImGui::PushStyleColor(ImGuiCol_Text,(curOrder==i || e->curOrders->ord[j][i]==e->curOrders->ord[j][curOrder])?uiColors[GUI_COLOR_ORDER_SIMILAR]:uiColors[GUI_COLOR_ORDER_INACTIVE]);
|
||||
if (ImGui::Selectable(selID,(orderEditMode!=0 && curOrder==i && orderCursor==j))) {
|
||||
if (ImGui::Selectable(selID,settings.ordersCursor?(cursor.xCoarse==j && oldOrder1!=i):false)) {
|
||||
if (curOrder==i) {
|
||||
if (orderEditMode==0) {
|
||||
prepareUndo(GUI_UNDO_CHANGE_ORDER);
|
||||
|
|
@ -135,6 +135,11 @@ void FurnaceGUI::drawOrders() {
|
|||
}
|
||||
}
|
||||
ImGui::PopStyleColor();
|
||||
if (orderEditMode!=0 && curOrder==i && orderCursor==j) {
|
||||
// draw a border
|
||||
ImDrawList* dl=ImGui::GetWindowDrawList();
|
||||
dl->AddRect(ImGui::GetItemRectMin(),ImGui::GetItemRectMax(),ImGui::GetColorU32(uiColors[GUI_COLOR_TEXT]),2.0f*dpiScale);
|
||||
}
|
||||
if (!pat->name.empty() && ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip("%s",pat->name.c_str());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -437,7 +437,7 @@ void FurnaceGUI::drawPattern() {
|
|||
if (ImGui::Selectable((extraChannelButtons==2)?" --##ExtraChannelButtons":" ++##ExtraChannelButtons",false,ImGuiSelectableFlags_NoPadWithHalfSpacing,ImVec2(0.0f,lineHeight+1.0f*dpiScale))) {
|
||||
if (++extraChannelButtons>2) extraChannelButtons=0;
|
||||
}
|
||||
if (ImGui::IsItemHovered()) {
|
||||
if (ImGui::IsItemHovered() && !mobileUI) {
|
||||
if (extraChannelButtons==2) {
|
||||
ImGui::SetTooltip("Pattern names (click to collapse)\nRight-click for visualizer");
|
||||
} else if (extraChannelButtons==1) {
|
||||
|
|
@ -706,7 +706,7 @@ void FurnaceGUI::drawPattern() {
|
|||
|
||||
if (extraChannelButtons==0 || settings.channelVolStyle!=0) ImGui::PopStyleVar();
|
||||
|
||||
if (displayTooltip && ImGui::IsItemHovered()) {
|
||||
if (displayTooltip && ImGui::IsItemHovered() && !mobileUI) {
|
||||
ImGui::SetTooltip("%s",e->getChannelName(i));
|
||||
}
|
||||
if (settings.channelFont==0) ImGui::PopFont();
|
||||
|
|
|
|||
|
|
@ -1460,6 +1460,11 @@ void FurnaceGUI::drawSettings() {
|
|||
settings.sysSeparators=sysSeparatorsB;
|
||||
}*/
|
||||
|
||||
bool ordersCursorB=settings.ordersCursor;
|
||||
if (ImGui::Checkbox("Highlight channel at cursor in Orders",&ordersCursorB)) {
|
||||
settings.ordersCursor=ordersCursorB;
|
||||
}
|
||||
|
||||
bool partyTimeB=settings.partyTime;
|
||||
if (ImGui::Checkbox("About screen party time",&partyTimeB)) {
|
||||
settings.partyTime=partyTimeB;
|
||||
|
|
@ -2371,6 +2376,7 @@ void FurnaceGUI::syncSettings() {
|
|||
settings.midiOutClock=e->getConfInt("midiOutClock",0);
|
||||
settings.midiOutMode=e->getConfInt("midiOutMode",1);
|
||||
settings.centerPattern=e->getConfInt("centerPattern",0);
|
||||
settings.ordersCursor=e->getConfInt("ordersCursor",1);
|
||||
|
||||
clampSetting(settings.mainFontSize,2,96);
|
||||
clampSetting(settings.patFontSize,2,96);
|
||||
|
|
@ -2475,6 +2481,7 @@ void FurnaceGUI::syncSettings() {
|
|||
clampSetting(settings.midiOutClock,0,1);
|
||||
clampSetting(settings.midiOutMode,0,2);
|
||||
clampSetting(settings.centerPattern,0,1);
|
||||
clampSetting(settings.ordersCursor,0,1);
|
||||
|
||||
String initialSys2=e->getConfString("initialSys2","");
|
||||
if (initialSys2.empty()) {
|
||||
|
|
@ -2640,6 +2647,7 @@ void FurnaceGUI::commitSettings() {
|
|||
e->setConf("midiOutClock",settings.midiOutClock);
|
||||
e->setConf("midiOutMode",settings.midiOutMode);
|
||||
e->setConf("centerPattern",settings.centerPattern);
|
||||
e->setConf("ordersCursor",settings.ordersCursor);
|
||||
|
||||
// colors
|
||||
for (int i=0; i<GUI_COLOR_MAX; i++) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue