Removed RezStrings.mc

And in-lined the resource strings fetching.
This commit is contained in:
Philip Abbey
2024-01-21 20:38:01 +00:00
parent b80227e484
commit 6e67c4cf2a
8 changed files with 71 additions and 270 deletions

View File

@ -44,10 +44,10 @@ class HomeAssistantGlanceView extends WatchUi.GlanceView {
function onLayout(dc as Graphics.Dc) as Void {
var h = dc.getHeight();
var tw = dc.getTextWidthInPixels(RezStrings.getGlanceMenu(), Graphics.FONT_XTINY);
var tw = dc.getTextWidthInPixels(WatchUi.loadResource($.Rez.Strings.GlanceMenu), Graphics.FONT_XTINY);
mTitle = new WatchUi.Text({
:text => RezStrings.getAppName(),
:text => WatchUi.loadResource($.Rez.Strings.AppName),
:color => Graphics.COLOR_WHITE,
:font => Graphics.FONT_TINY,
:justification => Graphics.TEXT_JUSTIFY_LEFT | Graphics.TEXT_JUSTIFY_VCENTER,
@ -64,7 +64,7 @@ class HomeAssistantGlanceView extends WatchUi.GlanceView {
:locY => 3 * h / 6
});
mApiStatus = new WatchUi.Text({
:text => RezStrings.getChecking(),
:text => WatchUi.loadResource($.Rez.Strings.Checking),
:color => Graphics.COLOR_WHITE,
:font => Graphics.FONT_XTINY,
:justification => Graphics.TEXT_JUSTIFY_LEFT | Graphics.TEXT_JUSTIFY_VCENTER,
@ -72,7 +72,7 @@ class HomeAssistantGlanceView extends WatchUi.GlanceView {
:locY => 3 * h / 6
});
mMenuText = new WatchUi.Text({
:text => RezStrings.getGlanceMenu() + ":",
:text => WatchUi.loadResource($.Rez.Strings.GlanceMenu) + ":",
:color => Graphics.COLOR_WHITE,
:font => Graphics.FONT_XTINY,
:justification => Graphics.TEXT_JUSTIFY_LEFT | Graphics.TEXT_JUSTIFY_VCENTER,
@ -80,7 +80,7 @@ class HomeAssistantGlanceView extends WatchUi.GlanceView {
:locY => 5 * h / 6
});
mMenuStatus = new WatchUi.Text({
:text => RezStrings.getChecking(),
:text => WatchUi.loadResource($.Rez.Strings.Checking),
:color => Graphics.COLOR_WHITE,
:font => Graphics.FONT_XTINY,
:justification => Graphics.TEXT_JUSTIFY_LEFT | Graphics.TEXT_JUSTIFY_VCENTER,