mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-18 12:05:14 -04:00
Fix classic background in launcher infinite looping (oops)
This commit is contained in:
parent
dbc6be1f13
commit
e806d4084f
@ -734,10 +734,13 @@ static void LTable_SetSelectedTo(struct LTable* w, int index) {
|
|||||||
/* Draws background behind column headers */
|
/* Draws background behind column headers */
|
||||||
static void LTable_DrawHeaderBackground(struct LTable* w) {
|
static void LTable_DrawHeaderBackground(struct LTable* w) {
|
||||||
BitmapCol gridCol = BITMAPCOL_CONST(20, 20, 10, 255);
|
BitmapCol gridCol = BITMAPCOL_CONST(20, 20, 10, 255);
|
||||||
if (Launcher_ClassicBackground) return;
|
|
||||||
|
|
||||||
|
if (!Launcher_ClassicBackground) {
|
||||||
Drawer2D_Clear(&Launcher_Framebuffer, gridCol,
|
Drawer2D_Clear(&Launcher_Framebuffer, gridCol,
|
||||||
w->X, w->Y, w->Width, w->HdrHeight);
|
w->X, w->Y, w->Width, w->HdrHeight);
|
||||||
|
} else {
|
||||||
|
Launcher_ResetArea(w->X, w->Y, w->Width, w->HdrHeight);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Works out the background colour of the given row */
|
/* Works out the background colour of the given row */
|
||||||
@ -770,15 +773,18 @@ static void LTable_DrawRowsBackground(struct LTable* w) {
|
|||||||
for (row = w->TopRow; ; row++, y += w->RowHeight) {
|
for (row = w->TopRow; ; row++, y += w->RowHeight) {
|
||||||
entry = row < w->RowsCount ? LTable_Get(row) : NULL;
|
entry = row < w->RowsCount ? LTable_Get(row) : NULL;
|
||||||
col = LTable_RowCol(w, entry);
|
col = LTable_RowCol(w, entry);
|
||||||
if (!col.A) continue;
|
|
||||||
|
|
||||||
/* last row may get chopped off */
|
/* last row may get chopped off */
|
||||||
height = min(y + w->RowHeight, w->RowsEndY) - y;
|
height = min(y + w->RowHeight, w->RowsEndY) - y;
|
||||||
/* hit the end of the table */
|
/* hit the end of the table */
|
||||||
if (height < 0) break;
|
if (height < 0) break;
|
||||||
|
|
||||||
|
if (col.A) {
|
||||||
Drawer2D_Clear(&Launcher_Framebuffer, col,
|
Drawer2D_Clear(&Launcher_Framebuffer, col,
|
||||||
w->X, y, w->Width, height);
|
w->X, y, w->Width, height);
|
||||||
|
} else {
|
||||||
|
Launcher_ResetArea(w->X, y, w->Width, height);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user