Correct a bug on displaying caddy content when using 8bit height font
(like CBM font) This time, with the correct y coordinate usage.
This commit is contained in:
parent
39e737e935
commit
e8e0b8428b
4 changed files with 260 additions and 260 deletions
|
@ -298,7 +298,7 @@ void DiskCaddy::ShowSelectedImage(u32 index)
|
||||||
if (screenLCD)
|
if (screenLCD)
|
||||||
{
|
{
|
||||||
unsigned numberOfImages = GetNumberOfImages();
|
unsigned numberOfImages = GetNumberOfImages();
|
||||||
unsigned numberOfDisplayedImages = screenLCD->Height()/screenLCD->GetFontHeight()-1;
|
unsigned numberOfDisplayedImages = (screenLCD->Height()/screenLCD->GetFontHeight())-1;
|
||||||
unsigned caddyIndex;
|
unsigned caddyIndex;
|
||||||
|
|
||||||
RGBA BkColour = RGBA(0, 0, 0, 0xFF);
|
RGBA BkColour = RGBA(0, 0, 0, 0xFF);
|
||||||
|
|
|
@ -100,7 +100,7 @@ private:
|
||||||
u32 selectedIndex;
|
u32 selectedIndex;
|
||||||
u32 oldCaddyIndex;
|
u32 oldCaddyIndex;
|
||||||
|
|
||||||
Screen* screen;
|
ScreenBase* screen;
|
||||||
ScreenBase* screenLCD;
|
ScreenBase* screenLCD;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -181,7 +181,7 @@ void FileBrowser::BrowsableListView::Refresh()
|
||||||
entryIndex = offset + index;
|
entryIndex = offset + index;
|
||||||
|
|
||||||
RefreshLine(entryIndex, x, y, /*showSelected && */list->currentIndex == entryIndex);
|
RefreshLine(entryIndex, x, y, /*showSelected && */list->currentIndex == entryIndex);
|
||||||
y += 16;
|
y += screen->GetFontHeight ();
|
||||||
}
|
}
|
||||||
|
|
||||||
screen->SwapBuffers();
|
screen->SwapBuffers();
|
||||||
|
@ -248,7 +248,7 @@ void FileBrowser::BrowsableListView::RefreshHighlightScroll()
|
||||||
int rowIndex = list->currentIndex - offset;
|
int rowIndex = list->currentIndex - offset;
|
||||||
|
|
||||||
u32 y = positionY;
|
u32 y = positionY;
|
||||||
y += rowIndex * 16;
|
y += rowIndex * screen->GetFontHeight ();
|
||||||
|
|
||||||
RefreshLine(list->currentIndex, 0, y, true);
|
RefreshLine(list->currentIndex, 0, y, true);
|
||||||
|
|
||||||
|
|
|
@ -103,7 +103,7 @@ void ScreenLCD::PlotRawImage(const u8* image, int x, int y, int w, int h)
|
||||||
u32 ScreenLCD::PrintText(bool petscii, u32 x, u32 y, char *ptr, RGBA TxtColour, RGBA BkColour, bool measureOnly, u32* width, u32* height)
|
u32 ScreenLCD::PrintText(bool petscii, u32 x, u32 y, char *ptr, RGBA TxtColour, RGBA BkColour, bool measureOnly, u32* width, u32* height)
|
||||||
{
|
{
|
||||||
int len = 0;
|
int len = 0;
|
||||||
ssd1306->PlotText(UseCBMFont(), petscii, x >> 3, y >> 4, ptr, (BkColour & 0xffffff) != 0);
|
ssd1306->PlotText(UseCBMFont(), petscii, x >> 3, y / GetFontHeight (), ptr, (BkColour & 0xffffff) != 0);
|
||||||
return len;
|
return len;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue