stop djui_hud_set_render_behind_hud from effecting the main djui (#359)
* stop djui_hud_set_render_behind_hud from effecting the main djui * use djui_reset_hud_params
This commit is contained in:
parent
96d4595d3f
commit
ab4ba123ac
|
@ -425,8 +425,13 @@ void render_game(void) {
|
|||
|
||||
gDPSetScissor(gDisplayListHead++, G_SC_NON_INTERLACE, 0, BORDER_HEIGHT, SCREEN_WIDTH,
|
||||
SCREEN_HEIGHT - BORDER_HEIGHT);
|
||||
if (gDjuiRenderBehindHud && !gDjuiPanelPauseCreated) {
|
||||
djui_render();
|
||||
|
||||
if (!gDjuiDisabled && gDjuiRenderBehindHud) {
|
||||
djui_reset_hud_params();
|
||||
create_dl_ortho_matrix();
|
||||
djui_gfx_displaylist_begin();
|
||||
smlua_call_event_hooks_with_reset_func(HOOK_ON_HUD_RENDER, djui_reset_hud_params);
|
||||
djui_gfx_displaylist_end();
|
||||
}
|
||||
render_hud();
|
||||
|
||||
|
|
|
@ -260,10 +260,8 @@ void end_master_display_list(void) {
|
|||
draw_profiler();
|
||||
}
|
||||
|
||||
if (!gDjuiRenderBehindHud || gDjuiPanelPauseCreated) {
|
||||
extern void djui_render(void);
|
||||
djui_render();
|
||||
}
|
||||
extern void djui_render(void);
|
||||
djui_render();
|
||||
|
||||
gDPFullSync(gDisplayListHead++);
|
||||
gSPEndDisplayList(gDisplayListHead++);
|
||||
|
|
|
@ -91,7 +91,7 @@ void djui_lua_error(char* text) {
|
|||
sDjuiLuaErrorTimeout = 30 * 5;
|
||||
}
|
||||
|
||||
static void djui_reset_hud_params(void) {
|
||||
void djui_reset_hud_params(void) {
|
||||
djui_hud_set_resolution(RESOLUTION_DJUI);
|
||||
djui_hud_set_font(FONT_NORMAL);
|
||||
djui_hud_set_rotation(0, 0, 0);
|
||||
|
@ -108,8 +108,10 @@ void djui_render(void) {
|
|||
create_dl_ortho_matrix();
|
||||
djui_gfx_displaylist_begin();
|
||||
|
||||
djui_reset_hud_params();
|
||||
smlua_call_event_hooks_with_reset_func(HOOK_ON_HUD_RENDER, djui_reset_hud_params);
|
||||
if (!gDjuiRenderBehindHud) {
|
||||
djui_reset_hud_params();
|
||||
smlua_call_event_hooks_with_reset_func(HOOK_ON_HUD_RENDER, djui_reset_hud_params);
|
||||
}
|
||||
|
||||
djui_panel_update();
|
||||
djui_popup_update();
|
||||
|
|
|
@ -43,3 +43,4 @@ void djui_init(void);
|
|||
void djui_connect_menu_open(void);
|
||||
void djui_lua_error(char* text);
|
||||
void djui_render(void);
|
||||
void djui_reset_hud_params(void);
|
||||
|
|
Loading…
Reference in New Issue