Skip to content

Commit c340eb5

Browse files
committed
feat: custom font
1 parent cad1750 commit c340eb5

File tree

3 files changed

+13
-5
lines changed

3 files changed

+13
-5
lines changed

application.fam

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ App(
1414
fap_category="Games",
1515
fap_author="Struan Clark (xtruan)",
1616
fap_weburl="https://github.com/xtruan/flipper-chess",
17-
fap_version=(1, 8),
17+
fap_version=(1, 9),
1818
fap_description="Chess for Flipper",
19-
)
19+
)

flipchess.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
#include "views/flipchess_startscreen.h"
1717
#include "views/flipchess_scene_1.h"
1818

19-
#define FLIPCHESS_VERSION "v1.8.0"
19+
#define FLIPCHESS_VERSION "v1.9.0"
2020

2121
#define TEXT_BUFFER_SIZE 96
2222
#define TEXT_SIZE (TEXT_BUFFER_SIZE - 1)

views/flipchess_startscreen.c

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,18 @@ void flipchess_startscreen_draw(Canvas* canvas, FlipChessStartscreenModel* model
3232

3333
canvas_draw_icon(canvas, 0, 0, &I_FLIPR_128x64);
3434

35+
#ifdef CANVAS_HAS_FONT_SCUMM_ROMAN_OUTLINE
36+
const uint8_t text_x_pos = 2;
37+
const uint8_t text_y_pos = 12;
38+
canvas_set_font(canvas, FontScummRomanOutline);
39+
#else
40+
const uint8_t text_x_pos = 4;
41+
const uint8_t text_y_pos = 11;
3542
canvas_set_font(canvas, FontPrimary);
36-
canvas_draw_str(canvas, 4, 11, "Chess");
43+
#endif
44+
canvas_draw_str(canvas, text_x_pos, text_y_pos, "Chess");
3745
canvas_set_font(canvas, FontSecondary);
38-
canvas_draw_str(canvas, 62, 11, FLIPCHESS_VERSION);
46+
canvas_draw_str(canvas, 62, text_y_pos, FLIPCHESS_VERSION);
3947

4048
//canvas_set_font(canvas, FontSecondary);
4149
//canvas_draw_str(canvas, 10, 11, "How about a nice game of...");

0 commit comments

Comments
 (0)