Dear, Segger
my name is kazu
How to use the library of emwin, I have a question.
On the background of animated motion, I would like to mount the button created by the bitmap.
Although the development of the background to animate behavior was successful,
The bit-mapped button, you will not be able to put on top of the background.
Sample code Could you send if any?
Place the my source code to reference.
Best regards
~my souce code~
static void _Main(void) {
WM_SelectWindow(WM_HBKWIN);
GUI_Clear();
xSize = LCD_GetXSize();
ySize = LCD_GetYSize();
_DrawBitmaps();
GUI_TIMER_Create(_OnTimer, 5, 0, 0);
while(1){
GUI_Delay(100);
}
static void _OnTimer(GUI_TIMER_MESSAGE * pTM) {
// GUI_SelectLayer(1);
//Bubble_YPOS--;
Bubble_YPOS = Bubble_YPOS -10;
GUI_MEMDEV_Delete(hMem1);
//Background animation
hMem1 = GUI_MEMDEV_Create(0, 0, 480, 540);
GUI_MEMDEV_Select(hMem1);
GUI_DrawBitmap(&bmback_bublle, 0,Bubble_YPOS );
GUI_MEMDEV_CopyToLCD(hMem1);
//three bitmap buttons
hMP3PLAYER_Button = BUTTON_CreateAsChild(16, 72, 142, 133, 0, 22,WM_CF_SHOW);
BUTTON_SetBitmap(hMP3PLAYER_Button,0,&bmwatashiryu_sw);
homakase_Button =BUTTON_CreateAsChild(169, 72, 142, 133, 0, 23,WM_CF_SHOW);
BUTTON_SetBitmap(homakase_Button,0,&bmomakase_sw);
hSPIN_Button = BUTTON_CreateAsChild(328, 72, 142, 133, 0, 24,WM_CF_SHOW);
BUTTON_SetBitmap(hSPIN_Button,0,&bmother_sw);
/*execute draw*/
WM_InvalidateWindow(_hDialogControl);
WM_DisableMemdev(WM_HBKWIN);
GUI_Exec();
WM_EnableMemdev(WM_HBKWIN);
GUI_TIMER_Restart(pTM->hTimer);
}
my name is kazu
How to use the library of emwin, I have a question.
On the background of animated motion, I would like to mount the button created by the bitmap.
Although the development of the background to animate behavior was successful,
The bit-mapped button, you will not be able to put on top of the background.
Sample code Could you send if any?
Place the my source code to reference.
Best regards
~my souce code~
static void _Main(void) {
WM_SelectWindow(WM_HBKWIN);
GUI_Clear();
xSize = LCD_GetXSize();
ySize = LCD_GetYSize();
_DrawBitmaps();
GUI_TIMER_Create(_OnTimer, 5, 0, 0);
while(1){
GUI_Delay(100);
}
static void _OnTimer(GUI_TIMER_MESSAGE * pTM) {
// GUI_SelectLayer(1);
//Bubble_YPOS--;
Bubble_YPOS = Bubble_YPOS -10;
GUI_MEMDEV_Delete(hMem1);
//Background animation
hMem1 = GUI_MEMDEV_Create(0, 0, 480, 540);
GUI_MEMDEV_Select(hMem1);
GUI_DrawBitmap(&bmback_bublle, 0,Bubble_YPOS );
GUI_MEMDEV_CopyToLCD(hMem1);
//three bitmap buttons
hMP3PLAYER_Button = BUTTON_CreateAsChild(16, 72, 142, 133, 0, 22,WM_CF_SHOW);
BUTTON_SetBitmap(hMP3PLAYER_Button,0,&bmwatashiryu_sw);
homakase_Button =BUTTON_CreateAsChild(169, 72, 142, 133, 0, 23,WM_CF_SHOW);
BUTTON_SetBitmap(homakase_Button,0,&bmomakase_sw);
hSPIN_Button = BUTTON_CreateAsChild(328, 72, 142, 133, 0, 24,WM_CF_SHOW);
BUTTON_SetBitmap(hSPIN_Button,0,&bmother_sw);
/*execute draw*/
WM_InvalidateWindow(_hDialogControl);
WM_DisableMemdev(WM_HBKWIN);
GUI_Exec();
WM_EnableMemdev(WM_HBKWIN);
GUI_TIMER_Restart(pTM->hTimer);
}