Hi,
I have a question about how to create a button with Bitmap and transparent background.
GUI_EnableAlpha(1);
GUI_Clear();
//Voreinstellungen
BUTTON_SetDefaultSkinClassic();
BUTTON_SetDefaultBkColor(GUI_TRANSPARENT,BUTTON_CI_DISABLED);
BUTTON_SetDefaultBkColor(GUI_TRANSPARENT,BUTTON_CI_PRESSED);
BUTTON_SetDefaultBkColor(GUI_TRANSPARENT,BUTTON_CI_UNPRESSED);
WIDGET_SetDefaultEffect(&WIDGET_Effect_None);
//Callback
WM_HWIN mainWin = WM_GetDesktopWindow();
WM_SetCallback(mainWin, cbMain);
//Hintergund zeichnen
GUI_DrawStreamedBitmapAuto(&bitmapBackground, 0, 0);
//Buttons anlegen
buttonMemoryOne = BUTTON_CreateEx(BUTTON_MEMORY_ONE_POSITION_X, BUTTON_MEMORY_ONE_POSITION_Y, BUTTON_MEMORY_ONE_X_SIZE, BUTTON_MEMORY_ONE_Y_SIZE, mainWin, WM_CF_SHOW | WM_CF_HASTRANS , 0, BUTTON_MEMORY_ONE_ID);
BUTTON_SetTextColor(buttonMemoryOne,BUTTON_BI_UNPRESSED,GUI_RED);
BUTTON_SetText(buttonMemoryOne,"40000");
BUTTON_SetBitmap(buttonMemoryOne,BUTTON_BI_UNPRESSED,&bmButtonblankoinaktiv);
The button is displayed correctly . However, when I click on the button he is locks like he is overlaid with a new button .
Because of this the Button do not look like expected. How can I prevent that? And where does this effect come frome?
Many thanks for your help
I have a question about how to create a button with Bitmap and transparent background.
GUI_EnableAlpha(1);
GUI_Clear();
//Voreinstellungen
BUTTON_SetDefaultSkinClassic();
BUTTON_SetDefaultBkColor(GUI_TRANSPARENT,BUTTON_CI_DISABLED);
BUTTON_SetDefaultBkColor(GUI_TRANSPARENT,BUTTON_CI_PRESSED);
BUTTON_SetDefaultBkColor(GUI_TRANSPARENT,BUTTON_CI_UNPRESSED);
WIDGET_SetDefaultEffect(&WIDGET_Effect_None);
//Callback
WM_HWIN mainWin = WM_GetDesktopWindow();
WM_SetCallback(mainWin, cbMain);
//Hintergund zeichnen
GUI_DrawStreamedBitmapAuto(&bitmapBackground, 0, 0);
//Buttons anlegen
buttonMemoryOne = BUTTON_CreateEx(BUTTON_MEMORY_ONE_POSITION_X, BUTTON_MEMORY_ONE_POSITION_Y, BUTTON_MEMORY_ONE_X_SIZE, BUTTON_MEMORY_ONE_Y_SIZE, mainWin, WM_CF_SHOW | WM_CF_HASTRANS , 0, BUTTON_MEMORY_ONE_ID);
BUTTON_SetTextColor(buttonMemoryOne,BUTTON_BI_UNPRESSED,GUI_RED);
BUTTON_SetText(buttonMemoryOne,"40000");
BUTTON_SetBitmap(buttonMemoryOne,BUTTON_BI_UNPRESSED,&bmButtonblankoinaktiv);
The button is displayed correctly . However, when I click on the button he is locks like he is overlaid with a new button .
Because of this the Button do not look like expected. How can I prevent that? And where does this effect come frome?
Many thanks for your help