1
mirror of https://github.com/DarkFlippers/unleashed-firmware.git synced 2025-12-12 04:34:43 +04:00

Gui: Add up and down button drawing functions to GUI elements (#3804)

* feat: Add up and down button drawing functions to GUI elements
  Two button drawing functions, elements_button_up and elements_button_down, have been added to the GUI elements. These functions allow a button to be drawn at the top left and top right corner of the canvas respectively, with an accompanying string and icon. The underlying layout and design of these buttons is defined within these functions.
* feat: Add null checks for Canvas parameter in button functions
  Added furi_check to ensure the Canvas parameter is not null in elements_button_up and elements_button_down functions. This prevents potential crashes due to dereferencing a null pointer.

Co-authored-by: hedger <hedger@users.noreply.github.com>
Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
This commit is contained in:
DerSkythe
2024-09-05 17:50:33 +04:00
committed by GitHub
parent f353e5708d
commit b040db07f4
4 changed files with 98 additions and 8 deletions

View File

@@ -1,5 +1,5 @@
entry,status,name,type,params
Version,+,72.1,,
Version,+,72.2,,
Header,+,applications/drivers/subghz/cc1101_ext/cc1101_ext_interconnect.h,,
Header,+,applications/services/bt/bt_service/bt.h,,
Header,+,applications/services/bt/bt_service/bt_keys_storage.h,,
@@ -965,8 +965,10 @@ Function,+,elements_bold_rounded_frame,void,"Canvas*, int32_t, int32_t, size_t,
Function,+,elements_bubble,void,"Canvas*, int32_t, int32_t, size_t, size_t"
Function,+,elements_bubble_str,void,"Canvas*, int32_t, int32_t, const char*, Align, Align"
Function,+,elements_button_center,void,"Canvas*, const char*"
Function,+,elements_button_down,void,"Canvas*, const char*"
Function,+,elements_button_left,void,"Canvas*, const char*"
Function,+,elements_button_right,void,"Canvas*, const char*"
Function,+,elements_button_up,void,"Canvas*, const char*"
Function,+,elements_frame,void,"Canvas*, int32_t, int32_t, size_t, size_t"
Function,+,elements_multiline_text,void,"Canvas*, int32_t, int32_t, const char*"
Function,+,elements_multiline_text_aligned,void,"Canvas*, int32_t, int32_t, Align, Align, const char*"
1 entry status name type params
2 Version + 72.1 72.2
3 Header + applications/drivers/subghz/cc1101_ext/cc1101_ext_interconnect.h
4 Header + applications/services/bt/bt_service/bt.h
5 Header + applications/services/bt/bt_service/bt_keys_storage.h
965 Function + elements_bubble void Canvas*, int32_t, int32_t, size_t, size_t
966 Function + elements_bubble_str void Canvas*, int32_t, int32_t, const char*, Align, Align
967 Function + elements_button_center void Canvas*, const char*
968 Function + elements_button_down void Canvas*, const char*
969 Function + elements_button_left void Canvas*, const char*
970 Function + elements_button_right void Canvas*, const char*
971 Function + elements_button_up void Canvas*, const char*
972 Function + elements_frame void Canvas*, int32_t, int32_t, size_t, size_t
973 Function + elements_multiline_text void Canvas*, int32_t, int32_t, const char*
974 Function + elements_multiline_text_aligned void Canvas*, int32_t, int32_t, Align, Align, const char*