mirror of
https://gitee.com/Polarix/simplegui.git
synced 2025-06-17 05:27:52 +00:00
2020-02-04:
修正一些资源文件的文字错误。 整理代码格式。 修改BMP资源相关宏定义的位置。
This commit is contained in:
parent
32c05b3eaa
commit
e7d1dcbf16
@ -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")
|
||||
|
@ -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_
|
||||
|
@ -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));
|
||||
|
@ -39,9 +39,9 @@ static HMI_SCREEN_ACTION s_stDemoRealtimeGraphActions = { HMI_DemoRealGraph_Init
|
||||
//= Global variable declaration. =//
|
||||
//=======================================================================//
|
||||
|
||||
HMI_SCREEN_OBJECT g_stHMIDemo_RealtimeGraph = { HMI_SCREEN_ID_DEMO_REAL_TIME_GRAPH,
|
||||
HMI_SCREEN_OBJECT g_stHMIDemo_RealtimeGraph = {HMI_SCREEN_ID_DEMO_REAL_TIME_GRAPH,
|
||||
&s_stDemoRealtimeGraphActions
|
||||
};
|
||||
};
|
||||
|
||||
//=======================================================================//
|
||||
//= Function define. =//
|
||||
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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. =//
|
||||
//=======================================================================//
|
||||
|
@ -10,18 +10,21 @@
|
||||
//=======================================================================//
|
||||
//= User Macro definition. =//
|
||||
//=======================================================================//
|
||||
#define RECT_X_START(ST) ((ST).iPosX)
|
||||
#define RECT_X_END(RECT) (((RECT).iPosX + (RECT).iWidth - 1))
|
||||
#define RECT_Y_START(ST) ((ST).iPosY)
|
||||
#define RECT_Y_END(RECT) (((RECT).iPosY + (RECT).iHeight - 1))
|
||||
#define RECT_WIDTH(ST) ((ST).iWidth)
|
||||
#define RECT_HEIGHT(ST) ((ST).iHeight)
|
||||
#define RECT_VALID_WIDTH(DATA, POS) ((RECT_X_START(POS)>0)?RECT_WIDTH(DATA):(RECT_WIDTH(DATA)+RECT_X_START(POS)))
|
||||
#define RECT_VALID_HEIGHT(DATA, POS) ((RECT_Y_START(POS)>0)?RECT_HEIGHT(DATA):(RECT_HEIGHT(DATA)+RECT_Y_START(POS)))
|
||||
#define RECT_X_START(ST) ((ST).iPosX)
|
||||
#define RECT_X_END(RECT) (((RECT).iPosX + (RECT).iWidth - 1))
|
||||
#define RECT_Y_START(ST) ((ST).iPosY)
|
||||
#define RECT_Y_END(RECT) (((RECT).iPosY + (RECT).iHeight - 1))
|
||||
#define RECT_WIDTH(ST) ((ST).iWidth)
|
||||
#define RECT_HEIGHT(ST) ((ST).iHeight)
|
||||
#define RECT_VALID_WIDTH(DATA, POS) ((RECT_X_START(POS)>0)?RECT_WIDTH(DATA):(RECT_WIDTH(DATA)+RECT_X_START(POS)))
|
||||
#define RECT_VALID_HEIGHT(DATA, POS) ((RECT_Y_START(POS)>0)?RECT_HEIGHT(DATA):(RECT_HEIGHT(DATA)+RECT_Y_START(POS)))
|
||||
|
||||
#define SGUI_DEVPF_IF_DEFINE(R, FN, PARAM) typedef R(*FN)PARAM
|
||||
#define SGUI_BMP_DATA_BUFFER_SIZE (512)
|
||||
#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. =//
|
||||
//=======================================================================//
|
||||
|
@ -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. =//
|
||||
//=======================================================================//
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user