Files
TagTinker/scenes/tagtinker_scene.h
T
HoggorminoandClaude Opus 4.8 0447f12164 Add a custom-size option for unrecognized infrared tags
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>
2026-09-16 21:58:55 +02:00

117 lines
4.5 KiB
C

/*
* Scene definitions.
*/
#pragma once
#include <gui/scene_manager.h>
typedef enum {
TagTinkerSceneWarning,
TagTinkerSceneMainMenu,
TagTinkerSceneSettings,
TagTinkerSceneBroadcastMenu,
TagTinkerSceneBroadcast,
TagTinkerSceneTargetMenu,
TagTinkerSceneTargetActions,
TagTinkerSceneBarcodeInput,
TagTinkerSceneTextInput,
TagTinkerScenePresetList,
TagTinkerSceneSyncedImageList,
TagTinkerSceneSizePicker,
TagTinkerSceneImageOptions,
TagTinkerSceneTransmit,
TagTinkerSceneAbout,
TagTinkerSceneTextBox,
TagTinkerSceneNfcScan,
TagTinkerSceneWifiPlugins,
TagTinkerSceneWifiSetup,
TagTinkerSceneWifiRun,
TagTinkerSceneCustomSize,
TagTinkerSceneCount,
} TagTinkerScene;
void tagtinker_scene_warning_on_enter(void* ctx);
bool tagtinker_scene_warning_on_event(void* ctx, SceneManagerEvent event);
void tagtinker_scene_warning_on_exit(void* ctx);
void tagtinker_scene_main_menu_on_enter(void* ctx);
bool tagtinker_scene_main_menu_on_event(void* ctx, SceneManagerEvent event);
void tagtinker_scene_main_menu_on_exit(void* ctx);
void tagtinker_scene_settings_on_enter(void* ctx);
bool tagtinker_scene_settings_on_event(void* ctx, SceneManagerEvent event);
void tagtinker_scene_settings_on_exit(void* ctx);
void tagtinker_scene_broadcast_menu_on_enter(void* ctx);
bool tagtinker_scene_broadcast_menu_on_event(void* ctx, SceneManagerEvent event);
void tagtinker_scene_broadcast_menu_on_exit(void* ctx);
void tagtinker_scene_broadcast_on_enter(void* ctx);
bool tagtinker_scene_broadcast_on_event(void* ctx, SceneManagerEvent event);
void tagtinker_scene_broadcast_on_exit(void* ctx);
void tagtinker_scene_target_menu_on_enter(void* ctx);
bool tagtinker_scene_target_menu_on_event(void* ctx, SceneManagerEvent event);
void tagtinker_scene_target_menu_on_exit(void* ctx);
void tagtinker_scene_target_actions_on_enter(void* ctx);
bool tagtinker_scene_target_actions_on_event(void* ctx, SceneManagerEvent event);
void tagtinker_scene_target_actions_on_exit(void* ctx);
void tagtinker_scene_barcode_input_on_enter(void* ctx);
bool tagtinker_scene_barcode_input_on_event(void* ctx, SceneManagerEvent event);
void tagtinker_scene_barcode_input_on_exit(void* ctx);
void tagtinker_scene_text_input_on_enter(void* ctx);
bool tagtinker_scene_text_input_on_event(void* ctx, SceneManagerEvent event);
void tagtinker_scene_text_input_on_exit(void* ctx);
void tagtinker_scene_size_picker_on_enter(void* ctx);
bool tagtinker_scene_size_picker_on_event(void* ctx, SceneManagerEvent event);
void tagtinker_scene_size_picker_on_exit(void* ctx);
void tagtinker_scene_preset_list_on_enter(void* ctx);
bool tagtinker_scene_preset_list_on_event(void* ctx, SceneManagerEvent event);
void tagtinker_scene_preset_list_on_exit(void* ctx);
void tagtinker_scene_synced_image_list_on_enter(void* ctx);
bool tagtinker_scene_synced_image_list_on_event(void* ctx, SceneManagerEvent event);
void tagtinker_scene_synced_image_list_on_exit(void* ctx);
void tagtinker_scene_image_options_on_enter(void* ctx);
bool tagtinker_scene_image_options_on_event(void* ctx, SceneManagerEvent event);
void tagtinker_scene_image_options_on_exit(void* ctx);
void tagtinker_scene_transmit_on_enter(void* ctx);
bool tagtinker_scene_transmit_on_event(void* ctx, SceneManagerEvent event);
void tagtinker_scene_transmit_on_exit(void* ctx);
void tagtinker_scene_about_on_enter(void* ctx);
bool tagtinker_scene_about_on_event(void* ctx, SceneManagerEvent event);
void tagtinker_scene_about_on_exit(void* ctx);
void tagtinker_scene_text_box_on_enter(void* ctx);
bool tagtinker_scene_text_box_on_event(void* ctx, SceneManagerEvent event);
void tagtinker_scene_text_box_on_exit(void* ctx);
void tagtinker_scene_nfc_scan_on_enter(void* ctx);
bool tagtinker_scene_nfc_scan_on_event(void* ctx, SceneManagerEvent event);
void tagtinker_scene_nfc_scan_on_exit(void* ctx);
void tagtinker_scene_wifi_plugins_on_enter(void* ctx);
bool tagtinker_scene_wifi_plugins_on_event(void* ctx, SceneManagerEvent event);
void tagtinker_scene_wifi_plugins_on_exit(void* ctx);
void tagtinker_scene_wifi_setup_on_enter(void* ctx);
bool tagtinker_scene_wifi_setup_on_event(void* ctx, SceneManagerEvent event);
void tagtinker_scene_wifi_setup_on_exit(void* ctx);
void tagtinker_scene_wifi_run_on_enter(void* ctx);
bool tagtinker_scene_wifi_run_on_event(void* ctx, SceneManagerEvent event);
void tagtinker_scene_wifi_run_on_exit(void* ctx);
void tagtinker_scene_custom_size_on_enter(void* ctx);
bool tagtinker_scene_custom_size_on_event(void* ctx, SceneManagerEvent event);
void tagtinker_scene_custom_size_on_exit(void* ctx);