2020-02-04:

修正一些资源文件的文字错误。
整理代码格式。
修改BMP资源相关宏定义的位置。
This commit is contained in:
Polarix 2020-02-04 10:31:19 +08:00
parent 32c05b3eaa
commit e7d1dcbf16
8 changed files with 25 additions and 31 deletions

View File

@ -24,7 +24,7 @@
/* Screen 4: Variable box. */
#define SCR4_VAR_BOX_TITLE ("Variable box")
#define SCR4_HELP_NOTICE ("Press TAB to switch focus.\nUp&Down to change value\nSend \"SPACE\" to continue.")
#define SCR4_HELP_NOTICE ("Press TAB to switch focus.\nUp&Down to change value.\nSend \"SPACE\" to continue.")
/* Screen 5: Realtime graph. */
#define SCR5_RT_GRAPH_TITLE ("Realtime graph")

View File

@ -24,7 +24,7 @@
/* Screen 4: Variable box. */
#define SCR4_VAR_BOX_TITLE ("输入框")
#define SCR4_HELP_NOTICE ("Press TAB to switch focus.\nUp&Down to change value\nSend \"SPACE\" to continue.")
#define SCR4_HELP_NOTICE ("Press TAB to switch focus.\nUp&Down to change value.\nSend \"SPACE\" to continue.")
/* Screen 5: Realtime graph. */
#define SCR5_RT_GRAPH_TITLE ("Realtime graph")
@ -44,6 +44,6 @@
#define SCR6_SUB_MENU_ITEM4 ("Sub 4")
/* Screen 7: Notice box. */
#define SCR7_NOTICE_TEXT ("这是一条中文消息提示,没有图标。")
#define SCR7_NOTICE_TEXT ("欢迎使用SimpleGUI!")
#endif // _INCLUDE_DEMO_RESOURCE_UTF8_H_

View File

@ -64,8 +64,8 @@ HMI_ENGINE_RESULT HMI_DemoList_Initialize(SGUI_SCR_DEV* pstDeviceIF)
// Title and font size must set before initialize list object.
s_stDemoListObject.stLayout.iPosX = 0;
s_stDemoListObject.stLayout.iPosY = 0;
s_stDemoListObject.stLayout.iWidth = 128;
s_stDemoListObject.stLayout.iHeight = 64;
s_stDemoListObject.stLayout.iWidth = pstDeviceIF->stSize.iWidth;
s_stDemoListObject.stLayout.iHeight = pstDeviceIF->stSize.iHeight;
s_stDemoListObject.szTitle = SCR1_TITLE;
//Initialize list object.
SGUI_List_Initialize(&s_stDemoListObject, &GB2312_FZXS12, s_arrstListItems, sizeof(s_arrstListItems)/sizeof(SGUI_ITEMS_ITEM));

View File

@ -49,6 +49,8 @@ HMI_SCREEN_OBJECT g_stHMIDemo_RealtimeGraph = { HMI_SCREEN_ID_DEMO_REAL_TIME_
HMI_ENGINE_RESULT HMI_DemoRealGraph_Initialize(SGUI_SCR_DEV* pstDeviceIF)
{
//SGUI_RealtimeGraph_Initialize(&s_stRealtimeGraph);
s_stRealtimeGraph.Data->Rect.iWidth = pstDeviceIF->stSize.iWidth-2;
s_stRealtimeGraph.Data->Rect.iHeight = pstDeviceIF->stSize.iHeight-15;
return HMI_RET_NORMAL;
}

View File

@ -5,11 +5,6 @@
//=======================================================================//
#include "SGUI_Typedef.h"
//=======================================================================//
//= User Macro definition. =//
//=======================================================================//
#define SGUI_BMP_RESOURCE_DECLARE(NAME) extern const SGUI_BMP_RES NAME
//=======================================================================//
//= Public variable declaration. =//
//=======================================================================//

View File

@ -22,6 +22,9 @@
#define SGUI_DEVPF_IF_DEFINE(R, FN, PARAM) typedef R(*FN)PARAM
#define SGUI_BMP_DATA_BUFFER_SIZE (512)
#define SGUI_BMP_RESOURCE_DECLARE(NAME) extern const SGUI_BMP_RES NAME
#define SGUI_BMP_RESOURCE_DEFINE(NAME, W, H, ...) const SGUI_BYTE NAME##DATA[] = {__VA_ARGS__};\
const SGUI_BMP_RES NAME = {W, H, NAME##DATA}
//=======================================================================//
//= Data type definition. =//
//=======================================================================//

View File

@ -9,12 +9,6 @@
//=======================================================================//
#include "SGUI_IconResource.h"
//=======================================================================//
//= User Macro definition. =//
//=======================================================================//
#define SGUI_BMP_RESOURCE_DEFINE(NAME, W, H, ...) const SGUI_BYTE NAME##DATA[] = {__VA_ARGS__};\
const SGUI_BMP_RES NAME = {W, H, NAME##DATA}
//=======================================================================//
//= Static variable define. =//
//=======================================================================//

View File

@ -12,9 +12,9 @@
//=======================================================================//
#define _TRANS_TEXT(STR) _(STR)
#define LCD_COLOR_OBJ_PIX (0xFF5B805A)
#define LCD_COLOR_OBJ_BKG (0xFFF9ECE4)
#define LCD_COLOR_OBJ_GRID (0xFF383834)
#define LCD_COLOR_OBJ_PIX (0xFFF8FE99)
#define LCD_COLOR_OBJ_BKG (0xFF2C1916)
#define LCD_COLOR_OBJ_GRID (0xFF482F0C)
#define PARAM_DEFAULT_PIXEL_NUM_H (128)
#define PARAM_DEFAULT_PIXEL_NUM_V (64)