mirror of
https://github.com/i12bp8/TagTinker.git
synced 2026-09-27 05:47:53 +00:00
A tag whose type code is not in the profile table has no dimensions, so after the unknown-profile guard its Set Text / Set Image / WiFi Plugins actions are hidden. This adds a "Set Custom Size" action for those tags: enter width, height and colour, and the graphics actions become usable. The IR framing is identical to a table profile; only the screen geometry differs, so no protocol is guessed. Custom size is applied only when the barcode's type is not in the table, so a real profile is never overridden. - New scene (VariableItemList): Width and Height in 8 px steps from 8 to 800, Colour mono/red/yellow, and Save. - tagtinker_target_refresh_profile() synthesizes a "Custom" profile from the stored size for unknown-type targets, so Show Tag Info, Set Text and Set Image all see real dimensions. - targets.txt gains three optional fields (barcode|name|cw|ch|ccolor); older two-field lines still load, with no custom size. - "Set Custom Size" appears in Target Actions only for unknown-type targets (tagtinker_type_is_known()). Builds clean on release SDK 1.4.3 (API 87.1) and dev SDK; no new clang-format drift. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
85 lines
3.1 KiB
C
85 lines
3.1 KiB
C
/*
|
|
* Scene handler table
|
|
*/
|
|
|
|
#include "tagtinker_scene.h"
|
|
|
|
void(*const tagtinker_scene_on_enter_handlers[])(void*) = {
|
|
tagtinker_scene_warning_on_enter,
|
|
tagtinker_scene_main_menu_on_enter,
|
|
tagtinker_scene_settings_on_enter,
|
|
tagtinker_scene_broadcast_menu_on_enter,
|
|
tagtinker_scene_broadcast_on_enter,
|
|
tagtinker_scene_target_menu_on_enter,
|
|
tagtinker_scene_target_actions_on_enter,
|
|
tagtinker_scene_barcode_input_on_enter,
|
|
tagtinker_scene_text_input_on_enter,
|
|
tagtinker_scene_preset_list_on_enter,
|
|
tagtinker_scene_synced_image_list_on_enter,
|
|
tagtinker_scene_size_picker_on_enter,
|
|
tagtinker_scene_image_options_on_enter,
|
|
tagtinker_scene_transmit_on_enter,
|
|
tagtinker_scene_about_on_enter,
|
|
tagtinker_scene_text_box_on_enter,
|
|
tagtinker_scene_nfc_scan_on_enter,
|
|
tagtinker_scene_wifi_plugins_on_enter,
|
|
tagtinker_scene_wifi_setup_on_enter,
|
|
tagtinker_scene_wifi_run_on_enter,
|
|
tagtinker_scene_custom_size_on_enter,
|
|
};
|
|
|
|
bool(*const tagtinker_scene_on_event_handlers[])(void*, SceneManagerEvent) = {
|
|
tagtinker_scene_warning_on_event,
|
|
tagtinker_scene_main_menu_on_event,
|
|
tagtinker_scene_settings_on_event,
|
|
tagtinker_scene_broadcast_menu_on_event,
|
|
tagtinker_scene_broadcast_on_event,
|
|
tagtinker_scene_target_menu_on_event,
|
|
tagtinker_scene_target_actions_on_event,
|
|
tagtinker_scene_barcode_input_on_event,
|
|
tagtinker_scene_text_input_on_event,
|
|
tagtinker_scene_preset_list_on_event,
|
|
tagtinker_scene_synced_image_list_on_event,
|
|
tagtinker_scene_size_picker_on_event,
|
|
tagtinker_scene_image_options_on_event,
|
|
tagtinker_scene_transmit_on_event,
|
|
tagtinker_scene_about_on_event,
|
|
tagtinker_scene_text_box_on_event,
|
|
tagtinker_scene_nfc_scan_on_event,
|
|
tagtinker_scene_wifi_plugins_on_event,
|
|
tagtinker_scene_wifi_setup_on_event,
|
|
tagtinker_scene_wifi_run_on_event,
|
|
tagtinker_scene_custom_size_on_event,
|
|
};
|
|
|
|
void(*const tagtinker_scene_on_exit_handlers[])(void*) = {
|
|
tagtinker_scene_warning_on_exit,
|
|
tagtinker_scene_main_menu_on_exit,
|
|
tagtinker_scene_settings_on_exit,
|
|
tagtinker_scene_broadcast_menu_on_exit,
|
|
tagtinker_scene_broadcast_on_exit,
|
|
tagtinker_scene_target_menu_on_exit,
|
|
tagtinker_scene_target_actions_on_exit,
|
|
tagtinker_scene_barcode_input_on_exit,
|
|
tagtinker_scene_text_input_on_exit,
|
|
tagtinker_scene_preset_list_on_exit,
|
|
tagtinker_scene_synced_image_list_on_exit,
|
|
tagtinker_scene_size_picker_on_exit,
|
|
tagtinker_scene_image_options_on_exit,
|
|
tagtinker_scene_transmit_on_exit,
|
|
tagtinker_scene_about_on_exit,
|
|
tagtinker_scene_text_box_on_exit,
|
|
tagtinker_scene_nfc_scan_on_exit,
|
|
tagtinker_scene_wifi_plugins_on_exit,
|
|
tagtinker_scene_wifi_setup_on_exit,
|
|
tagtinker_scene_wifi_run_on_exit,
|
|
tagtinker_scene_custom_size_on_exit,
|
|
};
|
|
|
|
const SceneManagerHandlers tagtinker_scene_handlers = {
|
|
.on_enter_handlers = tagtinker_scene_on_enter_handlers,
|
|
.on_event_handlers = tagtinker_scene_on_event_handlers,
|
|
.on_exit_handlers = tagtinker_scene_on_exit_handlers,
|
|
.scene_num = TagTinkerSceneCount,
|
|
};
|