diff --git a/cmake/Bitmaps.cmake b/cmake/Bitmaps.cmake index 41a8589b6..f44e09517 100644 --- a/cmake/Bitmaps.cmake +++ b/cmake/Bitmaps.cmake @@ -14,6 +14,22 @@ macro(add_bitmaps_target targetname filter format args) add_custom_target(${targetname} DEPENDS ${bitmaps_files}) endmacro() +macro(add_png_target targetname filter) + set(bitmaps_files) + file(GLOB bitmaps ${filter}) + foreach(bitmap ${bitmaps}) + get_filename_component(target ${bitmap} NAME_WE) + set(target ${target}.lbm) + add_custom_command( + OUTPUT ${target} + COMMAND ${PYTHON_EXECUTABLE} ${UTILS_DIR}/bin2lbm.py ${bitmap} ${target} + DEPENDS ${bitmap} ${UTILS_DIR}/bin2lbm.py + ) + list(APPEND bitmaps_files ${target}) + endforeach() + add_custom_target(${targetname} DEPENDS ${bitmaps_files}) +endmacro() + macro(add_fonts_target targetname filter) set(fonts_files) file(GLOB fonts ${filter}) diff --git a/radio/sdcard/horus/THEMES/EdgeTX/X10.bmp b/radio/sdcard/horus/THEMES/EdgeTX/X10.bmp deleted file mode 100755 index 24893bad0..000000000 Binary files a/radio/sdcard/horus/THEMES/EdgeTX/X10.bmp and /dev/null differ diff --git a/radio/sdcard/horus/THEMES/EdgeTX/X10S.bmp b/radio/sdcard/horus/THEMES/EdgeTX/X10S.bmp deleted file mode 100755 index e27932eef..000000000 Binary files a/radio/sdcard/horus/THEMES/EdgeTX/X10S.bmp and /dev/null differ diff --git a/radio/sdcard/horus/THEMES/EdgeTX/horus.bmp b/radio/sdcard/horus/THEMES/EdgeTX/horus.bmp deleted file mode 100644 index 98bc631cd..000000000 Binary files a/radio/sdcard/horus/THEMES/EdgeTX/horus.bmp and /dev/null differ diff --git a/radio/src/bitmaps/480x272/CMakeLists.txt b/radio/src/bitmaps/480x272/CMakeLists.txt index 2233da191..32e10bb5f 100644 --- a/radio/src/bitmaps/480x272/CMakeLists.txt +++ b/radio/src/bitmaps/480x272/CMakeLists.txt @@ -20,6 +20,8 @@ set(BITMAP_RLE_ARGS ${BITMAP_ARGS} --rle) set(MASK_RLE_ARGS ${MASK_ARGS} --rle) add_bitmaps_target(${BITMAP_TARGET_PREFIX}_bitmaps "${RADIO_SRC_DIR}/bitmaps/480x272/bmp_*.png" "5/6/5" "${BITMAP_ARGS}") +add_png_target(${BITMAP_TARGET_PREFIX}_splash "${RADIO_SRC_DIR}/bitmaps/480x272/big_logo.png") + add_bitmaps_target(${BITMAP_TARGET_PREFIX}_calibration_bitmaps "${RADIO_SRC_DIR}/bitmaps/480x272/calibration/bmp_*.png" "5/6/5" "${BITMAP_ARGS}") add_bitmaps_target(${BITMAP_TARGET_PREFIX}_button_bitmaps "${RADIO_SRC_DIR}/bitmaps/480x272/button/alpha_*.png" "4/4/4/4" "${BITMAP_ARGS}") add_bitmaps_target(${BITMAP_TARGET_PREFIX}_alpha_bitmaps "${RADIO_SRC_DIR}/bitmaps/480x272/alpha_*.png" "4/4/4/4" "${BITMAP_ARGS}") @@ -27,13 +29,16 @@ add_bitmaps_target(${BITMAP_TARGET_PREFIX}_alpha_calibration_bitmaps "${RADIO_SR add_bitmaps_target(${BITMAP_TARGET_PREFIX}_masks ${RADIO_SRC_DIR}/bitmaps/480x272/mask_*.png 8bits "${MASK_ARGS}") add_bitmaps_target(${BITMAP_TARGET_PREFIX}_slider_masks "${RADIO_SRC_DIR}/bitmaps/480x272/slider/*.png" 8bits "${MASK_ARGS}") add_bitmaps_target(${BITMAP_TARGET_PREFIX}_layouts_masks "${RADIO_SRC_DIR}/gui/colorlcd/layouts/*.png" 8bits "${MASK_ARGS}") -add_bitmaps_target(${BITMAP_TARGET_PREFIX}_themes_bitmaps "${RADIO_SRC_DIR}/gui/colorlcd/themes/*.png" "5/6/5" "${BITMAPS_ARGS}") add_bitmaps_target(${BITMAP_TARGET_PREFIX}_fonts ${RADIO_SRC_DIR}/fonts/truetype/*.png 8bits "${MASK_RLE_ARGS}") add_bitmaps_target(${BITMAP_TARGET_PREFIX}_volume_masks ${RADIO_SRC_DIR}/bitmaps/480x272/volume/*.png 8bits "${MASK_ARGS}") + +add_bitmaps_target(${BITMAP_TARGET_PREFIX}_themes_masks "${RADIO_SRC_DIR}/bitmaps/480x272/default_theme/mask_*.png" 8bits "${BITMAPS_ARGS}") +add_png_target(${BITMAP_TARGET_PREFIX}_themes_alpha "${RADIO_SRC_DIR}/bitmaps/480x272/default_theme/alpha_*.png") + add_bitmaps_target(${BITMAP_TARGET_PREFIX}_bootloader_bitmaps ${RADIO_SRC_DIR}/bitmaps/480x272/bootloader/bmp_*.png "4/4/4/4" "${BITMAP_RLE_ARGS}") add_bitmaps_target(${BITMAP_TARGET_PREFIX}_bootloader_icons ${RADIO_SRC_DIR}/bitmaps/480x272/bootloader/icon_*.png 8bits "${MASK_ARGS}") add_dependencies(${BITMAP_TARGET_PREFIX}_bitmaps ${BITMAP_TARGET_PREFIX}_calibration_bitmaps ${BITMAP_TARGET_PREFIX}_button_bitmaps ${BITMAP_TARGET_PREFIX}_alpha_bitmaps ${BITMAP_TARGET_PREFIX}_alpha_calibration_bitmaps ${BITMAP_TARGET_PREFIX}_masks ${BITMAP_TARGET_PREFIX}_slider_masks ${BITMAP_TARGET_PREFIX}_layouts_masks - ${BITMAP_TARGET_PREFIX}_themes_bitmaps ${BITMAP_TARGET_PREFIX}_fonts ${BITMAP_TARGET_PREFIX}_volume_masks ${BITMAP_TARGET_PREFIX}_bootloader_bitmaps - ${BITMAP_TARGET_PREFIX}_bootloader_icons) + ${BITMAP_TARGET_PREFIX}_fonts ${BITMAP_TARGET_PREFIX}_themes_masks ${BITMAP_TARGET_PREFIX}_themes_alpha ${BITMAP_TARGET_PREFIX}_splash ${BITMAP_TARGET_PREFIX}_volume_masks + ${BITMAP_TARGET_PREFIX}_bootloader_bitmaps ${BITMAP_TARGET_PREFIX}_bootloader_icons ) diff --git a/radio/src/bitmaps/480x272/big_logo.png b/radio/src/bitmaps/480x272/big_logo.png new file mode 100644 index 000000000..9642b41d7 Binary files /dev/null and b/radio/src/bitmaps/480x272/big_logo.png differ diff --git a/radio/sdcard/horus/THEMES/EdgeTX/stick_background.png b/radio/src/bitmaps/480x272/default_theme/alpha_stick_background.png similarity index 100% rename from radio/sdcard/horus/THEMES/EdgeTX/stick_background.png rename to radio/src/bitmaps/480x272/default_theme/alpha_stick_background.png diff --git a/radio/sdcard/horus/THEMES/EdgeTX/stick_pointer.png b/radio/src/bitmaps/480x272/default_theme/alpha_stick_pointer.png similarity index 100% rename from radio/sdcard/horus/THEMES/EdgeTX/stick_pointer.png rename to radio/src/bitmaps/480x272/default_theme/alpha_stick_pointer.png diff --git a/radio/sdcard/horus/THEMES/EdgeTX/trackp_background.png b/radio/src/bitmaps/480x272/default_theme/alpha_trackp_background.png similarity index 100% rename from radio/sdcard/horus/THEMES/EdgeTX/trackp_background.png rename to radio/src/bitmaps/480x272/default_theme/alpha_trackp_background.png diff --git a/radio/src/bitmaps/480x272/default_theme/mask_asterisk.png b/radio/src/bitmaps/480x272/default_theme/mask_asterisk.png new file mode 100644 index 000000000..fd10af269 Binary files /dev/null and b/radio/src/bitmaps/480x272/default_theme/mask_asterisk.png differ diff --git a/radio/src/bitmaps/480x272/default_theme/mask_back.png b/radio/src/bitmaps/480x272/default_theme/mask_back.png new file mode 100755 index 000000000..ffd31b820 Binary files /dev/null and b/radio/src/bitmaps/480x272/default_theme/mask_back.png differ diff --git a/radio/src/bitmaps/480x272/default_theme/mask_busy.png b/radio/src/bitmaps/480x272/default_theme/mask_busy.png new file mode 100644 index 000000000..a2d870205 Binary files /dev/null and b/radio/src/bitmaps/480x272/default_theme/mask_busy.png differ diff --git a/radio/sdcard/horus/THEMES/EdgeTX/mask_currentmenu_bg.png b/radio/src/bitmaps/480x272/default_theme/mask_currentmenu_bg.png similarity index 100% rename from radio/sdcard/horus/THEMES/EdgeTX/mask_currentmenu_bg.png rename to radio/src/bitmaps/480x272/default_theme/mask_currentmenu_bg.png diff --git a/radio/sdcard/horus/THEMES/EdgeTX/mask_currentmenu_dot.png b/radio/src/bitmaps/480x272/default_theme/mask_currentmenu_dot.png similarity index 100% rename from radio/sdcard/horus/THEMES/EdgeTX/mask_currentmenu_dot.png rename to radio/src/bitmaps/480x272/default_theme/mask_currentmenu_dot.png diff --git a/radio/sdcard/horus/THEMES/EdgeTX/mask_currentmenu_shadow.png b/radio/src/bitmaps/480x272/default_theme/mask_currentmenu_shadow.png similarity index 100% rename from radio/sdcard/horus/THEMES/EdgeTX/mask_currentmenu_shadow.png rename to radio/src/bitmaps/480x272/default_theme/mask_currentmenu_shadow.png diff --git a/radio/sdcard/horus/THEMES/EdgeTX/mask_edgetx.png b/radio/src/bitmaps/480x272/default_theme/mask_edgetx.png similarity index 100% rename from radio/sdcard/horus/THEMES/EdgeTX/mask_edgetx.png rename to radio/src/bitmaps/480x272/default_theme/mask_edgetx.png diff --git a/radio/src/bitmaps/480x272/default_theme/mask_error.png b/radio/src/bitmaps/480x272/default_theme/mask_error.png new file mode 100755 index 000000000..3bf350e55 Binary files /dev/null and b/radio/src/bitmaps/480x272/default_theme/mask_error.png differ diff --git a/radio/src/bitmaps/480x272/default_theme/mask_iconback.png b/radio/src/bitmaps/480x272/default_theme/mask_iconback.png new file mode 100644 index 000000000..966f6b7f2 Binary files /dev/null and b/radio/src/bitmaps/480x272/default_theme/mask_iconback.png differ diff --git a/radio/sdcard/horus/THEMES/EdgeTX/mask_menu_model.png b/radio/src/bitmaps/480x272/default_theme/mask_menu_model.png similarity index 100% rename from radio/sdcard/horus/THEMES/EdgeTX/mask_menu_model.png rename to radio/src/bitmaps/480x272/default_theme/mask_menu_model.png diff --git a/radio/sdcard/horus/THEMES/EdgeTX/mask_menu_radio.png b/radio/src/bitmaps/480x272/default_theme/mask_menu_radio.png similarity index 100% rename from radio/sdcard/horus/THEMES/EdgeTX/mask_menu_radio.png rename to radio/src/bitmaps/480x272/default_theme/mask_menu_radio.png diff --git a/radio/sdcard/horus/THEMES/EdgeTX/mask_menu_stats.png b/radio/src/bitmaps/480x272/default_theme/mask_menu_stats.png similarity index 100% rename from radio/sdcard/horus/THEMES/EdgeTX/mask_menu_stats.png rename to radio/src/bitmaps/480x272/default_theme/mask_menu_stats.png diff --git a/radio/sdcard/horus/THEMES/EdgeTX/mask_menu_theme.png b/radio/src/bitmaps/480x272/default_theme/mask_menu_theme.png similarity index 100% rename from radio/sdcard/horus/THEMES/EdgeTX/mask_menu_theme.png rename to radio/src/bitmaps/480x272/default_theme/mask_menu_theme.png diff --git a/radio/sdcard/horus/THEMES/EdgeTX/mask_model_curves.png b/radio/src/bitmaps/480x272/default_theme/mask_model_curves.png similarity index 100% rename from radio/sdcard/horus/THEMES/EdgeTX/mask_model_curves.png rename to radio/src/bitmaps/480x272/default_theme/mask_model_curves.png diff --git a/radio/sdcard/horus/THEMES/EdgeTX/mask_model_flight_modes.png b/radio/src/bitmaps/480x272/default_theme/mask_model_flight_modes.png similarity index 100% rename from radio/sdcard/horus/THEMES/EdgeTX/mask_model_flight_modes.png rename to radio/src/bitmaps/480x272/default_theme/mask_model_flight_modes.png diff --git a/radio/sdcard/horus/THEMES/EdgeTX/mask_model_gvars.png b/radio/src/bitmaps/480x272/default_theme/mask_model_gvars.png similarity index 100% rename from radio/sdcard/horus/THEMES/EdgeTX/mask_model_gvars.png rename to radio/src/bitmaps/480x272/default_theme/mask_model_gvars.png diff --git a/radio/sdcard/horus/THEMES/EdgeTX/mask_model_heli.png b/radio/src/bitmaps/480x272/default_theme/mask_model_heli.png similarity index 100% rename from radio/sdcard/horus/THEMES/EdgeTX/mask_model_heli.png rename to radio/src/bitmaps/480x272/default_theme/mask_model_heli.png diff --git a/radio/sdcard/horus/THEMES/EdgeTX/mask_model_inputs.png b/radio/src/bitmaps/480x272/default_theme/mask_model_inputs.png similarity index 100% rename from radio/sdcard/horus/THEMES/EdgeTX/mask_model_inputs.png rename to radio/src/bitmaps/480x272/default_theme/mask_model_inputs.png diff --git a/radio/sdcard/horus/THEMES/EdgeTX/mask_model_logical_switches.png b/radio/src/bitmaps/480x272/default_theme/mask_model_logical_switches.png similarity index 100% rename from radio/sdcard/horus/THEMES/EdgeTX/mask_model_logical_switches.png rename to radio/src/bitmaps/480x272/default_theme/mask_model_logical_switches.png diff --git a/radio/sdcard/horus/THEMES/EdgeTX/mask_model_lua_scripts.png b/radio/src/bitmaps/480x272/default_theme/mask_model_lua_scripts.png similarity index 100% rename from radio/sdcard/horus/THEMES/EdgeTX/mask_model_lua_scripts.png rename to radio/src/bitmaps/480x272/default_theme/mask_model_lua_scripts.png diff --git a/radio/sdcard/horus/THEMES/EdgeTX/mask_model_mixer.png b/radio/src/bitmaps/480x272/default_theme/mask_model_mixer.png similarity index 100% rename from radio/sdcard/horus/THEMES/EdgeTX/mask_model_mixer.png rename to radio/src/bitmaps/480x272/default_theme/mask_model_mixer.png diff --git a/radio/sdcard/horus/THEMES/EdgeTX/mask_model_outputs.png b/radio/src/bitmaps/480x272/default_theme/mask_model_outputs.png similarity index 100% rename from radio/sdcard/horus/THEMES/EdgeTX/mask_model_outputs.png rename to radio/src/bitmaps/480x272/default_theme/mask_model_outputs.png diff --git a/radio/sdcard/horus/THEMES/EdgeTX/mask_model_setup.png b/radio/src/bitmaps/480x272/default_theme/mask_model_setup.png similarity index 100% rename from radio/sdcard/horus/THEMES/EdgeTX/mask_model_setup.png rename to radio/src/bitmaps/480x272/default_theme/mask_model_setup.png diff --git a/radio/sdcard/horus/THEMES/EdgeTX/mask_model_special_functions.png b/radio/src/bitmaps/480x272/default_theme/mask_model_special_functions.png similarity index 100% rename from radio/sdcard/horus/THEMES/EdgeTX/mask_model_special_functions.png rename to radio/src/bitmaps/480x272/default_theme/mask_model_special_functions.png diff --git a/radio/sdcard/horus/THEMES/EdgeTX/mask_model_telemetry.png b/radio/src/bitmaps/480x272/default_theme/mask_model_telemetry.png similarity index 100% rename from radio/sdcard/horus/THEMES/EdgeTX/mask_model_telemetry.png rename to radio/src/bitmaps/480x272/default_theme/mask_model_telemetry.png diff --git a/radio/src/bitmaps/480x272/default_theme/mask_modelname.png b/radio/src/bitmaps/480x272/default_theme/mask_modelname.png new file mode 100644 index 000000000..2edca73ea Binary files /dev/null and b/radio/src/bitmaps/480x272/default_theme/mask_modelname.png differ diff --git a/radio/src/bitmaps/480x272/default_theme/mask_modelqty.png b/radio/src/bitmaps/480x272/default_theme/mask_modelqty.png new file mode 100644 index 000000000..9a38e4f13 Binary files /dev/null and b/radio/src/bitmaps/480x272/default_theme/mask_modelqty.png differ diff --git a/radio/sdcard/horus/THEMES/EdgeTX/mask_monitor.png b/radio/src/bitmaps/480x272/default_theme/mask_monitor.png similarity index 100% rename from radio/sdcard/horus/THEMES/EdgeTX/mask_monitor.png rename to radio/src/bitmaps/480x272/default_theme/mask_monitor.png diff --git a/radio/sdcard/horus/THEMES/EdgeTX/mask_monitor_channels1.png b/radio/src/bitmaps/480x272/default_theme/mask_monitor_channels1.png similarity index 100% rename from radio/sdcard/horus/THEMES/EdgeTX/mask_monitor_channels1.png rename to radio/src/bitmaps/480x272/default_theme/mask_monitor_channels1.png diff --git a/radio/sdcard/horus/THEMES/EdgeTX/mask_monitor_channels2.png b/radio/src/bitmaps/480x272/default_theme/mask_monitor_channels2.png similarity index 100% rename from radio/sdcard/horus/THEMES/EdgeTX/mask_monitor_channels2.png rename to radio/src/bitmaps/480x272/default_theme/mask_monitor_channels2.png diff --git a/radio/sdcard/horus/THEMES/EdgeTX/mask_monitor_channels3.png b/radio/src/bitmaps/480x272/default_theme/mask_monitor_channels3.png similarity index 100% rename from radio/sdcard/horus/THEMES/EdgeTX/mask_monitor_channels3.png rename to radio/src/bitmaps/480x272/default_theme/mask_monitor_channels3.png diff --git a/radio/sdcard/horus/THEMES/EdgeTX/mask_monitor_channels4.png b/radio/src/bitmaps/480x272/default_theme/mask_monitor_channels4.png similarity index 100% rename from radio/sdcard/horus/THEMES/EdgeTX/mask_monitor_channels4.png rename to radio/src/bitmaps/480x272/default_theme/mask_monitor_channels4.png diff --git a/radio/sdcard/horus/THEMES/EdgeTX/mask_monitor_gvars.png b/radio/src/bitmaps/480x272/default_theme/mask_monitor_gvars.png similarity index 100% rename from radio/sdcard/horus/THEMES/EdgeTX/mask_monitor_gvars.png rename to radio/src/bitmaps/480x272/default_theme/mask_monitor_gvars.png diff --git a/radio/sdcard/horus/THEMES/EdgeTX/mask_monitor_inver.png b/radio/src/bitmaps/480x272/default_theme/mask_monitor_inver.png similarity index 100% rename from radio/sdcard/horus/THEMES/EdgeTX/mask_monitor_inver.png rename to radio/src/bitmaps/480x272/default_theme/mask_monitor_inver.png diff --git a/radio/sdcard/horus/THEMES/EdgeTX/mask_monitor_lockch.png b/radio/src/bitmaps/480x272/default_theme/mask_monitor_lockch.png similarity index 100% rename from radio/sdcard/horus/THEMES/EdgeTX/mask_monitor_lockch.png rename to radio/src/bitmaps/480x272/default_theme/mask_monitor_lockch.png diff --git a/radio/sdcard/horus/THEMES/EdgeTX/mask_monitor_logsw.png b/radio/src/bitmaps/480x272/default_theme/mask_monitor_logsw.png similarity index 100% rename from radio/sdcard/horus/THEMES/EdgeTX/mask_monitor_logsw.png rename to radio/src/bitmaps/480x272/default_theme/mask_monitor_logsw.png diff --git a/radio/sdcard/horus/THEMES/EdgeTX/mask_monitor_mixes1.png b/radio/src/bitmaps/480x272/default_theme/mask_monitor_mixes1.png similarity index 100% rename from radio/sdcard/horus/THEMES/EdgeTX/mask_monitor_mixes1.png rename to radio/src/bitmaps/480x272/default_theme/mask_monitor_mixes1.png diff --git a/radio/sdcard/horus/THEMES/EdgeTX/mask_monitor_mixes2.png b/radio/src/bitmaps/480x272/default_theme/mask_monitor_mixes2.png similarity index 100% rename from radio/sdcard/horus/THEMES/EdgeTX/mask_monitor_mixes2.png rename to radio/src/bitmaps/480x272/default_theme/mask_monitor_mixes2.png diff --git a/radio/src/bitmaps/480x272/default_theme/mask_moveback.png b/radio/src/bitmaps/480x272/default_theme/mask_moveback.png new file mode 100644 index 000000000..63f56df92 Binary files /dev/null and b/radio/src/bitmaps/480x272/default_theme/mask_moveback.png differ diff --git a/radio/src/bitmaps/480x272/default_theme/mask_moveico.png b/radio/src/bitmaps/480x272/default_theme/mask_moveico.png new file mode 100644 index 000000000..3662b9bb0 Binary files /dev/null and b/radio/src/bitmaps/480x272/default_theme/mask_moveico.png differ diff --git a/radio/sdcard/horus/THEMES/EdgeTX/mask_mplex_add.png b/radio/src/bitmaps/480x272/default_theme/mask_mplex_add.png similarity index 100% rename from radio/sdcard/horus/THEMES/EdgeTX/mask_mplex_add.png rename to radio/src/bitmaps/480x272/default_theme/mask_mplex_add.png diff --git a/radio/sdcard/horus/THEMES/EdgeTX/mask_mplex_multi.png b/radio/src/bitmaps/480x272/default_theme/mask_mplex_multi.png similarity index 100% rename from radio/sdcard/horus/THEMES/EdgeTX/mask_mplex_multi.png rename to radio/src/bitmaps/480x272/default_theme/mask_mplex_multi.png diff --git a/radio/sdcard/horus/THEMES/EdgeTX/mask_mplex_replace.png b/radio/src/bitmaps/480x272/default_theme/mask_mplex_replace.png similarity index 100% rename from radio/sdcard/horus/THEMES/EdgeTX/mask_mplex_replace.png rename to radio/src/bitmaps/480x272/default_theme/mask_mplex_replace.png diff --git a/radio/src/bitmaps/480x272/default_theme/mask_next.png b/radio/src/bitmaps/480x272/default_theme/mask_next.png new file mode 100644 index 000000000..848019e8e Binary files /dev/null and b/radio/src/bitmaps/480x272/default_theme/mask_next.png differ diff --git a/radio/sdcard/horus/THEMES/EdgeTX/mask_opentx.png b/radio/src/bitmaps/480x272/default_theme/mask_opentx.png similarity index 100% rename from radio/sdcard/horus/THEMES/EdgeTX/mask_opentx.png rename to radio/src/bitmaps/480x272/default_theme/mask_opentx.png diff --git a/radio/sdcard/horus/THEMES/EdgeTX/mask_opentx_testmode.png b/radio/src/bitmaps/480x272/default_theme/mask_opentx_testmode.png similarity index 100% rename from radio/sdcard/horus/THEMES/EdgeTX/mask_opentx_testmode.png rename to radio/src/bitmaps/480x272/default_theme/mask_opentx_testmode.png diff --git a/radio/src/bitmaps/480x272/default_theme/mask_question.png b/radio/src/bitmaps/480x272/default_theme/mask_question.png new file mode 100644 index 000000000..66eb18762 Binary files /dev/null and b/radio/src/bitmaps/480x272/default_theme/mask_question.png differ diff --git a/radio/sdcard/horus/THEMES/EdgeTX/mask_radio_calibration.png b/radio/src/bitmaps/480x272/default_theme/mask_radio_calibration.png similarity index 100% rename from radio/sdcard/horus/THEMES/EdgeTX/mask_radio_calibration.png rename to radio/src/bitmaps/480x272/default_theme/mask_radio_calibration.png diff --git a/radio/sdcard/horus/THEMES/EdgeTX/mask_radio_global_functions.png b/radio/src/bitmaps/480x272/default_theme/mask_radio_global_functions.png similarity index 100% rename from radio/sdcard/horus/THEMES/EdgeTX/mask_radio_global_functions.png rename to radio/src/bitmaps/480x272/default_theme/mask_radio_global_functions.png diff --git a/radio/sdcard/horus/THEMES/EdgeTX/mask_radio_hardware.png b/radio/src/bitmaps/480x272/default_theme/mask_radio_hardware.png similarity index 100% rename from radio/sdcard/horus/THEMES/EdgeTX/mask_radio_hardware.png rename to radio/src/bitmaps/480x272/default_theme/mask_radio_hardware.png diff --git a/radio/sdcard/horus/THEMES/EdgeTX/mask_radio_sd_browser.png b/radio/src/bitmaps/480x272/default_theme/mask_radio_sd_browser.png similarity index 100% rename from radio/sdcard/horus/THEMES/EdgeTX/mask_radio_sd_browser.png rename to radio/src/bitmaps/480x272/default_theme/mask_radio_sd_browser.png diff --git a/radio/sdcard/horus/THEMES/EdgeTX/mask_radio_setup.png b/radio/src/bitmaps/480x272/default_theme/mask_radio_setup.png similarity index 100% rename from radio/sdcard/horus/THEMES/EdgeTX/mask_radio_setup.png rename to radio/src/bitmaps/480x272/default_theme/mask_radio_setup.png diff --git a/radio/sdcard/horus/THEMES/EdgeTX/mask_radio_tools.png b/radio/src/bitmaps/480x272/default_theme/mask_radio_tools.png similarity index 100% rename from radio/sdcard/horus/THEMES/EdgeTX/mask_radio_tools.png rename to radio/src/bitmaps/480x272/default_theme/mask_radio_tools.png diff --git a/radio/sdcard/horus/THEMES/EdgeTX/mask_radio_trainer.png b/radio/src/bitmaps/480x272/default_theme/mask_radio_trainer.png similarity index 100% rename from radio/sdcard/horus/THEMES/EdgeTX/mask_radio_trainer.png rename to radio/src/bitmaps/480x272/default_theme/mask_radio_trainer.png diff --git a/radio/sdcard/horus/THEMES/EdgeTX/mask_radio_version.png b/radio/src/bitmaps/480x272/default_theme/mask_radio_version.png similarity index 100% rename from radio/sdcard/horus/THEMES/EdgeTX/mask_radio_version.png rename to radio/src/bitmaps/480x272/default_theme/mask_radio_version.png diff --git a/radio/sdcard/horus/THEMES/EdgeTX/mask_sbar_mixer.png b/radio/src/bitmaps/480x272/default_theme/mask_sbar_mixer.png similarity index 100% rename from radio/sdcard/horus/THEMES/EdgeTX/mask_sbar_mixer.png rename to radio/src/bitmaps/480x272/default_theme/mask_sbar_mixer.png diff --git a/radio/sdcard/horus/THEMES/EdgeTX/mask_sbar_output.png b/radio/src/bitmaps/480x272/default_theme/mask_sbar_output.png similarity index 100% rename from radio/sdcard/horus/THEMES/EdgeTX/mask_sbar_output.png rename to radio/src/bitmaps/480x272/default_theme/mask_sbar_output.png diff --git a/radio/sdcard/horus/THEMES/EdgeTX/mask_sbar_to.png b/radio/src/bitmaps/480x272/default_theme/mask_sbar_to.png similarity index 100% rename from radio/sdcard/horus/THEMES/EdgeTX/mask_sbar_to.png rename to radio/src/bitmaps/480x272/default_theme/mask_sbar_to.png diff --git a/radio/src/bitmaps/480x272/default_theme/mask_sdfree.png b/radio/src/bitmaps/480x272/default_theme/mask_sdfree.png new file mode 100644 index 000000000..f0ae81982 Binary files /dev/null and b/radio/src/bitmaps/480x272/default_theme/mask_sdfree.png differ diff --git a/radio/src/bitmaps/480x272/default_theme/mask_shutdown.png b/radio/src/bitmaps/480x272/default_theme/mask_shutdown.png new file mode 100755 index 000000000..87704cc5f Binary files /dev/null and b/radio/src/bitmaps/480x272/default_theme/mask_shutdown.png differ diff --git a/radio/sdcard/horus/THEMES/EdgeTX/mask_stats_analogs.png b/radio/src/bitmaps/480x272/default_theme/mask_stats_analogs.png similarity index 100% rename from radio/sdcard/horus/THEMES/EdgeTX/mask_stats_analogs.png rename to radio/src/bitmaps/480x272/default_theme/mask_stats_analogs.png diff --git a/radio/sdcard/horus/THEMES/EdgeTX/mask_stats_debug.png b/radio/src/bitmaps/480x272/default_theme/mask_stats_debug.png similarity index 100% rename from radio/sdcard/horus/THEMES/EdgeTX/mask_stats_debug.png rename to radio/src/bitmaps/480x272/default_theme/mask_stats_debug.png diff --git a/radio/sdcard/horus/THEMES/EdgeTX/mask_stats_lua.png b/radio/src/bitmaps/480x272/default_theme/mask_stats_lua.png similarity index 100% rename from radio/sdcard/horus/THEMES/EdgeTX/mask_stats_lua.png rename to radio/src/bitmaps/480x272/default_theme/mask_stats_lua.png diff --git a/radio/sdcard/horus/THEMES/EdgeTX/mask_stats_throttle_graph.png b/radio/src/bitmaps/480x272/default_theme/mask_stats_throttle_graph.png similarity index 100% rename from radio/sdcard/horus/THEMES/EdgeTX/mask_stats_throttle_graph.png rename to radio/src/bitmaps/480x272/default_theme/mask_stats_throttle_graph.png diff --git a/radio/sdcard/horus/THEMES/EdgeTX/mask_stats_timers.png b/radio/src/bitmaps/480x272/default_theme/mask_stats_timers.png similarity index 100% rename from radio/sdcard/horus/THEMES/EdgeTX/mask_stats_timers.png rename to radio/src/bitmaps/480x272/default_theme/mask_stats_timers.png diff --git a/radio/sdcard/horus/THEMES/EdgeTX/mask_stats_value.png b/radio/src/bitmaps/480x272/default_theme/mask_stats_value.png similarity index 100% rename from radio/sdcard/horus/THEMES/EdgeTX/mask_stats_value.png rename to radio/src/bitmaps/480x272/default_theme/mask_stats_value.png diff --git a/radio/sdcard/horus/THEMES/EdgeTX/mask_switches.png b/radio/src/bitmaps/480x272/default_theme/mask_switches.png similarity index 100% rename from radio/sdcard/horus/THEMES/EdgeTX/mask_switches.png rename to radio/src/bitmaps/480x272/default_theme/mask_switches.png diff --git a/radio/sdcard/horus/THEMES/EdgeTX/mask_textline_curve.png b/radio/src/bitmaps/480x272/default_theme/mask_textline_curve.png similarity index 100% rename from radio/sdcard/horus/THEMES/EdgeTX/mask_textline_curve.png rename to radio/src/bitmaps/480x272/default_theme/mask_textline_curve.png diff --git a/radio/sdcard/horus/THEMES/EdgeTX/mask_textline_delay.png b/radio/src/bitmaps/480x272/default_theme/mask_textline_delay.png similarity index 100% rename from radio/sdcard/horus/THEMES/EdgeTX/mask_textline_delay.png rename to radio/src/bitmaps/480x272/default_theme/mask_textline_delay.png diff --git a/radio/sdcard/horus/THEMES/EdgeTX/mask_textline_delayslow.png b/radio/src/bitmaps/480x272/default_theme/mask_textline_delayslow.png similarity index 100% rename from radio/sdcard/horus/THEMES/EdgeTX/mask_textline_delayslow.png rename to radio/src/bitmaps/480x272/default_theme/mask_textline_delayslow.png diff --git a/radio/sdcard/horus/THEMES/EdgeTX/mask_textline_fm.png b/radio/src/bitmaps/480x272/default_theme/mask_textline_fm.png similarity index 100% rename from radio/sdcard/horus/THEMES/EdgeTX/mask_textline_fm.png rename to radio/src/bitmaps/480x272/default_theme/mask_textline_fm.png diff --git a/radio/sdcard/horus/THEMES/EdgeTX/mask_textline_label.png b/radio/src/bitmaps/480x272/default_theme/mask_textline_label.png similarity index 100% rename from radio/sdcard/horus/THEMES/EdgeTX/mask_textline_label.png rename to radio/src/bitmaps/480x272/default_theme/mask_textline_label.png diff --git a/radio/sdcard/horus/THEMES/EdgeTX/mask_textline_slow.png b/radio/src/bitmaps/480x272/default_theme/mask_textline_slow.png similarity index 100% rename from radio/sdcard/horus/THEMES/EdgeTX/mask_textline_slow.png rename to radio/src/bitmaps/480x272/default_theme/mask_textline_slow.png diff --git a/radio/sdcard/horus/THEMES/EdgeTX/mask_textline_switch.png b/radio/src/bitmaps/480x272/default_theme/mask_textline_switch.png similarity index 100% rename from radio/sdcard/horus/THEMES/EdgeTX/mask_textline_switch.png rename to radio/src/bitmaps/480x272/default_theme/mask_textline_switch.png diff --git a/radio/sdcard/horus/THEMES/EdgeTX/mask_theme_add_view.png b/radio/src/bitmaps/480x272/default_theme/mask_theme_add_view.png similarity index 100% rename from radio/sdcard/horus/THEMES/EdgeTX/mask_theme_add_view.png rename to radio/src/bitmaps/480x272/default_theme/mask_theme_add_view.png diff --git a/radio/sdcard/horus/THEMES/EdgeTX/mask_theme_setup.png b/radio/src/bitmaps/480x272/default_theme/mask_theme_setup.png similarity index 100% rename from radio/sdcard/horus/THEMES/EdgeTX/mask_theme_setup.png rename to radio/src/bitmaps/480x272/default_theme/mask_theme_setup.png diff --git a/radio/sdcard/horus/THEMES/EdgeTX/mask_theme_view1.png b/radio/src/bitmaps/480x272/default_theme/mask_theme_view1.png similarity index 100% rename from radio/sdcard/horus/THEMES/EdgeTX/mask_theme_view1.png rename to radio/src/bitmaps/480x272/default_theme/mask_theme_view1.png diff --git a/radio/sdcard/horus/THEMES/EdgeTX/mask_theme_view2.png b/radio/src/bitmaps/480x272/default_theme/mask_theme_view2.png similarity index 100% rename from radio/sdcard/horus/THEMES/EdgeTX/mask_theme_view2.png rename to radio/src/bitmaps/480x272/default_theme/mask_theme_view2.png diff --git a/radio/sdcard/horus/THEMES/EdgeTX/mask_theme_view3.png b/radio/src/bitmaps/480x272/default_theme/mask_theme_view3.png similarity index 100% rename from radio/sdcard/horus/THEMES/EdgeTX/mask_theme_view3.png rename to radio/src/bitmaps/480x272/default_theme/mask_theme_view3.png diff --git a/radio/sdcard/horus/THEMES/EdgeTX/mask_theme_view4.png b/radio/src/bitmaps/480x272/default_theme/mask_theme_view4.png similarity index 100% rename from radio/sdcard/horus/THEMES/EdgeTX/mask_theme_view4.png rename to radio/src/bitmaps/480x272/default_theme/mask_theme_view4.png diff --git a/radio/sdcard/horus/THEMES/EdgeTX/mask_theme_view5.png b/radio/src/bitmaps/480x272/default_theme/mask_theme_view5.png similarity index 100% rename from radio/sdcard/horus/THEMES/EdgeTX/mask_theme_view5.png rename to radio/src/bitmaps/480x272/default_theme/mask_theme_view5.png diff --git a/radio/sdcard/horus/THEMES/EdgeTX/mask_theme_view6.png b/radio/src/bitmaps/480x272/default_theme/mask_theme_view6.png similarity index 100% rename from radio/sdcard/horus/THEMES/EdgeTX/mask_theme_view6.png rename to radio/src/bitmaps/480x272/default_theme/mask_theme_view6.png diff --git a/radio/sdcard/horus/THEMES/EdgeTX/mask_theme_view7.png b/radio/src/bitmaps/480x272/default_theme/mask_theme_view7.png similarity index 100% rename from radio/sdcard/horus/THEMES/EdgeTX/mask_theme_view7.png rename to radio/src/bitmaps/480x272/default_theme/mask_theme_view7.png diff --git a/radio/sdcard/horus/THEMES/EdgeTX/mask_theme_view8.png b/radio/src/bitmaps/480x272/default_theme/mask_theme_view8.png similarity index 100% rename from radio/sdcard/horus/THEMES/EdgeTX/mask_theme_view8.png rename to radio/src/bitmaps/480x272/default_theme/mask_theme_view8.png diff --git a/radio/src/bitmaps/480x272/default_theme/mask_topleft.png b/radio/src/bitmaps/480x272/default_theme/mask_topleft.png new file mode 100644 index 000000000..603bfe1cf Binary files /dev/null and b/radio/src/bitmaps/480x272/default_theme/mask_topleft.png differ diff --git a/radio/src/bitmaps/480x272/default_theme/thumb.png b/radio/src/bitmaps/480x272/default_theme/thumb.png new file mode 100644 index 000000000..908575505 Binary files /dev/null and b/radio/src/bitmaps/480x272/default_theme/thumb.png differ diff --git a/radio/src/bitmaps/480x272/bmp_splash.png b/radio/src/bitmaps/480x272/splash.png similarity index 100% rename from radio/src/bitmaps/480x272/bmp_splash.png rename to radio/src/bitmaps/480x272/splash.png diff --git a/radio/src/gui/colorlcd/bitmaps.cpp b/radio/src/gui/colorlcd/bitmaps.cpp index c079a4225..1d8ed9670 100644 --- a/radio/src/gui/colorlcd/bitmaps.cpp +++ b/radio/src/gui/colorlcd/bitmaps.cpp @@ -195,8 +195,7 @@ const uint8_t LBM_SWIPE_RIGHT[] = { BitmapBuffer * calibStick = nullptr; BitmapBuffer * calibStickBackground = nullptr; BitmapBuffer * calibTrackpBackground = nullptr; -BitmapBuffer * calibRadioPict = nullptr; -BitmapBuffer * modelselIconBitmap = nullptr; +//BitmapBuffer * modelselIconBitmap = nullptr; BitmapBuffer * modelselSdFreeBitmap = nullptr; BitmapBuffer * modelselModelQtyBitmap = nullptr; BitmapBuffer * modelselModelNameBitmap = nullptr; diff --git a/radio/src/gui/colorlcd/bitmaps.h b/radio/src/gui/colorlcd/bitmaps.h index 3c6512153..60950a707 100644 --- a/radio/src/gui/colorlcd/bitmaps.h +++ b/radio/src/gui/colorlcd/bitmaps.h @@ -74,7 +74,7 @@ extern const uint8_t LBM_SWIPE_CIRCLE[]; extern const uint8_t LBM_SWIPE_LEFT[]; extern const uint8_t LBM_SWIPE_RIGHT[]; -extern BitmapBuffer * modelselIconBitmap; +//extern BitmapBuffer * modelselIconBitmap; extern BitmapBuffer * modelselSdFreeBitmap; extern BitmapBuffer * modelselModelQtyBitmap; extern BitmapBuffer * modelselModelNameBitmap; @@ -86,7 +86,6 @@ extern BitmapBuffer * modelselWizardBackground; extern BitmapBuffer * calibStick; extern BitmapBuffer * calibStickBackground; extern BitmapBuffer * calibTrackpBackground; -extern BitmapBuffer * calibRadioPict; // Channels monitor bitmaps extern BitmapBuffer * chanMonLockedBitmap; diff --git a/radio/src/gui/colorlcd/draw_functions.cpp b/radio/src/gui/colorlcd/draw_functions.cpp index 65f07c39b..122c0ac91 100644 --- a/radio/src/gui/colorlcd/draw_functions.cpp +++ b/radio/src/gui/colorlcd/draw_functions.cpp @@ -74,68 +74,68 @@ void drawValueOrGVar(BitmapBuffer * dc, coord_t x, coord_t y, gvar_t value, gvar } } +constexpr LcdFlags splash_background_color = + COLOR2FLAGS(((0xC >> 3) << 11) | ((0x3F >> 2) << 5) | (0x66 >> 3)); + void drawSleepBitmap() { lcd->reset(); lcd->clear(); - const BitmapBuffer * bitmap = BitmapBuffer::loadBitmap(OpenTxTheme::instance()->getFilePath("sleep.bmp")); + const BitmapBuffer* bitmap = OpenTxTheme::instance()->shutdown; if (bitmap) { - lcd->drawBitmap((LCD_W-bitmap->width())/2, (LCD_H-bitmap->height())/2, bitmap); - delete bitmap; + lcd->drawMask((LCD_W-bitmap->width())/2, (LCD_H-bitmap->height())/2, + bitmap, splash_background_color); } lcdRefresh(); } -// -// TODO: move shutdown animation to Theme -// #define SHUTDOWN_CIRCLE_DIAMETER 150 -void drawShutdownAnimation(uint32_t duration, uint32_t totalDuration, const char * message) + +void drawShutdownAnimation(uint32_t duration, uint32_t totalDuration, + const char* message) { if (totalDuration == 0) return; - static const BitmapBuffer* shutdown = nullptr; - if (!shutdown) { - shutdown = BitmapBuffer::loadBitmap( - OpenTxTheme::instance()->getFilePath("shutdown.bmp")); - } + static const BitmapBuffer * shutdown = OpenTxTheme::instance()->shutdown; lcd->reset(); - + lcd->clear(splash_background_color); + if (shutdown) { - OpenTxTheme::instance()->drawBackground(lcd); - lcd->drawBitmap((LCD_W - shutdown->width()) / 2, - (LCD_H - shutdown->height()) / 2, shutdown); + lcd->drawMask((LCD_W - shutdown->width()) / 2, + (LCD_H - shutdown->height()) / 2, shutdown, + COLOR2FLAGS(WHITE)); + int quarter = duration / (totalDuration / 5); if (quarter >= 1) lcd->drawBitmapPattern(LCD_W / 2, (LCD_H - SHUTDOWN_CIRCLE_DIAMETER) / 2, - LBM_SHUTDOWN_CIRCLE, DEFAULT_COLOR, 0, + LBM_SHUTDOWN_CIRCLE, COLOR2FLAGS(WHITE), 0, SHUTDOWN_CIRCLE_DIAMETER / 2); if (quarter >= 2) lcd->drawBitmapPattern(LCD_W / 2, LCD_H / 2, LBM_SHUTDOWN_CIRCLE, - DEFAULT_COLOR, SHUTDOWN_CIRCLE_DIAMETER / 2, + COLOR2FLAGS(WHITE), SHUTDOWN_CIRCLE_DIAMETER / 2, SHUTDOWN_CIRCLE_DIAMETER / 2); if (quarter >= 3) lcd->drawBitmapPattern((LCD_W - SHUTDOWN_CIRCLE_DIAMETER) / 2, LCD_H / 2, - LBM_SHUTDOWN_CIRCLE, DEFAULT_COLOR, + LBM_SHUTDOWN_CIRCLE, COLOR2FLAGS(WHITE), SHUTDOWN_CIRCLE_DIAMETER, SHUTDOWN_CIRCLE_DIAMETER / 2); if (quarter >= 4) lcd->drawBitmapPattern((LCD_W - SHUTDOWN_CIRCLE_DIAMETER) / 2, (LCD_H - SHUTDOWN_CIRCLE_DIAMETER) / 2, - LBM_SHUTDOWN_CIRCLE, DEFAULT_COLOR, + LBM_SHUTDOWN_CIRCLE, COLOR2FLAGS(WHITE), SHUTDOWN_CIRCLE_DIAMETER * 3 / 2, SHUTDOWN_CIRCLE_DIAMETER / 2); } else { - lcd->clear(); + //lcd->clear(); int quarter = duration / (totalDuration / 5); for (int i = 1; i <= 4; i++) { if (quarter >= i) { lcd->drawSolidFilledRect(LCD_W / 2 - 70 + 24 * i, LCD_H / 2 - 10, 20, - 20, DEFAULT_BGCOLOR); + 20, COLOR2FLAGS(WHITE)); } } } diff --git a/radio/src/gui/colorlcd/fullscreen_dialog.cpp b/radio/src/gui/colorlcd/fullscreen_dialog.cpp index 73f139421..97a2f001b 100644 --- a/radio/src/gui/colorlcd/fullscreen_dialog.cpp +++ b/radio/src/gui/colorlcd/fullscreen_dialog.cpp @@ -54,16 +54,14 @@ void FullScreenDialog::paint(BitmapBuffer * dc) FOCUS_COLOR, OPACITY(8)); if (type == WARNING_TYPE_ALERT || type == WARNING_TYPE_ASTERISK) { - dc->drawBitmap(ALERT_BITMAP_LEFT, ALERT_BITMAP_TOP, - OpenTxTheme::instance()->asterisk); - } - else if (type == WARNING_TYPE_INFO) { - dc->drawBitmap(ALERT_BITMAP_LEFT, ALERT_BITMAP_TOP, - OpenTxTheme::instance()->busy); - } - else { // confirmation - dc->drawBitmap(ALERT_BITMAP_LEFT, ALERT_BITMAP_TOP, - OpenTxTheme::instance()->question); + dc->drawMask(ALERT_BITMAP_LEFT, ALERT_BITMAP_TOP, + OpenTxTheme::instance()->error, ALARM_COLOR); + } else if (type == WARNING_TYPE_INFO) { + dc->drawMask(ALERT_BITMAP_LEFT, ALERT_BITMAP_TOP, + OpenTxTheme::instance()->busy, ALARM_COLOR); + } else { // confirmation + dc->drawMask(ALERT_BITMAP_LEFT, ALERT_BITMAP_TOP, + OpenTxTheme::instance()->error, ALARM_COLOR); } if (type == WARNING_TYPE_ALERT) { diff --git a/radio/src/gui/colorlcd/radio_calibration.cpp b/radio/src/gui/colorlcd/radio_calibration.cpp index 2cd07317a..f34f09ec8 100644 --- a/radio/src/gui/colorlcd/radio_calibration.cpp +++ b/radio/src/gui/colorlcd/radio_calibration.cpp @@ -69,16 +69,9 @@ void RadioCalibrationPage::buildBody(FormWindow * window) { menuCalibrationState = CALIB_START; - if (calibRadioPict) { - // Background radio image -#if LCD_W > LCD_H - new StaticBitmap(window, {LCD_W / 2 - calibRadioPict->width() / 2, 5, calibRadioPict->height(), calibRadioPict->width()}, calibRadioPict); -#else - new StaticBitmap(window, {LCD_W / 2 - calibRadioPict->width() / 2, LCD_H / 2 - calibRadioPict->height() / 2, calibRadioPict->height(), calibRadioPict->width()}, calibRadioPict); -#endif - } - // The two sticks + + //TODO: dynamic placing new StickCalibrationWindow(window, {40, 20, 90, 90}, STICK1, STICK2); new StickCalibrationWindow(window, {LCD_W - 130, 20, 90, 90}, STICK4, STICK3); diff --git a/radio/src/gui/colorlcd/splash.cpp b/radio/src/gui/colorlcd/splash.cpp index 1ac28e8b9..4c035b5d0 100644 --- a/radio/src/gui/colorlcd/splash.cpp +++ b/radio/src/gui/colorlcd/splash.cpp @@ -22,35 +22,38 @@ #if defined(SPLASH) -const uint8_t __bmp_splash[] __ALIGNED(4) { -#include "bmp_splash.lbm" +const uint8_t __bmp_splash[] { +#include "big_logo.lbm" }; -Bitmap BMP_SPLASH(BMP_RGB565, (const uint16_t *)__bmp_splash); void drawSplash() { - static bool loadImgFromSD = true; + constexpr LcdFlags splash_background_color = + COLOR2FLAGS(((0xC >> 3) << 11) | ((0x3F >> 2) << 5) | (0x66 >> 3)); + + static bool loadSplashImg = true; static BitmapBuffer * splashImg = nullptr; - if (loadImgFromSD && splashImg == nullptr) { + // try splash from SD card first + if (loadSplashImg && splashImg == nullptr) { if (!sdMounted()) sdInit(); splashImg = BitmapBuffer::loadBitmap(BITMAPS_PATH "/" SPLASH_FILE); - loadImgFromSD = false; + loadSplashImg = false; + + // otherwise load from FLASH + if (splashImg == nullptr) { + splashImg = BitmapBuffer::loadRamBitmap(__bmp_splash, sizeof(__bmp_splash)); + } } - lcd->clear(); + lcd->clear(splash_background_color); if (splashImg) { lcd->drawBitmap((LCD_W - splashImg->width())/2, (LCD_H - splashImg->height())/2, splashImg); } - else { - lcd->drawBitmap((LCD_W - BMP_SPLASH.width())/2, - (LCD_H - BMP_SPLASH.height())/2, - &BMP_SPLASH); - } - + lcdRefresh(); } #endif diff --git a/radio/src/gui/colorlcd/theme.cpp b/radio/src/gui/colorlcd/theme.cpp index 5954ca760..b9561fab9 100644 --- a/radio/src/gui/colorlcd/theme.cpp +++ b/radio/src/gui/colorlcd/theme.cpp @@ -25,9 +25,9 @@ //#include "modal_window.h" extern OpenTxTheme * defaultTheme; -const BitmapBuffer * OpenTxTheme::asterisk = nullptr; -const BitmapBuffer * OpenTxTheme::question = nullptr; +const BitmapBuffer * OpenTxTheme::error = nullptr; const BitmapBuffer * OpenTxTheme::busy = nullptr; +const BitmapBuffer * OpenTxTheme::shutdown = nullptr; const uint8_t LBM_FOLDER[] = { #include "mask_folder.lbm" @@ -44,6 +44,19 @@ const uint8_t LBM_USB_PLUGGED[] = { #include "mask_usb_symbol.lbm" }; + +const uint8_t error_bitmap[] = { +#include "mask_error.lbm" +}; + +const uint8_t busy_bitmap[] = { +#include "mask_busy.lbm" +}; + +const uint8_t shutdown_bitmap[] = { +#include "mask_shutdown.lbm" +}; + std::list & getRegisteredThemes() { static std::list themes; @@ -71,12 +84,12 @@ void OpenTxTheme::init() const void OpenTxTheme::load() const { - if (!asterisk) - asterisk = BitmapBuffer::loadBitmap(getFilePath("asterisk.bmp")); - if (!question) - question = BitmapBuffer::loadBitmap(getFilePath("question.bmp")); + if (!error) + error = BitmapBuffer::load8bitMask(error_bitmap); if (!busy) - busy = BitmapBuffer::loadBitmap(getFilePath("busy.bmp")); + busy = BitmapBuffer::load8bitMask(busy_bitmap); + if (!shutdown) + shutdown = BitmapBuffer::load8bitMask(shutdown_bitmap); } ZoneOptionValue * OpenTxTheme::getOptionValue(unsigned int index) const diff --git a/radio/src/gui/colorlcd/theme.h b/radio/src/gui/colorlcd/theme.h index 90d2db9e8..fdd5149c9 100644 --- a/radio/src/gui/colorlcd/theme.h +++ b/radio/src/gui/colorlcd/theme.h @@ -111,9 +111,9 @@ class OpenTxTheme: public Theme BitmapBuffer * thumb; public: - static const BitmapBuffer * asterisk; - static const BitmapBuffer * question; + static const BitmapBuffer * error; static const BitmapBuffer * busy; + static const BitmapBuffer * shutdown; }; OpenTxTheme * getTheme(const char * name); diff --git a/radio/src/gui/colorlcd/themes/480_bitmaps.h b/radio/src/gui/colorlcd/themes/480_bitmaps.h new file mode 100644 index 000000000..2b1df160b --- /dev/null +++ b/radio/src/gui/colorlcd/themes/480_bitmaps.h @@ -0,0 +1,244 @@ +const uint8_t mask_next[] = { +#include "mask_next.lbm" +}; +const uint8_t mask_back[] = { +#include "mask_back.lbm" +}; +const uint8_t mask_currentmenu_bg[] = { +#include "mask_currentmenu_bg.lbm" +}; +const uint8_t mask_currentmenu_dot[] = { +#include "mask_currentmenu_dot.lbm" +}; +const uint8_t mask_currentmenu_shadow[] = { +#include "mask_currentmenu_shadow.lbm" +}; +const uint8_t mask_menu_model[] = { +#include "mask_menu_model.lbm" +}; +const uint8_t mask_menu_radio[] = { +#include "mask_menu_radio.lbm" +}; +const uint8_t mask_menu_stats[] = { +#include "mask_menu_stats.lbm" +}; +const uint8_t mask_menu_theme[] = { +#include "mask_menu_theme.lbm" +}; +const uint8_t mask_model_curves[] = { +#include "mask_model_curves.lbm" +}; +const uint8_t mask_model_flight_modes[] = { +#include "mask_model_flight_modes.lbm" +}; +const uint8_t mask_model_gvars[] = { +#include "mask_model_gvars.lbm" +}; +const uint8_t mask_model_heli[] = { +#include "mask_model_heli.lbm" +}; +const uint8_t mask_model_inputs[] = { +#include "mask_model_inputs.lbm" +}; +const uint8_t mask_model_logical_switches[] = { +#include "mask_model_logical_switches.lbm" +}; +const uint8_t mask_model_lua_scripts[] = { +#include "mask_model_lua_scripts.lbm" +}; +const uint8_t mask_model_mixer[] = { +#include "mask_model_mixer.lbm" +}; +const uint8_t mask_model_outputs[] = { +#include "mask_model_outputs.lbm" +}; +const uint8_t mask_model_setup[] = { +#include "mask_model_setup.lbm" +}; +const uint8_t mask_model_special_functions[] = { +#include "mask_model_special_functions.lbm" +}; +const uint8_t mask_model_telemetry[] = { +#include "mask_model_telemetry.lbm" +}; +const uint8_t mask_monitor[] = { +#include "mask_monitor.lbm" +}; +const uint8_t mask_monitor_channels1[] = { +#include "mask_monitor_channels1.lbm" +}; +const uint8_t mask_monitor_channels2[] = { +#include "mask_monitor_channels2.lbm" +}; +const uint8_t mask_monitor_channels3[] = { +#include "mask_monitor_channels3.lbm" +}; +const uint8_t mask_monitor_channels4[] = { +#include "mask_monitor_channels4.lbm" +}; +const uint8_t mask_monitor_gvars[] = { +#include "mask_monitor_gvars.lbm" +}; +const uint8_t mask_monitor_inver[] = { +#include "mask_monitor_inver.lbm" +}; +const uint8_t mask_monitor_lockch[] = { +#include "mask_monitor_lockch.lbm" +}; +const uint8_t mask_monitor_logsw[] = { +#include "mask_monitor_logsw.lbm" +}; +const uint8_t mask_monitor_mixes1[] = { +#include "mask_monitor_mixes1.lbm" +}; +const uint8_t mask_monitor_mixes2[] = { +#include "mask_monitor_mixes2.lbm" +}; +const uint8_t mask_mplex_add[] = { +#include "mask_mplex_add.lbm" +}; +const uint8_t mask_mplex_multi[] = { +#include "mask_mplex_multi.lbm" +}; +const uint8_t mask_mplex_replace[] = { +#include "mask_mplex_replace.lbm" +}; +const uint8_t mask_topleft[] = { +#include "mask_topleft.lbm" +}; +const uint8_t mask_edgetx[] = { +#include "mask_edgetx.lbm" +}; +const uint8_t mask_opentx_testmode[] = { +#include "mask_opentx_testmode.lbm" +}; +const uint8_t mask_radio_calibration[] = { +#include "mask_radio_calibration.lbm" +}; +const uint8_t mask_radio_global_functions[] = { +#include "mask_radio_global_functions.lbm" +}; +const uint8_t mask_radio_hardware[] = { +#include "mask_radio_hardware.lbm" +}; +const uint8_t mask_radio_sd_browser[] = { +#include "mask_radio_sd_browser.lbm" +}; +const uint8_t mask_radio_setup[] = { +#include "mask_radio_setup.lbm" +}; +const uint8_t mask_radio_tools[] = { +#include "mask_radio_tools.lbm" +}; +const uint8_t mask_radio_trainer[] = { +#include "mask_radio_trainer.lbm" +}; +const uint8_t mask_radio_version[] = { +#include "mask_radio_version.lbm" +}; +const uint8_t mask_sbar_mixer[] = { +#include "mask_sbar_mixer.lbm" +}; +const uint8_t mask_sbar_output[] = { +#include "mask_sbar_output.lbm" +}; +const uint8_t mask_sbar_to[] = { +#include "mask_sbar_to.lbm" +}; +const uint8_t mask_stats_analogs[] = { +#include "mask_stats_analogs.lbm" +}; +const uint8_t mask_stats_debug[] = { +#include "mask_stats_debug.lbm" +}; +const uint8_t mask_stats_lua[] = { +#include "mask_stats_lua.lbm" +}; +const uint8_t mask_stats_throttle_graph[] = { +#include "mask_stats_throttle_graph.lbm" +}; +const uint8_t mask_stats_timers[] = { +#include "mask_stats_timers.lbm" +}; +const uint8_t mask_stats_value[] = { +#include "mask_stats_value.lbm" +}; +const uint8_t mask_switches[] = { +#include "mask_switches.lbm" +}; +const uint8_t mask_textline_curve[] = { +#include "mask_textline_curve.lbm" +}; +const uint8_t mask_textline_delay[] = { +#include "mask_textline_delay.lbm" +}; +const uint8_t mask_textline_delayslow[] = { +#include "mask_textline_delayslow.lbm" +}; +const uint8_t mask_textline_fm[] = { +#include "mask_textline_fm.lbm" +}; +const uint8_t mask_textline_label[] = { +#include "mask_textline_label.lbm" +}; +const uint8_t mask_textline_slow[] = { +#include "mask_textline_slow.lbm" +}; +const uint8_t mask_textline_switch[] = { +#include "mask_textline_switch.lbm" +}; +const uint8_t mask_theme_add_view[] = { +#include "mask_theme_add_view.lbm" +}; +const uint8_t mask_theme_setup[] = { +#include "mask_theme_setup.lbm" +}; +const uint8_t mask_theme_view1[] = { +#include "mask_theme_view1.lbm" +}; +const uint8_t mask_theme_view2[] = { +#include "mask_theme_view2.lbm" +}; +const uint8_t mask_theme_view3[] = { +#include "mask_theme_view3.lbm" +}; +const uint8_t mask_theme_view4[] = { +#include "mask_theme_view4.lbm" +}; +const uint8_t mask_theme_view5[] = { +#include "mask_theme_view5.lbm" +}; +const uint8_t mask_theme_view6[] = { +#include "mask_theme_view6.lbm" +}; +const uint8_t mask_theme_view7[] = { +#include "mask_theme_view7.lbm" +}; +const uint8_t mask_theme_view8[] = { +#include "mask_theme_view8.lbm" +}; +const uint8_t stick_pointer[] = { +#include "alpha_stick_pointer.lbm" +}; +const uint8_t stick_background[] = { +#include "alpha_stick_background.lbm" +}; +const uint8_t trackp_background[] = { +#include "alpha_trackp_background.lbm" +}; +const uint8_t mask_sdfree[] = { +#include "mask_sdfree.lbm" +}; +const uint8_t mask_modelqty[] = { +#include "mask_modelqty.lbm" +}; +const uint8_t mask_modelname[] = { +#include "mask_modelname.lbm" +}; +const uint8_t mask_moveback[] = { +#include "mask_moveback.lbm" +}; +const uint8_t mask_moveico[] = { +#include "mask_moveico.lbm" +}; + diff --git a/radio/src/gui/colorlcd/themes/480_default.cpp b/radio/src/gui/colorlcd/themes/480_default.cpp index a674f1243..7b18995d1 100644 --- a/radio/src/gui/colorlcd/themes/480_default.cpp +++ b/radio/src/gui/colorlcd/themes/480_default.cpp @@ -20,6 +20,7 @@ #include "opentx.h" #include "tabsgroup.h" +#include "480_bitmaps.h" const ZoneOption OPTIONS_THEME_DEFAULT[] = { { STR_BACKGROUND_COLOR, ZoneOption::Color, OPTION_VALUE_UNSIGNED(WHITE) }, @@ -80,10 +81,9 @@ class Theme480: public OpenTxTheme lcdColorTable[TRIM_SHADOW_COLOR_INDEX] = BLACK; } - void loadMenuIcon(uint8_t index, const char * filename, uint32_t color=MENU_COLOR) const + void loadMenuIcon(uint8_t index, const uint8_t * lbm, uint32_t color=MENU_COLOR) const { - TRACE("loadMenuIcon %s", getFilePath(filename)); - BitmapBuffer * mask = BitmapBuffer::loadMask(getFilePath(filename)); + BitmapBuffer * mask = BitmapBuffer::load8bitMask(lbm); if (mask) { delete iconMask[index]; iconMask[index] = mask; @@ -107,76 +107,90 @@ class Theme480: public OpenTxTheme void loadIcons() const { #if defined(LOG_TELEMETRY) || !defined(WATCHDOG) - loadMenuIcon(ICON_OPENTX, "mask_opentx_testmode.png", DEFAULT_COLOR); + loadMenuIcon(ICON_OPENTX, mask_opentx_testmode, DEFAULT_COLOR); #else - loadMenuIcon(ICON_OPENTX, "mask_edgetx.png"); + loadMenuIcon(ICON_OPENTX, mask_edgetx); #endif -#if defined(HARDWARE_TOUCH) - loadMenuIcon(ICON_NEXT, "mask_next.png"); - loadMenuIcon(ICON_BACK, "mask_back.png"); +#if defined(HARDWARE_TOUCH) //TODO: get rid of, and use a real hitbox instead... + loadMenuIcon(ICON_NEXT, mask_next); + loadMenuIcon(ICON_BACK, mask_back); #endif - loadMenuIcon(ICON_RADIO, "mask_menu_radio.png"); - loadMenuIcon(ICON_RADIO_SETUP, "mask_radio_setup.png"); - loadMenuIcon(ICON_RADIO_SD_MANAGER, "mask_radio_sd_browser.png"); - loadMenuIcon(ICON_RADIO_TOOLS, "mask_radio_tools.png"); - loadMenuIcon(ICON_RADIO_SPECTRUM_ANALYSER, "/mask_radio_spectrum_analyser.png"); - loadMenuIcon(ICON_RADIO_GLOBAL_FUNCTIONS, "mask_radio_global_functions.png"); - loadMenuIcon(ICON_RADIO_TRAINER, "mask_radio_trainer.png"); - loadMenuIcon(ICON_RADIO_HARDWARE, "mask_radio_hardware.png"); - loadMenuIcon(ICON_RADIO_CALIBRATION, "mask_radio_calibration.png"); - loadMenuIcon(ICON_RADIO_VERSION, "mask_radio_version.png"); - loadMenuIcon(ICON_MODEL, "mask_menu_model.png"); - loadMenuIcon(ICON_MODEL_SETUP, "mask_model_setup.png"); - loadMenuIcon(ICON_MODEL_HELI, "mask_model_heli.png"); - loadMenuIcon(ICON_MODEL_FLIGHT_MODES, "mask_model_flight_modes.png"); - loadMenuIcon(ICON_MODEL_INPUTS, "mask_model_inputs.png"); - loadMenuIcon(ICON_MODEL_MIXER, "mask_model_mixer.png"); - loadMenuIcon(ICON_MODEL_OUTPUTS, "mask_model_outputs.png"); - loadMenuIcon(ICON_MODEL_CURVES, "mask_model_curves.png"); - loadMenuIcon(ICON_MODEL_GVARS, "mask_model_gvars.png"); - loadMenuIcon(ICON_MODEL_LOGICAL_SWITCHES, "mask_model_logical_switches.png"); - loadMenuIcon(ICON_MODEL_SPECIAL_FUNCTIONS, "mask_model_special_functions.png"); - loadMenuIcon(ICON_MODEL_LUA_SCRIPTS, "mask_model_lua_scripts.png"); - loadMenuIcon(ICON_MODEL_TELEMETRY, "mask_model_telemetry.png"); - loadMenuIcon(ICON_STATS, "mask_menu_stats.png"); - loadMenuIcon(ICON_STATS_THROTTLE_GRAPH, "mask_stats_throttle_graph.png"); - loadMenuIcon(ICON_STATS_TIMERS, "mask_stats_timers.png"); - loadMenuIcon(ICON_STATS_ANALOGS, "mask_stats_analogs.png"); - loadMenuIcon(ICON_STATS_DEBUG, "mask_stats_debug.png"); - loadMenuIcon(ICON_THEME, "mask_menu_theme.png"); - loadMenuIcon(ICON_THEME_SETUP, "mask_theme_setup.png"); - loadMenuIcon(ICON_THEME_VIEW1, "mask_theme_view1.png"); - loadMenuIcon(ICON_THEME_VIEW2, "mask_theme_view2.png"); - loadMenuIcon(ICON_THEME_VIEW3, "mask_theme_view3.png"); - loadMenuIcon(ICON_THEME_VIEW4, "mask_theme_view4.png"); - loadMenuIcon(ICON_THEME_VIEW5, "mask_theme_view5.png"); - loadMenuIcon(ICON_THEME_ADD_VIEW, "mask_theme_add_view.png"); - loadMenuIcon(ICON_MONITOR, "mask_monitor.png"); - loadMenuIcon(ICON_MONITOR_CHANNELS1, "mask_monitor_channels1.png"); - loadMenuIcon(ICON_MONITOR_CHANNELS2, "mask_monitor_channels2.png"); - loadMenuIcon(ICON_MONITOR_CHANNELS3, "mask_monitor_channels3.png"); - loadMenuIcon(ICON_MONITOR_CHANNELS4, "mask_monitor_channels4.png"); - loadMenuIcon(ICON_MONITOR_LOGICAL_SWITCHES, "mask_monitor_logsw.png"); + loadMenuIcon(ICON_RADIO, mask_menu_radio); + loadMenuIcon(ICON_RADIO_SETUP, mask_radio_setup); + loadMenuIcon(ICON_RADIO_SD_MANAGER, mask_radio_sd_browser); + loadMenuIcon(ICON_RADIO_TOOLS, mask_radio_tools); + //loadMenuIcon(ICON_RADIO_SPECTRUM_ANALYSER, mask_radio_spectrum_analyser); + loadMenuIcon(ICON_RADIO_GLOBAL_FUNCTIONS, mask_radio_global_functions); + loadMenuIcon(ICON_RADIO_TRAINER, mask_radio_trainer); + loadMenuIcon(ICON_RADIO_HARDWARE, mask_radio_hardware); + loadMenuIcon(ICON_RADIO_CALIBRATION, mask_radio_calibration); + loadMenuIcon(ICON_RADIO_VERSION, mask_radio_version); + loadMenuIcon(ICON_MODEL, mask_menu_model); + loadMenuIcon(ICON_MODEL_SETUP, mask_model_setup); + loadMenuIcon(ICON_MODEL_HELI, mask_model_heli); + loadMenuIcon(ICON_MODEL_FLIGHT_MODES, mask_model_flight_modes); + loadMenuIcon(ICON_MODEL_INPUTS, mask_model_inputs); + loadMenuIcon(ICON_MODEL_MIXER, mask_model_mixer); + loadMenuIcon(ICON_MODEL_OUTPUTS, mask_model_outputs); + loadMenuIcon(ICON_MODEL_CURVES, mask_model_curves); + loadMenuIcon(ICON_MODEL_GVARS, mask_model_gvars); + loadMenuIcon(ICON_MODEL_LOGICAL_SWITCHES, mask_model_logical_switches); + loadMenuIcon(ICON_MODEL_SPECIAL_FUNCTIONS, mask_model_special_functions); + loadMenuIcon(ICON_MODEL_LUA_SCRIPTS, mask_model_lua_scripts); + loadMenuIcon(ICON_MODEL_TELEMETRY, mask_model_telemetry); + loadMenuIcon(ICON_STATS, mask_menu_stats); + loadMenuIcon(ICON_STATS_THROTTLE_GRAPH, mask_stats_throttle_graph); + loadMenuIcon(ICON_STATS_TIMERS, mask_stats_timers); + loadMenuIcon(ICON_STATS_ANALOGS, mask_stats_analogs); + loadMenuIcon(ICON_STATS_DEBUG, mask_stats_debug); + loadMenuIcon(ICON_THEME, mask_menu_theme); + loadMenuIcon(ICON_THEME_SETUP, mask_theme_setup); + loadMenuIcon(ICON_THEME_VIEW1, mask_theme_view1); + loadMenuIcon(ICON_THEME_VIEW2, mask_theme_view2); + loadMenuIcon(ICON_THEME_VIEW3, mask_theme_view3); + loadMenuIcon(ICON_THEME_VIEW4, mask_theme_view4); + loadMenuIcon(ICON_THEME_VIEW5, mask_theme_view5); + loadMenuIcon(ICON_THEME_ADD_VIEW, mask_theme_add_view); + loadMenuIcon(ICON_MONITOR, mask_monitor); + loadMenuIcon(ICON_MONITOR_CHANNELS1, mask_monitor_channels1); + loadMenuIcon(ICON_MONITOR_CHANNELS2, mask_monitor_channels2); + loadMenuIcon(ICON_MONITOR_CHANNELS3, mask_monitor_channels3); + loadMenuIcon(ICON_MONITOR_CHANNELS4, mask_monitor_channels4); + loadMenuIcon(ICON_MONITOR_LOGICAL_SWITCHES, mask_monitor_logsw); - BitmapBuffer * background = BitmapBuffer::loadMask(getFilePath("mask_currentmenu_bg.png")); - BitmapBuffer * shadow = BitmapBuffer::loadMask(getFilePath("mask_currentmenu_shadow.png")); - BitmapBuffer * dot = BitmapBuffer::loadMask(getFilePath("mask_currentmenu_dot.png")); + BitmapBuffer * background = BitmapBuffer::load8bitMask(mask_currentmenu_bg); + BitmapBuffer * shadow = BitmapBuffer::load8bitMask(mask_currentmenu_shadow); + BitmapBuffer * dot = BitmapBuffer::load8bitMask(mask_currentmenu_dot); if (!currentMenuBackground) { currentMenuBackground = new BitmapBuffer(BMP_RGB565, 36, 53); } if (currentMenuBackground) { - currentMenuBackground->drawSolidFilledRect(0, 0, currentMenuBackground->width(), MENU_HEADER_HEIGHT, MENU_BGCOLOR); - currentMenuBackground->drawSolidFilledRect(0, MENU_HEADER_HEIGHT, currentMenuBackground->width(), MENU_TITLE_TOP - MENU_HEADER_HEIGHT, DEFAULT_BGCOLOR); - currentMenuBackground->drawSolidFilledRect(0, MENU_TITLE_TOP, currentMenuBackground->width(), currentMenuBackground->height() - MENU_TITLE_TOP, TITLE_BGCOLOR); - currentMenuBackground->drawMask(0, 0, background, HEADER_CURRENT_BGCOLOR); + + currentMenuBackground->drawSolidFilledRect( + 0, 0, currentMenuBackground->width(), MENU_HEADER_HEIGHT, + MENU_BGCOLOR); + + currentMenuBackground->drawSolidFilledRect( + 0, MENU_HEADER_HEIGHT, currentMenuBackground->width(), + MENU_TITLE_TOP - MENU_HEADER_HEIGHT, DEFAULT_BGCOLOR); + + currentMenuBackground->drawSolidFilledRect( + 0, MENU_TITLE_TOP, currentMenuBackground->width(), + currentMenuBackground->height() - MENU_TITLE_TOP, TITLE_BGCOLOR); + + currentMenuBackground->drawMask(0, 0, background, + HEADER_CURRENT_BGCOLOR); + currentMenuBackground->drawMask(0, 0, shadow, TRIM_SHADOW_COLOR); + currentMenuBackground->drawMask(10, 39, dot, MENU_COLOR); } delete topleftBitmap; - topleftBitmap = BitmapBuffer::loadMaskOnBackground(getFilePath("topleft.png"), TITLE_BGCOLOR, HEADER_COLOR); + topleftBitmap = BitmapBuffer::load8bitMaskOnBackground( + mask_topleft, TITLE_BGCOLOR, HEADER_COLOR); delete background; delete shadow; @@ -187,50 +201,45 @@ class Theme480: public OpenTxTheme { // Calibration screen delete calibStick; - calibStick = BitmapBuffer::loadBitmap(getFilePath("stick_pointer.png")); + calibStick = + BitmapBuffer::loadRamBitmap(stick_pointer, sizeof(stick_pointer)); delete calibStickBackground; - calibStickBackground = BitmapBuffer::loadBitmap(getFilePath("stick_background.png")); + calibStickBackground = BitmapBuffer::loadRamBitmap( + stick_background, sizeof(stick_background)); delete calibTrackpBackground; - calibTrackpBackground = BitmapBuffer::loadBitmap(getFilePath("trackp_background.png")); - - delete calibRadioPict; -#if defined(PCBX10) - if(STICKS_PWM_ENABLED()) { - calibRadioPict = BitmapBuffer::loadBitmap(getFilePath("X10S.bmp")); - } - else { - calibRadioPict = BitmapBuffer::loadBitmap(getFilePath("X10.bmp")); - } -#else - calibRadioPict = BitmapBuffer::loadBitmap(getFilePath("horus.bmp")); -#endif + calibTrackpBackground = BitmapBuffer::loadRamBitmap( + trackp_background, sizeof(trackp_background)); // Model Selection screen - delete modelselIconBitmap; - modelselIconBitmap = BitmapBuffer::loadMaskOnBackground("modelsel/mask_iconback.png", TITLE_BGCOLOR, DEFAULT_BGCOLOR); - if (modelselIconBitmap) { - BitmapBuffer * bitmap = BitmapBuffer::loadBitmap(getFilePath("modelsel/icon_default.png")); - modelselIconBitmap->drawBitmap(20, 8, bitmap); - delete bitmap; - } + + // Unused: + // + // delete modelselIconBitmap; + // modelselIconBitmap = BitmapBuffer::loadMaskOnBackground("modelsel/mask_iconback.png", TITLE_BGCOLOR, DEFAULT_BGCOLOR); + // if (modelselIconBitmap) { + // BitmapBuffer * bitmap = BitmapBuffer::loadBitmap(getFilePath("modelsel/icon_default.png")); + // modelselIconBitmap->drawBitmap(20, 8, bitmap); + // delete bitmap; + // } delete modelselSdFreeBitmap; - modelselSdFreeBitmap = BitmapBuffer::loadMask(getFilePath("modelsel/mask_sdfree.png")); + modelselSdFreeBitmap = BitmapBuffer::load8bitMask(mask_sdfree); delete modelselModelQtyBitmap; - modelselModelQtyBitmap = BitmapBuffer::loadMask(getFilePath("modelsel/mask_modelqty.png")); + modelselModelQtyBitmap = BitmapBuffer::load8bitMask(mask_modelqty); delete modelselModelNameBitmap; - modelselModelNameBitmap = BitmapBuffer::loadMask(getFilePath("modelsel/mask_modelname.png")); + modelselModelNameBitmap = BitmapBuffer::load8bitMask(mask_modelname); delete modelselModelMoveBackground; - modelselModelMoveBackground = BitmapBuffer::loadMask(getFilePath("modelsel/mask_moveback.png")); + modelselModelMoveBackground = BitmapBuffer::load8bitMask(mask_moveback); delete modelselModelMoveIcon; - modelselModelMoveIcon = BitmapBuffer::loadMask(getFilePath("modelsel/mask_moveico.png")); + modelselModelMoveIcon = BitmapBuffer::load8bitMask(mask_moveico); + //TODO: should be loaded from LUA, not here!!! delete modelselWizardBackground; modelselWizardBackground = BitmapBuffer::loadBitmap(getFilePath("wizard/background.png")); @@ -325,8 +334,7 @@ class Theme480: public OpenTxTheme dc->drawBitmap(0 - dc->getOffsetX(), 0 - dc->getOffsetY(), backgroundBitmap); } else { - lcdSetColor(g_eeGeneral.themeData.options[0].value.unsignedValue); - dc->drawSolidFilledRect(0, 0, LCD_W, LCD_H, CUSTOM_COLOR); + dc->drawSolidFilledRect(0, 0, LCD_W, LCD_H, DEFAULT_BGCOLOR); } } diff --git a/radio/src/gui/colorlcd/themes/flysky.cpp b/radio/src/gui/colorlcd/themes/flysky.cpp index 4a0648e5e..a395287d3 100644 --- a/radio/src/gui/colorlcd/themes/flysky.cpp +++ b/radio/src/gui/colorlcd/themes/flysky.cpp @@ -215,17 +215,14 @@ class FlyskyTheme: public OpenTxTheme delete calibTrackpBackground; calibTrackpBackground = BitmapBuffer::loadBitmap(getFilePath("trackp_background.png")); - delete calibRadioPict; - calibRadioPict = BitmapBuffer::loadBitmap(getFilePath("NV14.bmp")); - // Model Selection screen - delete modelselIconBitmap; - modelselIconBitmap = BitmapBuffer::loadMaskOnBackground("modelsel/mask_iconback.png", TITLE_BGCOLOR, DEFAULT_BGCOLOR); - if (modelselIconBitmap) { - BitmapBuffer * bitmap = BitmapBuffer::loadBitmap(getFilePath("modelsel/icon_default.png")); - modelselIconBitmap->drawBitmap(20, 8, bitmap); - delete bitmap; - } + // delete modelselIconBitmap; + // modelselIconBitmap = BitmapBuffer::loadMaskOnBackground("modelsel/mask_iconback.png", TITLE_BGCOLOR, DEFAULT_BGCOLOR); + // if (modelselIconBitmap) { + // BitmapBuffer * bitmap = BitmapBuffer::loadBitmap(getFilePath("modelsel/icon_default.png")); + // modelselIconBitmap->drawBitmap(20, 8, bitmap); + // delete bitmap; + // } delete modelselSdFreeBitmap; modelselSdFreeBitmap = BitmapBuffer::loadMask(getFilePath("modelsel/mask_sdfree.png"));