GUI: make ins picker a bit more clear
This commit is contained in:
parent
8f9f37f424
commit
0bd7278699
|
@ -514,9 +514,18 @@ void FurnaceGUI::drawInsList() {
|
||||||
ImGui::Separator();
|
ImGui::Separator();
|
||||||
for (int i=0; i<(int)e->song.ins.size(); i++) {
|
for (int i=0; i<(int)e->song.ins.size(); i++) {
|
||||||
DivInstrument* ins=e->song.ins[i];
|
DivInstrument* ins=e->song.ins[i];
|
||||||
if (ImGui::Selectable(fmt::sprintf("%.2x: %s##_INS%d\n",i,ins->name,i).c_str(),curIns==i)) {
|
String name;
|
||||||
|
if (ins->mode) { // FM
|
||||||
|
ImGui::PushStyleColor(ImGuiCol_Text,uiColors[GUI_COLOR_INSTR_FM]);
|
||||||
|
name=fmt::sprintf(ICON_FA_AREA_CHART "%.2x: %s##_INS%d\n",i,ins->name,i);
|
||||||
|
} else { // STD
|
||||||
|
ImGui::PushStyleColor(ImGuiCol_Text,uiColors[GUI_COLOR_INSTR_STD]);
|
||||||
|
name=fmt::sprintf(ICON_FA_BAR_CHART "%.2x: %s##_INS%d\n",i,ins->name,i);
|
||||||
|
}
|
||||||
|
if (ImGui::Selectable(name.c_str(),curIns==i)) {
|
||||||
curIns=i;
|
curIns=i;
|
||||||
}
|
}
|
||||||
|
ImGui::PopStyleColor();
|
||||||
if (ImGui::IsItemHovered()) {
|
if (ImGui::IsItemHovered()) {
|
||||||
if (ImGui::IsMouseDoubleClicked(ImGuiMouseButton_Left)) {
|
if (ImGui::IsMouseDoubleClicked(ImGuiMouseButton_Left)) {
|
||||||
insEditOpen=true;
|
insEditOpen=true;
|
||||||
|
@ -973,6 +982,10 @@ void FurnaceGUI::drawSampleList() {
|
||||||
curSample--;
|
curSample--;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
ImGui::SameLine();
|
||||||
|
if (ImGui::Button(ICON_FA_VOLUME_UP "##PreviewSampleL")) {
|
||||||
|
e->previewSample(curSample);
|
||||||
|
}
|
||||||
ImGui::Separator();
|
ImGui::Separator();
|
||||||
for (int i=0; i<(int)e->song.sample.size(); i++) {
|
for (int i=0; i<(int)e->song.sample.size(); i++) {
|
||||||
DivSample* sample=e->song.sample[i];
|
DivSample* sample=e->song.sample[i];
|
||||||
|
@ -1021,7 +1034,7 @@ void FurnaceGUI::drawSampleEdit() {
|
||||||
e->renderSamplesP();
|
e->renderSamplesP();
|
||||||
}
|
}
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
if (ImGui::Button(ICON_FA_PLAY "##PreviewSample")) {
|
if (ImGui::Button(ICON_FA_VOLUME_UP "##PreviewSample")) {
|
||||||
e->previewSample(curSample);
|
e->previewSample(curSample);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2147,10 +2160,12 @@ void FurnaceGUI::keyDown(SDL_Event& ev) {
|
||||||
editAdvance();
|
editAdvance();
|
||||||
curNibble=false;
|
curNibble=false;
|
||||||
} else {
|
} else {
|
||||||
e->noteOn(cursor.xCoarse,curIns,num);
|
if (key!=100) {
|
||||||
noteOffOnRelease=true;
|
e->noteOn(cursor.xCoarse,curIns,num);
|
||||||
noteOffOnReleaseKey=ev.key.keysym.sym;
|
noteOffOnRelease=true;
|
||||||
noteOffOnReleaseChan=cursor.xCoarse;
|
noteOffOnReleaseKey=ev.key.keysym.sym;
|
||||||
|
noteOffOnReleaseChan=cursor.xCoarse;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} catch (std::out_of_range& e) {
|
} catch (std::out_of_range& e) {
|
||||||
}
|
}
|
||||||
|
@ -2818,6 +2833,8 @@ FurnaceGUI::FurnaceGUI():
|
||||||
oldOrdersLen(0) {
|
oldOrdersLen(0) {
|
||||||
uiColors[GUI_COLOR_BACKGROUND]=ImVec4(0.1f,0.1f,0.1f,1.0f);
|
uiColors[GUI_COLOR_BACKGROUND]=ImVec4(0.1f,0.1f,0.1f,1.0f);
|
||||||
uiColors[GUI_COLOR_FRAME_BACKGROUND]=ImVec4(0.0f,0.0f,0.0f,0.85f);
|
uiColors[GUI_COLOR_FRAME_BACKGROUND]=ImVec4(0.0f,0.0f,0.0f,0.85f);
|
||||||
|
uiColors[GUI_COLOR_INSTR_FM]=ImVec4(0.6f,0.9f,1.0f,1.0f);
|
||||||
|
uiColors[GUI_COLOR_INSTR_STD]=ImVec4(0.6f,1.0f,0.5f,1.0f);
|
||||||
uiColors[GUI_COLOR_CHANNEL_FM]=ImVec4(0.2f,0.8f,1.0f,1.0f);
|
uiColors[GUI_COLOR_CHANNEL_FM]=ImVec4(0.2f,0.8f,1.0f,1.0f);
|
||||||
uiColors[GUI_COLOR_CHANNEL_PULSE]=ImVec4(0.4f,1.0f,0.2f,1.0f);
|
uiColors[GUI_COLOR_CHANNEL_PULSE]=ImVec4(0.4f,1.0f,0.2f,1.0f);
|
||||||
uiColors[GUI_COLOR_CHANNEL_NOISE]=ImVec4(0.8f,0.8f,0.8f,1.0f);
|
uiColors[GUI_COLOR_CHANNEL_NOISE]=ImVec4(0.8f,0.8f,0.8f,1.0f);
|
||||||
|
|
|
@ -13,6 +13,8 @@ enum FurnaceGUIColors {
|
||||||
GUI_COLOR_HEADER,
|
GUI_COLOR_HEADER,
|
||||||
GUI_COLOR_ITEM_BACKGROUND,
|
GUI_COLOR_ITEM_BACKGROUND,
|
||||||
GUI_COLOR_ITEM_FOREGROUND,
|
GUI_COLOR_ITEM_FOREGROUND,
|
||||||
|
GUI_COLOR_INSTR_FM,
|
||||||
|
GUI_COLOR_INSTR_STD,
|
||||||
GUI_COLOR_CHANNEL_FM,
|
GUI_COLOR_CHANNEL_FM,
|
||||||
GUI_COLOR_CHANNEL_PULSE,
|
GUI_COLOR_CHANNEL_PULSE,
|
||||||
GUI_COLOR_CHANNEL_NOISE,
|
GUI_COLOR_CHANNEL_NOISE,
|
||||||
|
|
Loading…
Reference in a new issue