×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Mar 2003
    Posts
    13

    How do I implement a message screen?

    Hi.

    I'm writing a game that needs to do a heavy initializing routine before every level. Now it would be nice to show some "please wait..." message to the user so that he knows that the program hasn't crashed.

    Surprisingly that was quite problematic thing to implement. As Display.setCurrent() doesn't necessarily have immediate effect this following code doesn't seem to work:

    display.setCurrent(messageCanvas);
    someTimeTakingRoutines();
    display.setCurrent(gameCanvas);

    The result is the same as if the first setCurrent() function wasn't called at all.

    Can anyone give me a simple example how I could show a message screen while the program is loading something?

    Thank you.

  2. #2
    Regular Contributor
    Join Date
    Mar 2003
    Location
    Moscow/Russia
    Posts
    258

    RE: How do I implement a message screen?

    Hello!

    U need one class (MyTimerTask) derived from TimerTask and
    one (MyThread) derived from Thread which will be make init.
    Before start timer set waiting window and in timer event check is thread finished or not yet. After finished show game canvas.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×