commit b88e5cd4bded8fc1e096c58f2ea62e154011d29b
Author: DPS2004 <dpsophinos@gmail.com>
AuthorDate: Mon Mar 21 12:49:11 2022 -0400
Commit: DPS2004 <dpsophinos@gmail.com>
CommitDate: Mon May 2 09:40:54 2022 -0400
theme is selectable from settings
---
source/FakoBios.h | 6 +++++-
source/host.h | 7 +++++++
source/hostCommonFunctions.cpp | 13 +++++++++++++
3 files changed, 25 insertions(+), 1 deletion(-)
diff --git a/source/FakoBios.h b/source/FakoBios.h
index fd8a02e..6a755f2 100644
--- a/source/FakoBios.h
+++ b/source/FakoBios.h
@@ -356,7 +356,11 @@ end
inits = {classic_init,fancy_init}
function _init()
- theme = 1
+ if __getsetting then
+ theme = __getsetting('menustyle')
+ else
+ theme = 1
+ end
inits[theme+1]()
end
diff --git a/source/host.h b/source/host.h
index c80ee75..67f388d 100644
--- a/source/host.h
+++ b/source/host.h
@@ -37,6 +37,12 @@ enum KeyboardOption {
Lowercase
};
+enum MenuStyleOption {
+ Classic,
+ Fancy,
+ Splore
+};
+
enum BgColorOption {
Gray,
Black,
@@ -65,6 +71,7 @@ class Host {
StretchOption stretch = PixelPerfectStretch;
KeyboardOption kbmode = Emoji;
ResizekeyOption resizekey = NoResize;
+ MenuStyleOption menustyle = Fancy;
BgColorOption bgcolor = Gray;
float scaleX = 1.0;
diff --git a/source/hostCommonFunctions.cpp b/source/hostCommonFunctions.cpp
index e8eb978..96013f0 100644
--- a/source/hostCommonFunctions.cpp
+++ b/source/hostCommonFunctions.cpp
@@ -23,6 +23,7 @@ std::string defaultIni =
"stretch = 1\n"
"resizekey = 0\n"
"kbmode = 0\n"
+"menustyle = 1\n"
"bgcolor = 0\n";
void Host::setUpPaletteColors(){
@@ -156,6 +157,10 @@ void Host::loadSettingsIni(){
long kbmodeSetting = settingsIni.GetLongValue("settings", "kbmode", (long)Emoji);
kbmode = (KeyboardOption) kbmodeSetting;
+ //bgcolor
+ long menustyleSetting = settingsIni.GetLongValue("settings", "menustyle", (long)Fancy);
+ menustyle = (MenuStyleOption) menustyleSetting;
+
//bgcolor
long bgcolorSetting = settingsIni.GetLongValue("settings", "bgcolor", (long)Gray);
bgcolor = (BgColorOption) bgcolorSetting;
@@ -173,6 +178,7 @@ void Host::saveSettingsIni(){
settingsIni.SetLongValue("settings", "resizekey", resizekey);
settingsIni.SetLongValue("settings", "kbmode", kbmode);
+ settingsIni.SetLongValue("settings", "menustyle", menustyle);
settingsIni.SetLongValue("settings", "bgcolor", bgcolor);
std::string settingsIniStr = "";
@@ -224,6 +230,9 @@ int Host::getSetting(std::string sname) {
}else if(sname == "stretch"){
Logger_Write("Returning Stretch setting\n");
return stretch;
+ }else if(sname == "menustyle"){
+ Logger_Write("Returning menu style setting\n");
+ return menustyle;
}else if(sname == "bgcolor"){
Logger_Write("Returning bg color setting\n");
return bgcolor;
@@ -276,6 +285,10 @@ void Host::setSetting(std::string sname, int sval) {
//force change stretch
forceStretch(stretch);
+ }else if(sname == "menustyle"){
+ Logger_Write("setting menustyle\n");
+ menustyle = (MenuStyleOption) sval;
+
}else if(sname == "bgcolor"){
Logger_Write("setting bgcolor\n");
bgcolor = (BgColorOption) sval;