1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-06 00:55:50 +00:00
OpenMW/components/widgets/fontwrapper.hpp
2023-10-31 10:59:57 +04:00

25 lines
474 B
C++

#ifndef OPENMW_WIDGETS_WRAPPER_H
#define OPENMW_WIDGETS_WRAPPER_H
#include <MyGUI_Prerequest.h>
#include "components/settings/values.hpp"
#include <algorithm>
namespace Gui
{
template <class T>
class FontWrapper : public T
{
public:
void setFontName(std::string_view name) override
{
T::setFontName(name);
T::setPropertyOverride("FontHeight", std::to_string(Settings::gui().mFontSize));
}
};
}
#endif