mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-30 08:23:01 +00:00
GUI: add channel font option
This commit is contained in:
parent
75bcad558a
commit
ebb939c189
3 changed files with 19 additions and 0 deletions
|
@ -1178,6 +1178,7 @@ class FurnaceGUI {
|
|||
int channelStyle;
|
||||
int channelVolStyle;
|
||||
int channelFeedbackStyle;
|
||||
int channelFont;
|
||||
int maxRecentFile;
|
||||
unsigned int maxUndoSteps;
|
||||
String mainFontPath;
|
||||
|
@ -1299,6 +1300,7 @@ class FurnaceGUI {
|
|||
channelStyle(0),
|
||||
channelVolStyle(0),
|
||||
channelFeedbackStyle(1),
|
||||
channelFont(1),
|
||||
maxRecentFile(10),
|
||||
maxUndoSteps(100),
|
||||
mainFontPath(""),
|
||||
|
|
|
@ -523,10 +523,15 @@ void FurnaceGUI::drawPattern() {
|
|||
ImGui::PushStyleColor(ImGuiCol_Text,ImGui::GetColorU32(channelTextColor(i)));
|
||||
ImGui::TableSetBgColor(ImGuiTableBgTarget_CellBg,ImGui::GetColorU32(chanHead));
|
||||
if (muted) ImGui::PushStyleColor(ImGuiCol_Text,uiColors[GUI_COLOR_CHANNEL_MUTED]);
|
||||
if (settings.channelFont==0) ImGui::PushFont(mainFont);
|
||||
|
||||
// TODO: appearance
|
||||
ImGui::Selectable(chanID,true,ImGuiSelectableFlags_NoPadWithHalfSpacing,ImVec2(0.0f,lineHeight+1.0f*dpiScale));
|
||||
|
||||
if (displayTooltip && ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip("%s",e->getChannelName(i));
|
||||
}
|
||||
if (settings.channelFont==0) ImGui::PopFont();
|
||||
if (ImGui::IsItemClicked(ImGuiMouseButton_Left)) {
|
||||
if (settings.soloAction!=1 && soloTimeout>0 && soloChan==i) {
|
||||
e->toggleSolo(i);
|
||||
|
|
|
@ -1343,6 +1343,15 @@ void FurnaceGUI::drawSettings() {
|
|||
settings.channelFeedbackStyle=3;
|
||||
}
|
||||
|
||||
ImGui::Text("Channel font:");
|
||||
|
||||
if (ImGui::RadioButton("Regular##CHFont0",settings.channelFont==0)) {
|
||||
settings.channelFont=0;
|
||||
}
|
||||
if (ImGui::RadioButton("Monospace##CHFont1",settings.channelFont==1)) {
|
||||
settings.channelFont=1;
|
||||
}
|
||||
|
||||
ImGui::Separator();
|
||||
|
||||
bool insEditColorizeB=settings.insEditColorize;
|
||||
|
@ -2282,6 +2291,7 @@ void FurnaceGUI::syncSettings() {
|
|||
settings.channelStyle=e->getConfInt("channelStyle",0);
|
||||
settings.channelVolStyle=e->getConfInt("channelVolStyle",0);
|
||||
settings.channelFeedbackStyle=e->getConfInt("channelFeedbackStyle",1);
|
||||
settings.channelFont=e->getConfInt("channelFont",1);
|
||||
settings.maxRecentFile=e->getConfInt("maxRecentFile",10);
|
||||
|
||||
clampSetting(settings.mainFontSize,2,96);
|
||||
|
@ -2381,6 +2391,7 @@ void FurnaceGUI::syncSettings() {
|
|||
clampSetting(settings.channelStyle,0,5);
|
||||
clampSetting(settings.channelVolStyle,0,3);
|
||||
clampSetting(settings.channelFeedbackStyle,0,3);
|
||||
clampSetting(settings.channelFont,0,1);
|
||||
clampSetting(settings.maxRecentFile,0,30);
|
||||
|
||||
settings.initialSys=e->decodeSysDesc(e->getConfString("initialSys",""));
|
||||
|
@ -2536,6 +2547,7 @@ void FurnaceGUI::commitSettings() {
|
|||
e->setConf("channelStyle",settings.channelStyle);
|
||||
e->setConf("channelVolStyle",settings.channelVolStyle);
|
||||
e->setConf("channelFeedbackStyle",settings.channelFeedbackStyle);
|
||||
e->setConf("channelFont",settings.channelFont);
|
||||
e->setConf("maxRecentFile",settings.maxRecentFile);
|
||||
|
||||
// colors
|
||||
|
|
Loading…
Reference in a new issue