2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-08 22:27:43 +00:00

Compile-time locale refactor

This commit is contained in:
Jack Andersen
2019-07-19 18:26:59 -10:00
parent afb1162c43
commit 70ce423d00
18 changed files with 58 additions and 154 deletions

View File

@@ -11,8 +11,8 @@ MessageWindow::MessageWindow(ViewResources& res, View& parentView, Type type, st
type == Type::ErrorOk ? res.themeData().splashErrorBackground() : res.themeData().splashBackground())
, m_type(type)
, m_func(func)
, m_okBind(*this, rootView().viewManager().translateOr("ok", "OK"))
, m_cancelBind(*this, rootView().viewManager().translateOr("cancel", "Cancel")) {
, m_okBind(*this, rootView().viewManager().translate<locale::ok>())
, m_cancelBind(*this, rootView().viewManager().translate<locale::cancel>()) {
m_text.reset(new MultiLineTextView(res, *this, res.m_mainFont, TextView::Alignment::Center));
m_text->typesetGlyphs(message, res.themeData().uiText(), 380 * res.pixelFactor());
constraint() = RectangleConstraint(400 * res.pixelFactor(), 80 * res.pixelFactor() + m_text->nominalHeight());