feat: 为选中项增加了奇怪的动效

This commit is contained in:
2024-01-06 17:19:36 +08:00
parent abca5d603c
commit 737fc2de6b
4 changed files with 79 additions and 105 deletions

View File

@@ -100,7 +100,7 @@ static void Print_Menu_p(void)
// SCREEN_showstr_style(5 * 8, 0, RED, WHITE, "#### MAIN MENU ####");
ips200_show_string(0, 0, Text);
for (uint8_t i = page_menu + 1; i < page_max; i++) {
ips200_show_string(10, i * 16, pagelist[i].Text);
ips200_show_string(10, i * 18, pagelist[i].Text);
// SCREEN_showstr(8, i, pagelist[i].Text);
}
}

View File

@@ -3,13 +3,12 @@
#include "cw_page.h"
#define LINE_HEAD 11
#define LINE_END 18
#define LINE_END 16
static char Text[] = "RealTime Image";
static int8_t Curser = LINE_HEAD; // 定义光标位置
static int8_t Curser_Last = LINE_HEAD; // 定义光标位置
static void Print_Menu_p(void);
/***************************************************************************************
*
* 以下为页面模板函数
@@ -24,7 +23,6 @@ static void Print_Menu_p(void);
static void Setup()
{
ips200_clear();
Print_Menu_p();
Print_Curser(Curser, Curser_Last);
}
@@ -91,13 +89,3 @@ void PageRegister_page_rtcam(unsigned char pageID)
* 以下为页面自定义功能函数
*
***************************************************************************************/
/**
* @brief 打印菜单项
*
*/
static void Print_Menu_p(void)
{
// SCREEN_showstr_style(5 * 8, 0, RED, WHITE, "#### MAIN MENU ####");
ips200_show_string(0, 0, Text);
}

View File

@@ -10,8 +10,17 @@
*/
void Print_Curser(uint8_t Curser_In, uint8_t Curser_Last_In)
{
ips200_show_string(0, Curser_Last_In * 16, " ");
ips200_show_string(0, Curser_In * 16, ">");
ips200_show_string(0, Curser_Last_In * 18, " ");
ips200_show_string(0, Curser_In * 18, ">");
for (uint8_t i = 0; i < 160; i++) {
ips200_draw_point(10 + i, Curser_Last_In * 18 + 19, IPS200_DEFAULT_BGCOLOR);
// system_delay_us(200);
}
for (uint8_t i = 0; i < 160; i++) {
ips200_draw_point(10 + i, Curser_In * 18 + 19, RGB565_WHITE);
system_delay_ms(2);
}
}
/**
@@ -20,9 +29,8 @@ void Print_Curser(uint8_t Curser_In, uint8_t Curser_Last_In)
*/
void Print_Menu(const ITEM *item, uint8_t item_sum)
{
ips200_show_string(0, 0, " --return--");
for (uint8_t i = 0; i < item_sum; i++) {
ips200_show_string(8, i * 16 + 16, item[i].text);
ips200_show_string(8, i * 18 + 16, item[i].text);
}
}