mirror of
https://github.com/d0k3/GodMode9.git
synced 2025-06-26 13:42:47 +00:00
Improve sidebar behaviour
This commit is contained in:
parent
1f852472c9
commit
087eed8592
@ -86,7 +86,7 @@ void DrawDirContents(DirStruct* contents, u32 cursor) {
|
|||||||
|
|
||||||
u32 bar_height = (lines * SCREEN_HEIGHT) / contents->n_entries;
|
u32 bar_height = (lines * SCREEN_HEIGHT) / contents->n_entries;
|
||||||
if (bar_height < bar_height_min) bar_height = bar_height_min;
|
if (bar_height < bar_height_min) bar_height = bar_height_min;
|
||||||
u32 bar_pos = (((u64) cursor * (SCREEN_HEIGHT - bar_height)) / contents->n_entries);
|
u32 bar_pos = ((u64) offset_disp * (SCREEN_HEIGHT - bar_height)) / (contents->n_entries - lines);
|
||||||
|
|
||||||
DrawRectangleF(false, SCREEN_WIDTH_BOT - bar_width, 0, bar_width, bar_pos, COLOR_STD_BG);
|
DrawRectangleF(false, SCREEN_WIDTH_BOT - bar_width, 0, bar_width, bar_pos, COLOR_STD_BG);
|
||||||
DrawRectangleF(false, SCREEN_WIDTH_BOT - bar_width, bar_pos + bar_height, bar_width, SCREEN_WIDTH_BOT - (bar_pos + bar_height), COLOR_STD_BG);
|
DrawRectangleF(false, SCREEN_WIDTH_BOT - bar_width, bar_pos + bar_height, bar_width, SCREEN_WIDTH_BOT - (bar_pos + bar_height), COLOR_STD_BG);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user