mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-18 16:27:34 +01:00
[python/kandinsky] Fix big font selection
This commit is contained in:
@@ -62,7 +62,7 @@ mp_obj_t modkandinsky_draw_string(size_t n_args, const mp_obj_t * args) {
|
||||
KDPoint point(mp_obj_get_int(args[1]), mp_obj_get_int(args[2]));
|
||||
KDColor textColor = (n_args >= 4) ? MicroPython::Color::Parse(args[3]) : Palette::PrimaryText;
|
||||
KDColor backgroundColor = (n_args >= 5) ? MicroPython::Color::Parse(args[4]) : Palette::HomeBackground;
|
||||
bool bigFont = (n_args >= 6) ? mp_obj_is_true(args[5]) : false;
|
||||
bool bigFont = (n_args >= 6) ? !mp_obj_is_true(args[5]) : true;
|
||||
bool isItalic = (n_args >= 7) ? mp_obj_is_true(args[6]) : false;
|
||||
const KDFont * font = KDFont::LargeFont;
|
||||
if (bigFont && !isItalic) {
|
||||
|
||||
@@ -23,8 +23,8 @@ STATIC const mp_rom_map_elem_t modkandinsky_module_globals_table[] = {
|
||||
{ MP_ROM_QSTR(MP_QSTR_fill_rect), (mp_obj_t)&modkandinsky_fill_rect_obj },
|
||||
{ MP_ROM_QSTR(MP_QSTR_fill_circle), (mp_obj_t)&modkandinsky_fill_circle_obj },
|
||||
{ MP_ROM_QSTR(MP_QSTR_fill_polygon), (mp_obj_t)&modkandinsky_fill_polygon_obj },
|
||||
{ MP_ROM_QSTR(MP_QSTR_large_font), mp_const_true },
|
||||
{ MP_ROM_QSTR(MP_QSTR_small_font), mp_const_false },
|
||||
{ MP_ROM_QSTR(MP_QSTR_large_font), mp_const_false },
|
||||
{ MP_ROM_QSTR(MP_QSTR_small_font), mp_const_true },
|
||||
{ MP_ROM_QSTR(MP_QSTR_wait_vblank), (mp_obj_t)&modkandinsky_wait_vblank_obj },
|
||||
{ MP_ROM_QSTR(MP_QSTR_get_palette), (mp_obj_t)&modkandinsky_get_palette_obj },
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user