Skip to content

Commit

Permalink
Fix skilldex window position
Browse files Browse the repository at this point in the history
See #3
  • Loading branch information
alexbatalov committed May 21, 2022
1 parent 227bd81 commit 9d53098
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/skilldex.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
#include <stdio.h>
#include <string.h>

#define SKILLDEX_WINDOW_RIGHT_MARGIN 4
#define SKILLDEX_WINDOW_BOTTOM_MARGIN 6

// 0x51D43C
bool gSkilldexWindowIsoWasEnabled = false;

Expand Down Expand Up @@ -182,8 +185,10 @@ int skilldexWindowInit()
return -1;
}

gSkilldexWindow = windowCreate(640 - gSkilldexFrmSizes[SKILLDEX_FRM_BACKGROUND].width - 4,
379 - gSkilldexFrmSizes[SKILLDEX_FRM_BACKGROUND].height - 6,
int skilldexWindowX = screenGetWidth() - gSkilldexFrmSizes[SKILLDEX_FRM_BACKGROUND].width - SKILLDEX_WINDOW_RIGHT_MARGIN;
int skilldexWindowY = screenGetHeight() - 100 - 1 - gSkilldexFrmSizes[SKILLDEX_FRM_BACKGROUND].height - SKILLDEX_WINDOW_BOTTOM_MARGIN;
gSkilldexWindow = windowCreate(skilldexWindowX,
skilldexWindowY,
gSkilldexFrmSizes[SKILLDEX_FRM_BACKGROUND].width,
gSkilldexFrmSizes[SKILLDEX_FRM_BACKGROUND].height,
256,
Expand Down

1 comment on commit 9d53098

@Lexx2k
Copy link

@Lexx2k Lexx2k commented on 9d53098 May 21, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the skilldex should keep its position next to the skilldex button like in the HRP. This way it stays closer to the cursor and reduces the travel distance in higher resolutions.

scr00000

Please sign in to comment.