|
| 1 | +local template = assert(loadScript(radio.template))() |
| 2 | + |
1 | 3 | local uiStatus = |
2 | 4 | { |
3 | 5 | init = 1, |
|
181 | 183 |
|
182 | 184 | local function drawScreenTitle(screenTitle) |
183 | 185 | if radio.highRes then |
184 | | - lcd.drawFilledRectangle(0, 0, LCD_W, 30, COLOR_THEME_SECONDARY1 or TITLE_BGCOLOR) |
185 | | - lcd.drawText(5,5,screenTitle, COLOR_THEME_PRIMARY2 or MENU_TITLE_COLOR) |
| 186 | + lcd.drawFilledRectangle(0, 0, LCD_W, template.lineSpacing + template.margin, COLOR_THEME_SECONDARY1 or TITLE_BGCOLOR) |
| 187 | + lcd.drawText(template.margin,template.margin,screenTitle, COLOR_THEME_PRIMARY2 or MENU_TITLE_COLOR) |
186 | 188 | else |
187 | 189 | lcd.drawFilledRectangle(0, 0, LCD_W, 10, FORCE) |
188 | 190 | lcd.drawText(1,1,screenTitle,INVERS) |
@@ -217,7 +219,7 @@ local function drawScreen() |
217 | 219 | if pageState == pageStatus.editing then |
218 | 220 | valueOptions = valueOptions + BLINK |
219 | 221 | end |
220 | | - end |
| 222 | + end |
221 | 223 | if f.value then |
222 | 224 | if f.upd and Page.values then |
223 | 225 | f.upd(Page) |
@@ -319,10 +321,7 @@ local function run_ui(event) |
319 | 321 | lcd.clear() |
320 | 322 | local yMinLim = radio.yMinLimit |
321 | 323 | local yMaxLim = radio.yMaxLimit |
322 | | - local lineSpacing = 10 |
323 | | - if radio.highRes then |
324 | | - lineSpacing = 25 |
325 | | - end |
| 324 | + local lineSpacing = template.lineSpacing |
326 | 325 | local currentFieldY = (currentPage-1)*lineSpacing + yMinLim |
327 | 326 | if currentFieldY <= yMinLim then |
328 | 327 | mainMenuScrollY = 0 |
|
0 commit comments