diff --git a/src/gui/gui.h b/src/gui/gui.h index 80aa087f..92218276 100644 --- a/src/gui/gui.h +++ b/src/gui/gui.h @@ -1085,7 +1085,9 @@ class FurnaceGUI { int roundedButtons; int roundedMenus; int loadJapanese; - int loadChinese; + int loadChineseSimplified; + int loadChineseTraditional; + int loadKorean; int fmLayout; int sampleLayout; int waveLayout; @@ -1202,7 +1204,9 @@ class FurnaceGUI { roundedButtons(1), roundedMenus(0), loadJapanese(0), - loadChinese(0), + loadChineseSimplified(0), + loadChineseTraditional(0), + loadKorean(0), fmLayout(0), sampleLayout(0), waveLayout(0), diff --git a/src/gui/settings.cpp b/src/gui/settings.cpp index 03c32e65..0e1ed389 100644 --- a/src/gui/settings.cpp +++ b/src/gui/settings.cpp @@ -1072,9 +1072,9 @@ void FurnaceGUI::drawSettings() { ); } - bool loadChineseB=settings.loadChinese; - if (ImGui::Checkbox("Display Chinese (Simplified) characters",&loadChineseB)) { - settings.loadChinese=loadChineseB; + bool loadChineseSimplifiedB=settings.loadChineseSimplified; + if (ImGui::Checkbox("Display Chinese (Simplified) characters",&loadChineseSimplifiedB)) { + settings.loadChineseSimplified=loadChineseSimplifiedB; } if (ImGui::IsItemHovered()) { ImGui::SetTooltip( @@ -1085,6 +1085,32 @@ void FurnaceGUI::drawSettings() { ); } + bool loadChineseTraditionalB=settings.loadChineseTraditional; + if (ImGui::Checkbox("Display Chinese (Traditional) characters",&loadChineseTraditionalB)) { + settings.loadChineseTraditional=loadChineseTraditionalB; + } + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip( + "Only toggle this option if you have enough graphics memory.\n" + "This is a temporary solution until dynamic font atlas is implemented in Dear ImGui.\n\n" + "請在確保你有足夠的顯存后再啟動此設定\n" + "這是一個在ImGui實現動態字體加載之前的臨時解決方案" + ); + } + + bool loadKoreanB=settings.loadKorean; + if (ImGui::Checkbox("Display Korean characters",&loadKoreanB)) { + settings.loadKorean=loadKoreanB; + } + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip( + "Only toggle this option if you have enough graphics memory.\n" + "This is a temporary solution until dynamic font atlas is implemented in Dear ImGui.\n\n" + "그래픽 메모리가 충분한 경우에만 이 옵션을 선택하십시오.\n" + "이 옵션은 Dear ImGui에 동적 글꼴 아틀라스가 구현될 때까지 임시 솔루션입니다." + ); + } + ImGui::Separator(); ImGui::Text("Pattern view labels:"); @@ -2170,7 +2196,9 @@ void FurnaceGUI::syncSettings() { settings.roundedButtons=e->getConfInt("roundedButtons",1); settings.roundedMenus=e->getConfInt("roundedMenus",0); settings.loadJapanese=e->getConfInt("loadJapanese",0); - settings.loadChinese=e->getConfInt("loadChinese",0); + settings.loadChineseSimplified=e->getConfInt("loadChineseSimplified",0); + settings.loadChineseTraditional=e->getConfInt("loadChineseTraditional",0); + settings.loadKorean=e->getConfInt("loadKorean",0); settings.fmLayout=e->getConfInt("fmLayout",0); settings.sampleLayout=e->getConfInt("sampleLayout",0); settings.waveLayout=e->getConfInt("waveLayout",0); @@ -2274,7 +2302,9 @@ void FurnaceGUI::syncSettings() { clampSetting(settings.roundedButtons,0,1); clampSetting(settings.roundedMenus,0,1); clampSetting(settings.loadJapanese,0,1); - clampSetting(settings.loadChinese,0,1); + clampSetting(settings.loadChineseSimplified,0,1); + clampSetting(settings.loadChineseTraditional,0,1); + clampSetting(settings.loadKorean,0,1); clampSetting(settings.fmLayout,0,6); clampSetting(settings.susPosition,0,1); clampSetting(settings.effectCursorDir,0,2); @@ -2413,7 +2443,9 @@ void FurnaceGUI::commitSettings() { e->setConf("roundedButtons",settings.roundedButtons); e->setConf("roundedMenus",settings.roundedMenus); e->setConf("loadJapanese",settings.loadJapanese); - e->setConf("loadChinese",settings.loadChinese); + e->setConf("loadChineseSimplified",settings.loadChineseSimplified); + e->setConf("loadChineseTraditional",settings.loadChineseTraditional); + e->setConf("loadKorean",settings.loadKorean); e->setConf("fmLayout",settings.fmLayout); e->setConf("sampleLayout",settings.sampleLayout); e->setConf("waveLayout",settings.waveLayout); @@ -3061,9 +3093,15 @@ void FurnaceGUI::applyUISettings(bool updateFonts) { if (settings.loadJapanese) { range.AddRanges(ImGui::GetIO().Fonts->GetGlyphRangesJapanese()); } - if (settings.loadChinese) { + if (settings.loadChineseSimplified) { range.AddRanges(ImGui::GetIO().Fonts->GetGlyphRangesChineseSimplifiedCommon()); } + if (settings.loadChineseTraditional) { + range.AddRanges(ImGui::GetIO().Fonts->GetGlyphRangesChineseFull()); + } + if (settings.loadKorean) { + range.AddRanges(ImGui::GetIO().Fonts->GetGlyphRangesKorean()); + } // I'm terribly sorry range.UsedChars[0x80>>5]=0;