Added RezStrings.mc

The intention is to factorise out many copies of the same string to a central location. Now need to deal with making the variables read-only.
This commit is contained in:
Philip Abbey
2024-01-01 12:57:50 +00:00
parent f22dc469fb
commit b039dfbc3b
10 changed files with 195 additions and 147 deletions

View File

@ -51,11 +51,10 @@ class RootView extends ScalableView {
}
function onLayout(dc as Graphics.Dc) as Void {
var strChecking = WatchUi.loadResource($.Rez.Strings.Checking);
var w = dc.getWidth();
var w = dc.getWidth();
mTitle = new WatchUi.Text({
:text => WatchUi.loadResource($.Rez.Strings.AppName),
:text => RezStrings.strAppName,
:color => Graphics.COLOR_WHITE,
:font => Graphics.FONT_TINY,
:justification => Graphics.TEXT_JUSTIFY_CENTER | Graphics.TEXT_JUSTIFY_VCENTER,
@ -72,7 +71,7 @@ class RootView extends ScalableView {
:locY => pixelsForScreen(50.0)
});
mApiStatus = new WatchUi.Text({
:text => strChecking,
:text => RezStrings.strChecking,
:color => Graphics.COLOR_WHITE,
:font => Graphics.FONT_XTINY,
:justification => Graphics.TEXT_JUSTIFY_LEFT | Graphics.TEXT_JUSTIFY_VCENTER,
@ -80,7 +79,7 @@ class RootView extends ScalableView {
:locY => pixelsForScreen(50.0)
});
mMenuText = new WatchUi.Text({
:text => WatchUi.loadResource($.Rez.Strings.GlanceMenu) + ":",
:text => RezStrings.strGlanceMenu + ":",
:color => Graphics.COLOR_WHITE,
:font => Graphics.FONT_XTINY,
:justification => Graphics.TEXT_JUSTIFY_RIGHT | Graphics.TEXT_JUSTIFY_VCENTER,
@ -88,7 +87,7 @@ class RootView extends ScalableView {
:locY => pixelsForScreen(70.0)
});
mMenuStatus = new WatchUi.Text({
:text => strChecking,
:text => RezStrings.strChecking,
:color => Graphics.COLOR_WHITE,
:font => Graphics.FONT_XTINY,
:justification => Graphics.TEXT_JUSTIFY_LEFT | Graphics.TEXT_JUSTIFY_VCENTER,