mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-16 08:19:56 +00:00
43 lines
1.2 KiB
C++
43 lines
1.2 KiB
C++
|
|
#include "mechanicsmanager.hpp"
|
|
|
|
#include <components/esm_store/store.hpp>
|
|
|
|
#include "../mwgui/window_manager.hpp"
|
|
|
|
namespace MWMechanics
|
|
{
|
|
MechanicsManager::MechanicsManager (const ESMS::ESMStore& store,
|
|
MWGui::WindowManager& windowManager)
|
|
: mStore (store), mWindowManager (windowManager)
|
|
{
|
|
|
|
}
|
|
|
|
void MechanicsManager::configureGUI()
|
|
{
|
|
const char *names[][2] =
|
|
{
|
|
{ "Attrib1", "sAttributeStrength" },
|
|
{ "Attrib2", "sAttributeIntelligence" },
|
|
{ "Attrib3", "sAttributeWillpower" },
|
|
{ "Attrib4", "sAttributeAgility" },
|
|
{ "Attrib5", "sAttributeSpeed" },
|
|
{ "Attrib6", "sAttributeEndurance" },
|
|
{ "Attrib7", "sAttributePersonality" },
|
|
{ "Attrib8", "sAttributeLuck" },
|
|
{ 0, 0 }
|
|
};
|
|
|
|
for (int i=0; names[i][0]; ++i)
|
|
{
|
|
// This crashes because of encoding problems:
|
|
// std::string label = mStore.gameSettings.find (names[i][1])->str;
|
|
|
|
std::string label = names[i][1]; // until the problem is fixed, use the GMST ID as label
|
|
|
|
mWindowManager.setLabel (names[i][0], label);
|
|
}
|
|
}
|
|
}
|
|
|