Mercurial > public > ostc4
comparison Discovery/Src/tInfo.c @ 981:c6c781a2e85b default
Merge into default
| author | heinrichsweikamp |
|---|---|
| date | Tue, 11 Feb 2025 18:12:00 +0100 |
| parents | 92a5dc16d52b |
| children | 65d35e66efb9 |
comparison
equal
deleted
inserted
replaced
| 871:f7318457df4d | 981:c6c781a2e85b |
|---|---|
| 35 #include "tHome.h" | 35 #include "tHome.h" |
| 36 //#include "tInfoDive.h" | 36 //#include "tInfoDive.h" |
| 37 //#include "tInfoSurface.h" | 37 //#include "tInfoSurface.h" |
| 38 #include "tInfoCompass.h" | 38 #include "tInfoCompass.h" |
| 39 #include "tInfoSensor.h" | 39 #include "tInfoSensor.h" |
| 40 #include "tInfoPreDive.h" | |
| 40 #include "tMenu.h" | 41 #include "tMenu.h" |
| 41 #include "tMenuEdit.h" | 42 #include "tMenuEdit.h" |
| 42 | 43 |
| 43 #include <string.h> | 44 #include <string.h> |
| 44 | 45 |
| 220 break; | 221 break; |
| 221 case StISENINFO: tIscreen.FBStartAdress = getFrame(14); | 222 case StISENINFO: tIscreen.FBStartAdress = getFrame(14); |
| 222 infoColor = CLUT_MenuPageHardware; | 223 infoColor = CLUT_MenuPageHardware; |
| 223 refreshInfo_Sensor(tIscreen); | 224 refreshInfo_Sensor(tIscreen); |
| 224 break; | 225 break; |
| 226 case StIPREDIVE: tIscreen.FBStartAdress = getFrame(14); | |
| 227 infoColor = CLUT_MenuPageGasCC; | |
| 228 refreshInfo_PreDive(tIscreen); | |
| 229 break; | |
| 230 | |
| 225 default: | 231 default: |
| 226 break; | 232 break; |
| 227 } | 233 } |
| 228 } | 234 } |
| 229 if(oldIscreen != tIscreen.FBStartAdress) | 235 if(oldIscreen != tIscreen.FBStartAdress) |
| 304 YtopGimpStyle = 479; | 310 YtopGimpStyle = 479; |
| 305 hgfx.Image = &tIscreen; | 311 hgfx.Image = &tIscreen; |
| 306 hgfx.WindowNumberOfTextLines = 1; | 312 hgfx.WindowNumberOfTextLines = 1; |
| 307 hgfx.WindowLineSpacing = 0; | 313 hgfx.WindowLineSpacing = 0; |
| 308 hgfx.WindowTab = 400; | 314 hgfx.WindowTab = 400; |
| 309 hgfx.WindowX0 = XleftGimpStyle; | 315 |
| 310 hgfx.WindowX1 = XrightGimpStyle; | 316 if(!settingsGetPointer()->FlipDisplay) |
| 311 hgfx.WindowY1 = 479 - YtopGimpStyle; | 317 { |
| 312 if(hgfx.WindowY1 < Font->height) | 318 hgfx.WindowX0 = XleftGimpStyle; |
| 313 hgfx.WindowY0 = 0; | 319 hgfx.WindowX1 = XrightGimpStyle; |
| 314 else | 320 |
| 315 hgfx.WindowY0 = hgfx.WindowY1 - Font->height; | 321 hgfx.WindowY1 = 479 - YtopGimpStyle; |
| 322 if(hgfx.WindowY1 < Font->height) | |
| 323 hgfx.WindowY0 = 0; | |
| 324 else | |
| 325 hgfx.WindowY0 = hgfx.WindowY1 - Font->height; | |
| 326 } | |
| 327 else | |
| 328 { | |
| 329 hgfx.WindowX0 = 800 - XrightGimpStyle; | |
| 330 hgfx.WindowX1 = 800 - XleftGimpStyle; | |
| 331 hgfx.WindowY0 = YtopGimpStyle; | |
| 332 hgfx.WindowY1 = YtopGimpStyle + Font->height; | |
| 333 } | |
| 316 | 334 |
| 317 GFX_write_string_color(Font, &hgfx, text, 0, color); | 335 GFX_write_string_color(Font, &hgfx, text, 0, color); |
| 318 } | 336 } |
| 319 | 337 |
| 320 /* Exported functions --------------------------------------------------------*/ | 338 /* Exported functions --------------------------------------------------------*/ |
| 806 localtext[2] = right2ByteCode; | 824 localtext[2] = right2ByteCode; |
| 807 localtext[3] = 0; | 825 localtext[3] = 0; |
| 808 write_content_simple(screenPtr, 0, 800, 480-24, &FontT24,localtext,CLUT_ButtonSurfaceScreen); | 826 write_content_simple(screenPtr, 0, 800, 480-24, &FontT24,localtext,CLUT_ButtonSurfaceScreen); |
| 809 } | 827 } |
| 810 } | 828 } |
| 829 void tInfo_write_buttonTextline_simple(uint8_t left2ByteCode, char middle2ByteCode, char right2ByteCode) | |
| 830 { | |
| 831 char localtext[32]; | |
| 832 | |
| 833 if(left2ByteCode) | |
| 834 { | |
| 835 localtext[0] = TXT_2BYTE; | |
| 836 localtext[1] = left2ByteCode; | |
| 837 localtext[2] = 0; | |
| 838 tInfo_write_content_simple(0, 800, 480-24, &FontT24,localtext,CLUT_ButtonSurfaceScreen); | |
| 839 } | |
| 840 | |
| 841 if(middle2ByteCode) | |
| 842 { | |
| 843 localtext[0] = '\001'; | |
| 844 localtext[1] = TXT_2BYTE; | |
| 845 localtext[2] = middle2ByteCode; | |
| 846 localtext[3] = 0; | |
| 847 tInfo_write_content_simple(0, 800, 480-24, &FontT24,localtext,CLUT_ButtonSurfaceScreen); | |
| 848 } | |
| 849 | |
| 850 if(right2ByteCode) | |
| 851 { | |
| 852 localtext[0] = '\002'; | |
| 853 localtext[1] = TXT_2BYTE; | |
| 854 localtext[2] = right2ByteCode; | |
| 855 localtext[3] = 0; | |
| 856 tInfo_write_content_simple(0, 800, 480-24, &FontT24,localtext,CLUT_ButtonSurfaceScreen); | |
| 857 } | |
| 858 } |
