mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2024-11-28 23:13:02 +00:00
Tweak FPS Display a little
This commit is contained in:
parent
13c0e693f8
commit
0a39303a5a
1 changed files with 4 additions and 3 deletions
|
@ -11,7 +11,7 @@ struct DjuiFpsDisplay *sFpsDisplay = NULL;
|
||||||
void djui_fps_display_update(s16 fps) {
|
void djui_fps_display_update(s16 fps) {
|
||||||
if (configShowFPS) {
|
if (configShowFPS) {
|
||||||
char fpsText[30] = "";
|
char fpsText[30] = "";
|
||||||
snprintf(fpsText, 30, "\\#dcdcdc\\FPS \\#ffffff\\%d", fps);
|
snprintf(fpsText, 30, "\\#dcdcdc\\FPS: \\#ffffff\\%d", fps);
|
||||||
djui_text_set_text(sFpsDisplay->text, fpsText);
|
djui_text_set_text(sFpsDisplay->text, fpsText);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -30,15 +30,16 @@ void djui_fps_display_create(void) {
|
||||||
djui_base_set_size(base, 150, 50);
|
djui_base_set_size(base, 150, 50);
|
||||||
djui_base_set_color(base, 0, 0, 0, 240);
|
djui_base_set_color(base, 0, 0, 0, 240);
|
||||||
djui_base_set_border_color(base, 0, 0, 0, 200);
|
djui_base_set_border_color(base, 0, 0, 0, 200);
|
||||||
djui_base_set_border_width(base, 8);
|
djui_base_set_border_width(base, 4);
|
||||||
djui_base_set_padding(base, 16, 16, 16, 16);
|
djui_base_set_padding(base, 16, 16, 16, 16);
|
||||||
|
|
||||||
{
|
{
|
||||||
// FPS text
|
// FPS text
|
||||||
struct DjuiText *text = djui_text_create(base, "");
|
struct DjuiText *text = djui_text_create(base, "");
|
||||||
|
djui_text_set_alignment(text, DJUI_HALIGN_CENTER, DJUI_VALIGN_TOP);
|
||||||
djui_base_set_size_type(&text->base, DJUI_SVT_RELATIVE, DJUI_SVT_ABSOLUTE);
|
djui_base_set_size_type(&text->base, DJUI_SVT_RELATIVE, DJUI_SVT_ABSOLUTE);
|
||||||
djui_base_set_size(&text->base, 1.0f, text->fontScale * 2);
|
djui_base_set_size(&text->base, 1.0f, text->fontScale * 2);
|
||||||
djui_base_set_location(&text->base, 0, -text->fontScale / 2);
|
djui_base_set_location(&text->base, 0, -text->fontScale / 3.0f);
|
||||||
|
|
||||||
fpsDisplay->text = text;
|
fpsDisplay->text = text;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue