mirror of
https://gitee.com/peng_zhihui/HoloCubic
synced 2025-11-04 21:19:40 +08:00
[Fw] Modified UI color.
This commit is contained in:
parent
1862b0749b
commit
08890286cd
@ -4,6 +4,7 @@
|
|||||||
#include "ambient.h"
|
#include "ambient.h"
|
||||||
#include "lv_port_indev.h"
|
#include "lv_port_indev.h"
|
||||||
#include "lv_demo_encoder.h"
|
#include "lv_demo_encoder.h"
|
||||||
|
#include "lv_cubic_gui.h"
|
||||||
|
|
||||||
Display screen;
|
Display screen;
|
||||||
IMU mpu;
|
IMU mpu;
|
||||||
@ -18,7 +19,6 @@ void setup()
|
|||||||
screen.setBackLight(0.2);
|
screen.setBackLight(0.2);
|
||||||
lv_port_indev_init();
|
lv_port_indev_init();
|
||||||
|
|
||||||
|
|
||||||
mpu.init();
|
mpu.init();
|
||||||
|
|
||||||
rgb.init();
|
rgb.init();
|
||||||
@ -30,7 +30,7 @@ void setup()
|
|||||||
lv_demo_encoder();
|
lv_demo_encoder();
|
||||||
}
|
}
|
||||||
|
|
||||||
int i = 0;
|
|
||||||
void loop()
|
void loop()
|
||||||
{
|
{
|
||||||
// run this as often as possible ¡ý
|
// run this as often as possible ¡ý
|
||||||
|
|||||||
9
2.Firmware/HoloCubic_fw/lv_cubic_gui.c
Normal file
9
2.Firmware/HoloCubic_fw/lv_cubic_gui.c
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
/*********************
|
||||||
|
* INCLUDES
|
||||||
|
*********************/
|
||||||
|
#include "lv_cubic_gui.h"
|
||||||
|
|
||||||
|
void lv_holo_cubic_gui(void)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
33
2.Firmware/HoloCubic_fw/lv_cubic_gui.h
Normal file
33
2.Firmware/HoloCubic_fw/lv_cubic_gui.h
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
#ifndef LV_CUBIC_GUI_H
|
||||||
|
#define LV_CUBIC_GUI_H
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*********************
|
||||||
|
* INCLUDES
|
||||||
|
*********************/
|
||||||
|
|
||||||
|
/*********************
|
||||||
|
* DEFINES
|
||||||
|
*********************/
|
||||||
|
|
||||||
|
/**********************
|
||||||
|
* TYPEDEFS
|
||||||
|
**********************/
|
||||||
|
|
||||||
|
/**********************
|
||||||
|
* GLOBAL PROTOTYPES
|
||||||
|
**********************/
|
||||||
|
void lv_holo_cubic_gui(void);
|
||||||
|
|
||||||
|
/**********************
|
||||||
|
* MACROS
|
||||||
|
**********************/
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
} /* extern "C" */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
||||||
@ -84,6 +84,9 @@ void lv_demo_encoder(void)
|
|||||||
tv = lv_tabview_create(lv_scr_act(), NULL);
|
tv = lv_tabview_create(lv_scr_act(), NULL);
|
||||||
lv_obj_set_event_cb(tv, tv_event_cb);
|
lv_obj_set_event_cb(tv, tv_event_cb);
|
||||||
|
|
||||||
|
lv_obj_set_style_local_bg_color(tv, LV_OBJ_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_BLACK);
|
||||||
|
|
||||||
|
|
||||||
t1 = lv_tabview_add_tab(tv, "Selectors");
|
t1 = lv_tabview_add_tab(tv, "Selectors");
|
||||||
t2 = lv_tabview_add_tab(tv, "Text input");
|
t2 = lv_tabview_add_tab(tv, "Text input");
|
||||||
|
|
||||||
|
|||||||
@ -105,6 +105,8 @@ void lv_demo_keypad_encoder(void)
|
|||||||
tv = lv_tabview_create(lv_scr_act(), NULL);
|
tv = lv_tabview_create(lv_scr_act(), NULL);
|
||||||
lv_obj_set_event_cb(tv, tv_event_cb);
|
lv_obj_set_event_cb(tv, tv_event_cb);
|
||||||
|
|
||||||
|
lv_obj_set_style_local_bg_color(tv, LV_OBJ_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_BLACK);
|
||||||
|
|
||||||
t1 = lv_tabview_add_tab(tv, "Selectors");
|
t1 = lv_tabview_add_tab(tv, "Selectors");
|
||||||
t2 = lv_tabview_add_tab(tv, "Text input");
|
t2 = lv_tabview_add_tab(tv, "Text input");
|
||||||
|
|
||||||
@ -189,7 +191,7 @@ static void msgbox_create(void)
|
|||||||
lv_obj_align(mbox, NULL, LV_ALIGN_CENTER, 0, 0);
|
lv_obj_align(mbox, NULL, LV_ALIGN_CENTER, 0, 0);
|
||||||
|
|
||||||
lv_obj_set_style_local_bg_opa(lv_layer_top(), LV_OBJ_PART_MAIN, LV_STATE_DEFAULT, LV_OPA_70);
|
lv_obj_set_style_local_bg_opa(lv_layer_top(), LV_OBJ_PART_MAIN, LV_STATE_DEFAULT, LV_OPA_70);
|
||||||
lv_obj_set_style_local_bg_color(lv_layer_top(), LV_OBJ_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_GRAY);
|
lv_obj_set_style_local_bg_color(lv_layer_top(), LV_OBJ_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_BLACK);
|
||||||
lv_obj_set_click(lv_layer_top(), true);
|
lv_obj_set_click(lv_layer_top(), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user