Skip to content

Commit

Permalink
Challenge indicators and other fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
OFFTKP committed May 2, 2024
1 parent 6c1d64b commit 2404dbd
Show file tree
Hide file tree
Showing 3 changed files with 244 additions and 167 deletions.
16 changes: 12 additions & 4 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@

#ifdef ENABLE_RETRO_ACHIEVEMENTS
#include "retro_achievements.h"
#include "rc_consoles.h"
#endif

#include "gba.h"
Expand Down Expand Up @@ -6947,12 +6946,21 @@ static void frame(void) {

#ifdef ENABLE_RETRO_ACHIEVEMENTS
retro_achievements_update_atlases();
retro_achievements_draw_notifications(screen_x + 30,menu_height + 30);

// TODO: why does screen_width not work correctly
retro_achievements_draw_progress_indicator(screen_x + screen_width - 30,menu_height + 30);
float left = screen_x;
float top = menu_height;
float right = screen_x+screen_width/se_dpi_scale();
float bottom = height/se_dpi_scale();
float padding = 30;

ImDrawList_AddRect(igGetWindowDrawList(),(ImVec2){left,top},(ImVec2){right,bottom},0xff0000ff,0,0,5.0f);

retro_achievements_draw_notifications(left+padding,top+padding);
retro_achievements_draw_progress_indicator(right-padding,top+padding);

retro_achievements_draw_leaderboard_trackers(screen_x + 30, height - 200);

retro_achievements_draw_challenge_indicators(screen_x + screen_width - 100, height - 200);
#endif

for(int i=0;i<SAPP_MAX_TOUCHPOINTS;++i){
Expand Down
Loading

0 comments on commit 2404dbd

Please sign in to comment.