Xojo Conferences
XDCMay2019MiamiUSA

Progress bar won't update (Real Studio games Mailinglist archive)

Back to the thread list
Previous thread: Declaring to XOpenDisplay, XCloseDisplay, and DefaultScreen (Linux)
Next thread: Re: Fit of nostalgia (3-d maze games) - the leprechaun


Progress bar won't update   -   RivaBoy
  Re: Progress bar won't update   -   Martin Fitzgibbons
  Re: Progress bar won't update   -   RivaBoy

Progress bar won't update
Date: 08.03.05 09:27 (Tue, 8 Mar 2005 19:27:31 +1100)
From: RivaBoy
Martin,

> So if I was loading large Music files at the beginning of a program
> after a window with a progress bar was show the how do I get it to
> refresh while the file is loading at the moment it halts. I tried a
> timer with your suggestion below but that musn't be the right approach.

I had the same problem with my game.

I have a window called LoadingWindow. There is a progress bar called
ProgressBar1 on this window. There is also a timer set to single with
10ms. The code on this timer is:

dim m as folderitem
dim g as folderitem

//Set this in the ProgressBar's properties.
ProgressBar1.maximum ProgressBar1.value
//Looks for file
m=GetFolderItem("CloseEncounters.mp3")
if m.exists then //If it doesnt exist, it displays a message.
MenuMusic=m.OpenAsSound() //Stores the music in a global
else
MsgBox("'CloseEncounters.mp3' was not found. Menu music has been
disabled.")
MenuMusicDisabled=true
end if //m.exists

//Update progress bar
ProgressBar1.value=ProgressBar1.value+1
ProgressBar1.refresh

//
// See comments above
//
g=GetFolderItem("NowWeDance.mp3")
if g.exists then
GameMusic=g.OpenAsSound()
else
MsgBox("'NowWeDance.mp3' was not found. game music has been
disabled.")
GameMusicDisabled=true
end if
ProgressBar1.value=ProgressBar1.value+1
ProgressBar1.refresh

//Close LoadingWindow and show the game's menu.
self.close
MenuWindow.show

This seemed to work for me, though it was slow, and there wasnt any
Aqua animation, it showed the bar at halfway, so try it.

RivaBoy

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Re: Progress bar won't update
Date: 08.03.05 10:03 (Tue, 8 Mar 2005 20:03:44 +1100)
From: Martin Fitzgibbons
Hi Sam,

That's the whole point of the question, the fact that there isn't any
animation going on is annoying me.

Martin

> This seemed to work for me, though it was slow, and there wasnt any
> Aqua animation, it showed the bar at halfway, so try it.
>
> RivaBoy

=3D?D3D?D3D?D3D?D3D?D3D?D3DMartin Fitzgibbons
Rush Software
http://www.rushsoftware.com.au
http://www.crosswordwizard.com.au

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Re: Progress bar won't update
Date: 09.03.05 11:12 (Wed, 9 Mar 2005 21:12:31 +1100)
From: RivaBoy
Sorry Martin, I must have misunderstood your question I thought you
meant it wasn't showing anything at all. I would think there wouldn't
be a fix, because the whole application hangs until it's finished.

I dunno,
Sam

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>