Skip to content

Commit 660a0b9

Browse files
committed
chore: Refactor some code into SharedFunctions.
1 parent e128664 commit 660a0b9

File tree

3 files changed

+12
-10
lines changed

3 files changed

+12
-10
lines changed

Plugin/src/Menus/LevelUpMenu.h

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -223,16 +223,6 @@ namespace RE
223223
return true;
224224
}
225225

226-
bool IsXPMetervisible()
227-
{
228-
BSFixedString menuString("HUDMenu");
229-
IMenu* menu = UI::GetSingleton()->GetMenu(menuString).get();
230-
Scaleform::GFx::Value openValue;
231-
menu->uiMovie->asMovieRoot->GetVariable(&openValue, "root.HUDNotificationsGroup_mc.XPMeter_mc.visible");
232-
233-
return openValue.GetBoolean();
234-
}
235-
236226
std::uint32_t GetSkillArrayIndexByEditorID(const char* editorID)
237227
{
238228
// Create a map of editor IDs to skill array indices.

Plugin/src/Shared/SharedFunctions.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,5 +134,15 @@ namespace RE
134134

135135
return amount;
136136
}
137+
138+
bool IsXPMetervisible()
139+
{
140+
BSFixedString menuString("HUDMenu");
141+
IMenu* menu = UI::GetSingleton()->GetMenu(menuString).get();
142+
Scaleform::GFx::Value openValue;
143+
menu->uiMovie->asMovieRoot->GetVariable(&openValue, "root.HUDNotificationsGroup_mc.XPMeter_mc.visible");
144+
145+
return openValue.GetBoolean();
146+
}
137147
}
138148
}

Plugin/src/Shared/SharedFunctions.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,8 @@ namespace RE
107107

108108
extern bool InMenuMode();
109109

110+
bool IsXPMetervisible();
111+
110112
std::uint32_t GetAvailableComponentCount(BGSInventoryList* a_list, TESForm* a_form);
111113
}
112114
}

0 commit comments

Comments
 (0)