diff --git a/Source/UI/GameSettings/GameSettingsUI.cpp b/Source/UI/GameSettings/GameSettingsUI.cpp index abf725e5..94761cf9 100644 --- a/Source/UI/GameSettings/GameSettingsUI.cpp +++ b/Source/UI/GameSettings/GameSettingsUI.cpp @@ -1042,6 +1042,21 @@ void CUIGroupLogInOut::OnSelect(CUIRadioButton* button) { this->SetEnabled(button == this->m_onButton); } +// OFFSET: 0x00A41EB0 +// FUNCTION: fn_16006 +void CUIGroupProcessPriority::OnSelect(CUIRadioButton* button) { + if (this->m_highButton == button) { + dwPriorityClass = HIGH_PRIORITY_CLASS; + SetPriorityClass(GetCurrentProcess(), HIGH_PRIORITY_CLASS); + } else if (this->m_normalButton == button) { + dwPriorityClass = NORMAL_PRIORITY_CLASS; + SetPriorityClass(GetCurrentProcess(), NORMAL_PRIORITY_CLASS); + } else if (this->m_idleButton == button) { + dwPriorityClass = IDLE_PRIORITY_CLASS; + SetPriorityClass(GetCurrentProcess(), IDLE_PRIORITY_CLASS); + } +} + // OFFSET: 0x00A41F30 // FUNCTION: fn_16007 void CUIGroupRodexSpam::OnSelect(CUIRadioButton* button) { @@ -1093,6 +1108,26 @@ void CUIGroupLogInOut::Refresh() { this->m_offButton->Invalidate(); } +// OFFSET: 0x00A43760 +// FUNCTION: fn_16037 +void CUIGroupProcessPriority::Refresh() { + this->m_highButton->checked = dwPriorityClass == HIGH_PRIORITY_CLASS; + this->m_highButton->Invalidate(); + this->m_normalButton->checked = dwPriorityClass == NORMAL_PRIORITY_CLASS; + this->m_normalButton->Invalidate(); + this->m_idleButton->checked = dwPriorityClass == IDLE_PRIORITY_CLASS; + this->m_idleButton->Invalidate(); +} + +// OFFSET: 0x00A437D0 +// FUNCTION: fn_16038 +void CUIGroupRodexSpam::Refresh() { + this->m_onButton->checked = g_gameOptionFlag; + this->m_onButton->Invalidate(); + this->m_offButton->checked = !g_gameOptionFlag; + this->m_offButton->Invalidate(); +} + // OFFSET: 0x00A43810 // FUNCTION: fn_16039 void CUIGroupSkin::Refresh() { diff --git a/Source/UI/GameSettings/GameSettingsUI.h b/Source/UI/GameSettings/GameSettingsUI.h index 29707730..3fd7ebcb 100644 --- a/Source/UI/GameSettings/GameSettingsUI.h +++ b/Source/UI/GameSettings/GameSettingsUI.h @@ -18,6 +18,7 @@ class CUIStaticText; extern int g_textureDetailLevel; extern int g_textureFiltering; +extern bool g_gameOptionFlag; template class CUIComboBox : public CUIControl { public: @@ -110,9 +111,23 @@ public: /* 0090 */ CUIStaticText* m_offText; }; +class CUIGroupProcessPriority : public CUIGroup { +public: + void Refresh() override; + void OnSelect(CUIRadioButton* button); + + /* 0084 */ CUIRadioButton* m_highButton; + /* 0088 */ CUIStaticText* m_highText; + /* 008C */ CUIRadioButton* m_normalButton; + /* 0090 */ CUIStaticText* m_normalText; + /* 0094 */ CUIRadioButton* m_idleButton; + /* 0098 */ CUIStaticText* m_idleText; +}; + class CUIGroupRodexSpam : public CUIGroup { public: void Apply() override; + void Refresh() override; void OnSelect(CUIRadioButton* button); /* 0084 */ CUIRadioButton* m_onButton;