Mercurial > public > ostc4
comparison Discovery/Src/tMenuEdit.c @ 117:e6b190f5fbc7 FlipDisplay
Submenus may have 6 items
Write_content_simple is screen orientation aware => remove not needed code
| author | Ideenmodellierer |
|---|---|
| date | Sun, 06 Jan 2019 22:30:35 +0100 |
| parents | cc8e24374b83 |
| children | cc9c18075e00 |
comparison
equal
deleted
inserted
replaced
| 116:b848056057ce | 117:e6b190f5fbc7 |
|---|---|
| 1600 uint8_t lineMinusOne; | 1600 uint8_t lineMinusOne; |
| 1601 | 1601 |
| 1602 if(!settingsGetPointer()->FlipDisplay) | 1602 if(!settingsGetPointer()->FlipDisplay) |
| 1603 { | 1603 { |
| 1604 y0 = (int16_t)ident[forThisIdentID].coord[2]; | 1604 y0 = (int16_t)ident[forThisIdentID].coord[2]; |
| 1605 y0 -= ME_Y_LINE1; | |
| 1605 } | 1606 } |
| 1606 else | 1607 else |
| 1607 { | 1608 { |
| 1608 y0 = 390 - (int16_t)ident[forThisIdentID].coord[2]; | 1609 y0 = 390 + 25 - (int16_t)ident[forThisIdentID].coord[2]; |
| 1609 } | 1610 } |
| 1610 y0 -= ME_Y_LINE1; | 1611 |
| 1611 y0 /= ME_Y_LINE_STEP; | 1612 y0 /= ME_Y_LINE_STEP; |
| 1612 if((y0 >= 0) && (y0 <=5)) | 1613 if((y0 >= 0) && (y0 <=6)) |
| 1613 lineMinusOne = y0; | 1614 lineMinusOne = y0; |
| 1614 else | 1615 else |
| 1615 lineMinusOne = 0; | 1616 lineMinusOne = 0; |
| 1616 | 1617 |
| 1617 if(!settingsGetPointer()->FlipDisplay) | 1618 if(!settingsGetPointer()->FlipDisplay) |
| 1618 { | 1619 { |
| 1619 GFX_SetFrameBottom((tMEcursorNew.FBStartAdress) + 65*2*(lineMinusOne), 0, 25, 800, 390); | 1620 GFX_SetFrameBottom((tMEcursorNew.FBStartAdress) + 65*2*(lineMinusOne), 0, 25, 800, 390); |
| 1620 } | 1621 } |
| 1621 else | 1622 else |
| 1622 { | 1623 { |
| 1623 GFX_SetFrameBottom((tMEcursorNew.FBStartAdress)+ (390 - 65 *(5-lineMinusOne-1)) *2, 0, 480-390-25, 800, 390); | 1624 GFX_SetFrameBottom((tMEcursorNew.FBStartAdress)+ (390 - 65 *(6-lineMinusOne)) *2, 0, 480-390-25, 800, 390); |
| 1624 } | 1625 } |
| 1625 } | 1626 } |
| 1626 | 1627 |
| 1627 | 1628 |
| 1628 void write_topline( char *text) | 1629 void write_topline( char *text) |
| 1656 SSettings* pSettings; | 1657 SSettings* pSettings; |
| 1657 pSettings = settingsGetPointer(); | 1658 pSettings = settingsGetPointer(); |
| 1658 | 1659 |
| 1659 if(!pSettings->FlipDisplay) | 1660 if(!pSettings->FlipDisplay) |
| 1660 { | 1661 { |
| 1661 GFX_clean_area(&tMEscreen, 0, 800, 480-24,480); | 1662 GFX_clean_area(&tMEscreen, 0, 800, 479-24,480); |
| 1662 } | 1663 } |
| 1663 else | 1664 else |
| 1664 { | 1665 { |
| 1665 GFX_clean_area(&tMEscreen, 0, 800, 0, 24); | 1666 GFX_clean_area(&tMEscreen, 0, 800, 0, 24); |
| 1666 } | 1667 } |
| 1670 if(left2ByteCode) | 1671 if(left2ByteCode) |
| 1671 { | 1672 { |
| 1672 localtext[0] = TXT_2BYTE; | 1673 localtext[0] = TXT_2BYTE; |
| 1673 localtext[1] = left2ByteCode; | 1674 localtext[1] = left2ByteCode; |
| 1674 localtext[2] = 0; | 1675 localtext[2] = 0; |
| 1675 if(!pSettings->FlipDisplay) | 1676 |
| 1676 { | 1677 write_content_simple(&tMEscreen, 0, 800, 479-24, &FontT24,localtext,CLUT_ButtonSurfaceScreen); |
| 1677 write_content_simple(&tMEscreen, 0, 800, 480-24, &FontT24,localtext,CLUT_ButtonSurfaceScreen); | |
| 1678 } | |
| 1679 else | |
| 1680 { | |
| 1681 write_content_simple(&tMEscreen, 0, 800, 0, &FontT24,localtext,CLUT_ButtonSurfaceScreen); | |
| 1682 } | |
| 1683 } | 1678 } |
| 1684 | 1679 |
| 1685 if(middle2ByteCode) | 1680 if(middle2ByteCode) |
| 1686 { | 1681 { |
| 1687 localtext[0] = '\001'; | 1682 localtext[0] = '\001'; |
| 1688 localtext[1] = TXT_2BYTE; | 1683 localtext[1] = TXT_2BYTE; |
| 1689 localtext[2] = middle2ByteCode; | 1684 localtext[2] = middle2ByteCode; |
| 1690 localtext[3] = 0; | 1685 localtext[3] = 0; |
| 1691 if(!pSettings->FlipDisplay) | 1686 |
| 1692 { | 1687 write_content_simple(&tMEscreen, 0, 800, 479-24, &FontT24,localtext,CLUT_ButtonSurfaceScreen); |
| 1693 write_content_simple(&tMEscreen, 0, 800, 480-24, &FontT24,localtext,CLUT_ButtonSurfaceScreen); | |
| 1694 } | |
| 1695 else | |
| 1696 { | |
| 1697 write_content_simple(&tMEscreen, 0, 800, 0, &FontT24,localtext,CLUT_ButtonSurfaceScreen); | |
| 1698 } | |
| 1699 } | 1688 } |
| 1700 | 1689 |
| 1701 if(right2ByteCode) | 1690 if(right2ByteCode) |
| 1702 { | 1691 { |
| 1703 localtext[0] = '\002'; | 1692 localtext[0] = '\002'; |
| 1704 localtext[1] = TXT_2BYTE; | 1693 localtext[1] = TXT_2BYTE; |
| 1705 localtext[2] = right2ByteCode; | 1694 localtext[2] = right2ByteCode; |
| 1706 localtext[3] = 0; | 1695 localtext[3] = 0; |
| 1707 if(!pSettings->FlipDisplay) | 1696 |
| 1708 { | 1697 write_content_simple(&tMEscreen, 0, 800, 479-24, &FontT24,localtext,CLUT_ButtonSurfaceScreen); |
| 1709 write_content_simple(&tMEscreen, 0, 800, 480-24, &FontT24,localtext,CLUT_ButtonSurfaceScreen); | |
| 1710 } | |
| 1711 else | |
| 1712 { | |
| 1713 write_content_simple(&tMEscreen, 0, 800, 0, &FontT24,localtext,CLUT_ButtonSurfaceScreen); | |
| 1714 } | |
| 1715 } | 1698 } |
| 1716 } | 1699 } |
| 1717 | 1700 |
| 1718 | 1701 |
| 1719 | 1702 |
