📄 basic_face.c
字号:
/*
*********************************************************************************************************
* uC/GUI
* Universal graphic software for embedded applications
*
* (c) Copyright 2002, Micrium Inc., Weston, FL
* (c) Copyright 2002, SEGGER Microcontroller Systeme GmbH
*
* 礐/GUI is protected by international copyright laws. Knowledge of the
* source code may not be used to write a similar product. This file may
* only be used in accordance with a license and should not be redistributed
* in any way. We appreciate your understanding and fairness.
*
----------------------------------------------------------------------
File : BASIC_HelloWorld.c
Purpose : Simple demo drawing "Hello world"
----------------------------------------------------------------------
*/
#include "button.h"
#include "GUI.H"
extern const GUI_BITMAP bmzjycp01;
extern GUI_FLASH const GUI_FONT GUI_FontHZ_LiSu_64;
extern GUI_FLASH const GUI_FONT GUI_FontHZ_SimSun_16;
extern GUI_FLASH const GUI_FONT GUI_FontHZ_NewSimSun_19;
/*******************************************************************
*
* MainTask
*
********************************************************************
*/
void MainTask(void) {
const GUI_BITMAP *pBitmap;
BUTTON_Handle hButton;
/*
ToDo: Make sure hardware is initilized first!!
*/
GUI_Init();
GUI_SetBkColor(GUI_BLUE);
GUI_Clear();
GUI_SetFont(&GUI_FontHZ_LiSu_64);
GUI_DispStringAt("醉江月欢迎您",120,10);
//GUI_DispString("!");
while(1) {
hButton = BUTTON_Create(30, 420, 160, 40, GUI_ID_OK, WM_CF_SHOW);
BUTTON_SetFont(hButton,&GUI_FontHZ_SimSun_16);
BUTTON_SetBkColor(hButton,0,GUI_GREEN);
BUTTON_SetBkColor(hButton,1,GUI_WHITE);
BUTTON_SetTextColor(hButton,0,GUI_RED);
BUTTON_SetTextColor(hButton,1,GUI_GREEN);
BUTTON_SetText(hButton, "开始点菜");
GUI_Delay(1000);
//WM_Exec();
GUI_SetColor(GUI_WHITE);
//GUI_GotoXY(0,95);
//GUI_DispChars('*',600);
GUI_DrawVLine(220,100,480);
GUI_DrawVLine(230,100,480);
GUI_DrawHLine(100,0,640);
GUI_DrawHLine(392,0,640);
GUI_DrawHLine(479,0,640);
GUI_DrawHLine(1,0,640);
GUI_DrawVLine(1,0,480);
GUI_DrawVLine(639,0,480);
GUI_DrawHLine(110,0,230);
//GUI_DrawHLine(380,0,220);
GUI_SetFont(&GUI_FontHZ_NewSimSun_19);
GUI_DispStringAt("地址",268,419);
GUI_DispStringAt("武汉市武昌区珞狮南路205号",315,419);
GUI_SetFont(&GUI_Font8_ASCII);
GUI_DispCharAt(':',310,428);
GUI_SetFont(&GUI_Font8_ASCII);
GUI_DispDecAt(2008,348,448,4);
GUI_DispStringAt("CopyRight DaiYanhao version 1.0",380,448);
pBitmap=&bmzjycp01;
GUI_DrawBitmap(pBitmap,231,101);
}
//while(1);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -