summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authoreray orçunus <erayorcunus@gmail.com>2020-08-25 02:27:38 +0200
committereray orçunus <erayorcunus@gmail.com>2020-08-25 02:27:38 +0200
commit76585772607a7fbbed9e19ee0b4556b9140cde16 (patch)
tree5ce431d282b669f5606cf8eb34b2189d8f098f35 /src/core
parentnew frontend customization (diff)
downloadre3-76585772607a7fbbed9e19ee0b4556b9140cde16.tar
re3-76585772607a7fbbed9e19ee0b4556b9140cde16.tar.gz
re3-76585772607a7fbbed9e19ee0b4556b9140cde16.tar.bz2
re3-76585772607a7fbbed9e19ee0b4556b9140cde16.tar.lz
re3-76585772607a7fbbed9e19ee0b4556b9140cde16.tar.xz
re3-76585772607a7fbbed9e19ee0b4556b9140cde16.tar.zst
re3-76585772607a7fbbed9e19ee0b4556b9140cde16.zip
Diffstat (limited to '')
-rw-r--r--src/core/Frontend.cpp64
-rw-r--r--src/core/Game.cpp5
-rw-r--r--src/core/re3.cpp9
3 files changed, 43 insertions, 35 deletions
diff --git a/src/core/Frontend.cpp b/src/core/Frontend.cpp
index fbefe354..0e358fc5 100644
--- a/src/core/Frontend.cpp
+++ b/src/core/Frontend.cpp
@@ -1075,6 +1075,38 @@ CMenuManager::Draw()
leftText = TheText.Get(aScreens[m_nCurrScreen].m_aEntries[i].m_EntryName);
}
+#ifdef CUSTOM_FRONTEND_OPTIONS
+ if (aScreens[m_nCurrScreen].m_aEntries[i].m_SaveSlot == SAVESLOT_CFO) {
+ FrontendOption &option = customFrontendOptions[aScreens[m_nCurrScreen].m_aEntries[i].m_TargetMenu];
+ if (option.type == FEOPTION_SELECT) {
+ if (option.onlyApplyOnEnter){
+ if (m_nCurrOption != i) {
+ if (option.displayedValue != option.lastSavedValue)
+ SetHelperText(3); // Restored original value
+
+// option.displayedValue = option.lastSavedValue = *option.value;
+
+ } else {
+ if (option.displayedValue != *option.value)
+ SetHelperText(1); // Enter to apply
+ else if (m_nHelperTextMsgId == 1)
+ ResetHelperText(); // Applied
+ }
+ }
+ }
+
+ if (m_nCurrOption != lastOption && lastOption == i) {
+ FrontendOption &oldOption = customFrontendOptions[aScreens[m_nCurrScreen].m_aEntries[lastOption].m_TargetMenu];
+ if (oldOption.type == FEOPTION_DYNAMIC || oldOption.type == FEOPTION_BUILTIN_ACTION)
+ if(oldOption.buttonPressFunc)
+ oldOption.buttonPressFunc(FEOPTION_ACTION_FOCUSLOSS);
+
+ if (oldOption.onlyApplyOnEnter && oldOption.type == FEOPTION_SELECT)
+ oldOption.displayedValue = oldOption.lastSavedValue = *oldOption.value;
+ }
+ }
+#endif
+
switch (aScreens[m_nCurrScreen].m_aEntries[i].m_Action) {
case MENUACTION_CHANGEMENU: {
switch (aScreens[m_nCurrScreen].m_aEntries[i].m_TargetMenu) {
@@ -1477,38 +1509,6 @@ CMenuManager::Draw()
}
}
-#ifdef CUSTOM_FRONTEND_OPTIONS
- if (aScreens[m_nCurrScreen].m_aEntries[i].m_SaveSlot == SAVESLOT_CFO) {
- FrontendOption &option = customFrontendOptions[aScreens[m_nCurrScreen].m_aEntries[i].m_TargetMenu];
- if (option.type == FEOPTION_SELECT) {
- if (option.onlyApplyOnEnter){
- if (m_nCurrOption != i) {
- if (option.displayedValue != option.lastSavedValue)
- SetHelperText(3); // Restored original value
-
-// option.displayedValue = option.lastSavedValue = *option.value;
-
- } else {
- if (option.displayedValue != *option.value)
- SetHelperText(1); // Enter to apply
- else if (m_nHelperTextMsgId == 1)
- ResetHelperText(); // Applied
- }
- }
- }
-
- if (m_nCurrOption != lastOption && lastOption == i) {
- FrontendOption &oldOption = customFrontendOptions[aScreens[m_nCurrScreen].m_aEntries[lastOption].m_TargetMenu];
- if (oldOption.type == FEOPTION_DYNAMIC || oldOption.type == FEOPTION_BUILTIN_ACTION)
- if(oldOption.buttonPressFunc)
- oldOption.buttonPressFunc(FEOPTION_ACTION_FOCUSLOSS);
-
- if (oldOption.onlyApplyOnEnter && oldOption.type == FEOPTION_SELECT)
- oldOption.displayedValue = oldOption.lastSavedValue = *oldOption.value;
- }
- }
-#endif
-
// Sliders
int lastActiveBarX;
switch (aScreens[m_nCurrScreen].m_aEntries[i].m_Action) {
diff --git a/src/core/Game.cpp b/src/core/Game.cpp
index c0530709..e944512a 100644
--- a/src/core/Game.cpp
+++ b/src/core/Game.cpp
@@ -295,7 +295,10 @@ bool CGame::InitialiseOnceAfterRW(void)
CWorld::Players[0].SetPlayerSkin(CMenuManager::m_PrefsSkinFile);
#ifdef CUSTOM_FRONTEND_OPTIONS
- CustomFrontendOptionsPopulate();
+ if (numCustomFrontendOptions == 0 && numCustomFrontendScreens == 0) {
+ CustomFrontendOptionsPopulate();
+ FrontEndMenuManager.LoadSettings();
+ }
#endif
return true;
}
diff --git a/src/core/re3.cpp b/src/core/re3.cpp
index 2922f73e..a7a0d7f1 100644
--- a/src/core/re3.cpp
+++ b/src/core/re3.cpp
@@ -177,7 +177,12 @@ wchar* MultiSamplingDraw(bool *disabled, bool userHovering) {
} else {
FrontEndMenuManager.SetHelperText(1);
}
+ } else {
+ if (FrontEndMenuManager.m_nDisplayMSAALevel != FrontEndMenuManager.m_nPrefsMSAALevel) {
+ FrontEndMenuManager.m_nDisplayMSAALevel = FrontEndMenuManager.m_nPrefsMSAALevel;
+ }
}
+
if (!FrontEndMenuManager.m_bGameNotLoaded)
*disabled = true;
@@ -305,7 +310,7 @@ CustomFrontendOptionsPopulate(void)
#endif
// -- Graphics/display seperation preperation end
- static const wchar* off_on[] = { TheText.Get("FEM_OFF"), TheText.Get("FEM_ON") };
+ const wchar* off_on[] = { TheText.Get("FEM_OFF"), TheText.Get("FEM_ON") };
#ifdef MORE_LANGUAGES
FrontendOptionSetCursor(MENUPAGE_LANGUAGE_SETTINGS, -2);
@@ -326,7 +331,7 @@ CustomFrontendOptionsPopulate(void)
CLONE_OPTION(TheText.Get("FED_WIS"), MENUACTION_WIDESCREEN, nil, nil)
#ifdef IMPROVED_VIDEOMODE
- static const wchar* screenModes[] = { (wchar*)L"FULLSCREEN", (wchar*)L"WINDOWED" };
+ const wchar* screenModes[] = { TheText.Get("FED_FLS"), TheText.Get("FED_WND") };
// Storing isn't enabled because it's handled in Frontend
FrontendOptionAddSelect(TheText.Get("FEM_SCF"), screenModes, 2, (int8*)&FrontEndMenuManager.m_nPrefsWindowed, true, ScreenModeChange, nil);
#endif