Last touches on power and side bar.

This commit is contained in:
Ben Lankamp
2020-07-04 11:24:07 +02:00
parent 4ba5c0d72c
commit 9b8fbe098b
2 changed files with 9 additions and 7 deletions
+5 -4
View File
@@ -193,14 +193,15 @@ void PowerClass::Draw_It(bool complete)
/* /*
** Hires power strip is too big to fit into a shape so it is in two parts ** Hires power strip is too big to fit into a shape so it is in two parts
*/ */
CC_Draw_Shape(PowerBarShapeHD, 0, ScreenWidth - (640 - (240 * RESFACTOR)), (84 * RESFACTOR), WINDOW_MAIN, flags | SHAPE_NORMAL | SHAPE_WIN_REL, remap); CC_Draw_Shape(PowerBarShapeHD, 0, ScreenWidth - (640 - (240 * RESFACTOR)), (88 * RESFACTOR), WINDOW_MAIN, flags | SHAPE_NORMAL | SHAPE_WIN_REL, remap);
int bottomOfBar = (84 * RESFACTOR) + 56;
int bottomOfBar = (88 + 56) * RESFACTOR;
while (bottomOfBar < PowerButton.Height + 32) while ( bottomOfBar < ( PowerButton.Height - 56 ) )
{ {
CC_Draw_Shape(PowerBarShapeHD, 1, ScreenWidth - (640 - (240 * RESFACTOR)), bottomOfBar, WINDOW_MAIN, flags | SHAPE_NORMAL | SHAPE_WIN_REL, remap); CC_Draw_Shape(PowerBarShapeHD, 1, ScreenWidth - (640 - (240 * RESFACTOR)), bottomOfBar, WINDOW_MAIN, flags | SHAPE_NORMAL | SHAPE_WIN_REL, remap);
bottomOfBar += 8 * RESFACTOR; bottomOfBar += 56 * RESFACTOR;
} }
// bottom // bottom
+4 -3
View File
@@ -778,8 +778,6 @@ void SidebarClass::Draw_It(bool complete)
// hack: black background for the sidebar // hack: black background for the sidebar
GL_FillRect(TBLACK, SIDE_X * RESFACTOR, 8 * RESFACTOR, SIDE_WIDTH * RESFACTOR, ScreenHeight); GL_FillRect(TBLACK, SIDE_X * RESFACTOR, 8 * RESFACTOR, SIDE_WIDTH * RESFACTOR, ScreenHeight);
PowerClass::Draw_It(complete);
BStart(BENCH_SIDEBAR); BStart(BENCH_SIDEBAR);
if (IsSidebarActive && (IsToRedraw || complete) && !Debug_Map) { if (IsSidebarActive && (IsToRedraw || complete) && !Debug_Map) {
@@ -803,7 +801,7 @@ void SidebarClass::Draw_It(bool complete)
if (frameNr < 6) frameNr++; if (frameNr < 6) frameNr++;
} }
topY += 10 * RESFACTOR; topY += 11 * RESFACTOR;
CC_Draw_Shape(SidebarFillerHD, 0, SIDE_X * RESFACTOR, topY, WINDOW_MAIN, SHAPE_WIN_REL, 0); CC_Draw_Shape(SidebarFillerHD, 0, SIDE_X * RESFACTOR, topY, WINDOW_MAIN, SHAPE_WIN_REL, 0);
Repair.Draw_Me(true); Repair.Draw_Me(true);
@@ -814,6 +812,9 @@ void SidebarClass::Draw_It(bool complete)
} }
} }
// Draw power on top
PowerClass::Draw_It(complete);
/* /*
** Draw the side strip elements by calling their respective draw functions. ** Draw the side strip elements by calling their respective draw functions.
*/ */