Update apps for SDK updates (#38)
The updates mainly relate to lvgl-module changes.
This commit is contained in:
committed by
GitHub
parent
4f635d38e3
commit
b1e7eb999a
@@ -5,7 +5,7 @@
|
||||
#include "Snake.h"
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <tt_lvgl_toolbar.h>
|
||||
#include <lvgl/widgets/toolbar.h>
|
||||
#include <tt_app_alertdialog.h>
|
||||
#include <tt_app_selectiondialog.h>
|
||||
#include <tt_preferences.h>
|
||||
@@ -13,7 +13,7 @@
|
||||
#include <TactilityCpp/LvglLock.h>
|
||||
|
||||
#include <lvgl/lvgl.h>
|
||||
#include <lvgl/lvgl_fonts.h>
|
||||
#include <lvgl/fonts.h>
|
||||
|
||||
constexpr auto* TAG = "Snake";
|
||||
|
||||
@@ -245,7 +245,7 @@ void Snake::onShow(AppHandle appHandle, lv_obj_t* parent) {
|
||||
lv_obj_set_flex_flow(parent, LV_FLEX_FLOW_COLUMN);
|
||||
|
||||
// Create toolbar
|
||||
toolbar = tt_lvgl_toolbar_create_for_app(parent, appHandle);
|
||||
toolbar = lvgl_toolbar_create(parent, "Snake");
|
||||
lv_obj_align(toolbar, LV_ALIGN_TOP_MID, 0, 0);
|
||||
|
||||
// Create main wrapper
|
||||
|
||||
@@ -7,7 +7,8 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <time.h>
|
||||
#include <tt_lvgl_keyboard.h>
|
||||
#include <tactility/device.h>
|
||||
#include <tactility/drivers/keyboard.h>
|
||||
|
||||
// Forward declarations
|
||||
static void game_play_event(lv_event_t* e);
|
||||
@@ -36,7 +37,7 @@ static void delete_event(lv_event_t* e) {
|
||||
}
|
||||
|
||||
// Restore edit mode and remove from group before cleanup
|
||||
if (tt_lvgl_hardware_keyboard_is_available()) {
|
||||
if (device_has_active_by_type(&KEYBOARD_TYPE)) {
|
||||
lv_group_t* group = lv_group_get_default();
|
||||
if (group) lv_group_set_editing(group, false);
|
||||
lv_group_remove_obj(game->container);
|
||||
@@ -397,7 +398,7 @@ lv_obj_t* snake_create(lv_obj_t* parent, uint16_t cell_size, bool wall_collision
|
||||
lv_obj_add_event_cb(obj, delete_event, LV_EVENT_DELETE, NULL);
|
||||
|
||||
// Set up keyboard focus if available
|
||||
if (tt_lvgl_hardware_keyboard_is_available()) {
|
||||
if (device_has_active_by_type(&KEYBOARD_TYPE)) {
|
||||
lv_group_t* group = lv_group_get_default();
|
||||
if (group) {
|
||||
lv_group_add_obj(group, game->container);
|
||||
|
||||
@@ -2,7 +2,7 @@ manifest.version=0.2
|
||||
target.sdk=0.8.0-dev
|
||||
target.platforms=esp32,esp32s3,esp32c6,esp32p4
|
||||
app.id=one.tactility.snake
|
||||
app.version.name=0.9.0
|
||||
app.version.code=9
|
||||
app.version.name=0.10.0
|
||||
app.version.code=10
|
||||
app.name=Snake
|
||||
app.description=Classic Snake game
|
||||
|
||||
Reference in New Issue
Block a user