Compare commits

..

No commits in common. "cfbc56add835b42f51ab19475259b348e940f2f8" and "b4d5743e540e6b09e0590c4fbfaea8c86081c677" have entirely different histories.

View File

@ -82,9 +82,20 @@ RectangularButton(g_sPushReset, &g_sPushBtn, 0, 0,
ClrDarkRed, ClrRed, ClrWhite, ClrWhite,
g_psFontCmss22b, "RESET", 0, 0, 0, 0, OnButtonReset);
//*****************************************************************************
//*****************************************************************************
//
// A global we use to keep track of whether or not the "Hello" widget is
// currently visible.
//
//*****************************************************************************
bool g_bHelloVisible = false;
//*****************************************************************************
//
// The error routine that is called if the driver library encounters an error.
//
//*****************************************************************************
#ifdef DEBUG
void
__error__(char *pcFilename, uint32_t ui32Line)
@ -92,6 +103,27 @@ __error__(char *pcFilename, uint32_t ui32Line)
}
#endif
//*****************************************************************************
//
// This function is called by the graphics library widget manager in the
// context of WidgetMessageQueueProcess whenever the user releases the
// "Press Me!" button. We use this notification to display or hide the
// "Hello!" widget.
//
// This is actually a rather inefficient way to accomplish this but it's
// a good example of how to add and remove widgets dynamically. In
// normal circumstances, you would likely leave the g_sHello widget
// linked into the tree and merely add or remove the text by changing
// its style then repainting.
//
// If using this dynamic add/remove strategy, another useful optimization
// is to use a black canvas widget that covers the same area of the screen
// as the widgets that you will be adding and removing. If this is the used
// as the point in the tree where the subtree is added or removed, you can
// repaint just the desired area by repainting the black canvas rather than
// repainting the whole tree.
//
//*****************************************************************************
void OnButtonPress(tWidget *psWidget) // funkcja obslugujaca przycisk start
{
g_bHelloVisible = !g_bHelloVisible;