

Triggered by Event() = #PB_Event_Timer, EventTimer() = #t_splashscreen Triggered by Event() = #PB_Event_Gadget, EventGadget() = #g_Canvas, EventType() = #PB_EventType_LeftClick these enumerations are just to help make things more readable later

The other possible condition check is if the Event() value is #PB_Event_Gadget and EventGadget() = 0 and if EvenaType() = #PB_EventType_LeftClick. If it equals #PB_EventTimer and EventTimer() = 4000 you are done.

You should only set one attribute at a time and that isn't even a canvas gadget attribute but is instead an event type used to process window events.įifth, one approach you can use to manage the needed events to close the splash screen is by first checking the Event() value. Third, your MouseClick() procedure doesn't need to do anything except set a global variable to atonal the end of the splash screen display and/or close it.įourth, the attributes you set in the Canvas gadget shouldn't include #PB_EventType_LeftClick.
#Purebasic left code
Second, if you are using a canvas gadget, why open a screen? Just leave it the code for the screen. An exception to this is to open a window for the user of things such as a window timer and use the screen for display and such but even this can be done with simply a window and a windowed screen. Typically you would use only one of these or use a window and a windowed screen. One is that you are using a screen and a window at the same time. Use EnableExplicit at the top of your code and deflate your variables. Here are a few suggestions that may help.
