[FL-2668] GUI message screens update #1428

Co-authored-by: SG <who.just.the.doctor@gmail.com>
Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
Nikolay Minaylov
2022-07-25 15:11:34 +03:00
committed by GitHub
parent 3ee592cae7
commit f5d6a8084b
15 changed files with 66 additions and 87 deletions

View File

@@ -1,32 +1,20 @@
#include "../gpio_app_i.h"
#include "../gpio_custom_event.h"
static void gpio_scene_usb_uart_close_rpc_event_callback(
GuiButtonType result,
InputType type,
void* context) {
furi_assert(context);
GpioApp* app = context;
if((result == GuiButtonTypeLeft) && (type == InputTypeShort)) {
view_dispatcher_send_custom_event(app->view_dispatcher, GpioCustomEventErrorBack);
}
}
void gpio_scene_usb_uart_close_rpc_on_enter(void* context) {
GpioApp* app = context;
widget_add_icon_element(app->widget, 78, 0, &I_ActiveConnection_50x64);
widget_add_string_multiline_element(
app->widget, 3, 2, AlignLeft, AlignTop, FontPrimary, "Connection\nis active!");
widget_add_string_multiline_element(
app->widget,
63,
10,
AlignCenter,
3,
30,
AlignLeft,
AlignTop,
FontSecondary,
"Disconnect from\ncompanion app\nto use this function");
widget_add_button_element(
app->widget, GuiButtonTypeLeft, "Back", gpio_scene_usb_uart_close_rpc_event_callback, app);
"Disconnect from\nPC or phone to\nuse this function.");
view_dispatcher_switch_to_view(app->view_dispatcher, GpioAppViewUsbUartCloseRpc);
}