forked from Lephenixnoir/PythonExtra
pe: smaller, proportional 4x6 font on fx
This commit is contained in:
parent
27822c2461
commit
404d69aea4
|
@ -3,7 +3,7 @@ include ../../py/mkenv.mk
|
|||
SH_CFLAGS := -DFX9860G
|
||||
SH_LDFLAGS := -T fx9860g.ld -ljustui-fx -lm -lgint-fx -lc -lgint-fx -lgcc
|
||||
|
||||
SH_ASSETS := img_fkeys_main.png
|
||||
SH_ASSETS := img_fkeys_main.png font_5x7.png font_4x4.png font_4x6.png
|
||||
SH_METADATA := fxconv-metadata.txt
|
||||
SH_CONVFLAGS := --fx
|
||||
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 809 B |
Binary file not shown.
After Width: | Height: | Size: 1.4 KiB |
Binary file not shown.
After Width: | Height: | Size: 22 KiB |
|
@ -1,3 +1,31 @@
|
|||
*.png:
|
||||
type: bopti-image
|
||||
name_regex: (.*)\.png \1
|
||||
|
||||
font_*.png:
|
||||
type: font
|
||||
charset: print
|
||||
grid.padding: 1
|
||||
grid.border: 0
|
||||
|
||||
font_5x7.png:
|
||||
type: font
|
||||
charset: print
|
||||
grid.size: 5x7
|
||||
grid.padding: 1
|
||||
grid.border: 0
|
||||
|
||||
font_4x4.png:
|
||||
type: font
|
||||
charset: print
|
||||
grid.size: 4x4
|
||||
grid.padding: 1
|
||||
grid.border: 0
|
||||
|
||||
font_4x6.png:
|
||||
type: font
|
||||
charset: print
|
||||
grid.size: 5x6
|
||||
grid.padding: 1
|
||||
grid.border: 0
|
||||
proportional: true
|
||||
|
|
|
@ -8,6 +8,8 @@
|
|||
#include "py/gc.h"
|
||||
#include "py/stackctrl.h"
|
||||
#include "py/builtin.h"
|
||||
#include "py/mphal.h"
|
||||
#include "py/repl.h"
|
||||
#include "shared/runtime/gchelper.h"
|
||||
#include "shared/runtime/pyexec.h"
|
||||
|
||||
|
@ -30,14 +32,17 @@
|
|||
#include "console.h"
|
||||
#include "widget_shell.h"
|
||||
|
||||
//---
|
||||
/* TODO: Expand debug configuration to not be hardcoded */
|
||||
#define DEBUG 0
|
||||
|
||||
#include "py/mphal.h"
|
||||
#include "py/repl.h"
|
||||
#include "genhdr/mpversion.h"
|
||||
#if DEBUG
|
||||
#include <gint/usb.h>
|
||||
#include <gint/usb-ff-bulk.h>
|
||||
#endif
|
||||
|
||||
#ifdef FX9860G
|
||||
extern bopti_image_t const img_fkeys_main;
|
||||
extern font_t const font_4x4, font_4x6, font_5x7;
|
||||
#define _(fx, cg) (fx)
|
||||
#else
|
||||
#define _(fx, cg) (cg)
|
||||
|
@ -79,6 +84,11 @@ static bool py_file_filter(struct dirent const *ent)
|
|||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
#if DEBUG
|
||||
usb_interface_t const *intf[] = { &usb_ff_bulk, NULL };
|
||||
usb_open(intf, GINT_CALL_NULL);
|
||||
#endif
|
||||
|
||||
//=== Init sequence ===//
|
||||
|
||||
pe_shell_console = console_create(8192);
|
||||
|
@ -151,6 +161,7 @@ int main(int argc, char **argv)
|
|||
#ifdef FX9860G
|
||||
bool show_title_in_shell = false;
|
||||
jwidget_set_padding(title, 0, 0, 1, 0);
|
||||
widget_shell_set_font(shell, &font_4x6);
|
||||
#else
|
||||
bool show_title_in_shell = true;
|
||||
jwidget_set_background(title, C_BLACK);
|
||||
|
@ -178,6 +189,11 @@ int main(int argc, char **argv)
|
|||
continue;
|
||||
int key = e.key.key;
|
||||
|
||||
#if DEBUG
|
||||
if(usb_is_open() && key == KEY_SQUARE && !e.key.shift && e.key.alpha)
|
||||
usb_fxlink_screenshot(true);
|
||||
#endif
|
||||
|
||||
if(key == KEY_F1) {
|
||||
jscene_show_and_focus(scene, fileselect);
|
||||
jwidget_set_visible(title, true);
|
||||
|
|
Loading…
Reference in New Issue