Always on top
Author |
Message |
J-MoNeY
|
Posted: Fri May 26, 2006 11:49 pm Post subject: Always on top |
|
|
Is there anyway I could make the Turing Run Window always stay on top? Also is there a way to make it so that the Run window won't be able to be closed until the program has finished executing? |
|
|
|
|
|
Sponsor Sponsor
|
|
|
TheOneTrueGod
|
Posted: Sat May 27, 2006 1:12 am Post subject: (No subject) |
|
|
I believe the only way to keep it on top all the time is to do a "setfocus" constantly, but why would you need to? Also, the closing thing is an option when you compile it. It sounds to me like your making a "virus" though... |
|
|
|
|
|
J-MoNeY
|
Posted: Sat May 27, 2006 10:32 am Post subject: (No subject) |
|
|
I'm trying to make an animation and I like to program while I watch the run window to see for any errors or glitches so the having the run window always on top comes in handy. How would I make a timer say for about 30 seconds ? |
|
|
|
|
|
TheOneTrueGod
|
Posted: Sat May 27, 2006 10:43 am Post subject: (No subject) |
|
|
Time.Elapsed would be the easiest method.
code: |
var i : int
loop
i := Time.Elapsed div 1000
end loop
|
This will return the number of seconds that have elapsed. Time.Elapsed returns the number of milliseconds since the program started. Use it with an exit when statement, and you'll have a loop that runs for aproximately however much time you want it to (I don't think theres any way to get it so it stops EXACTLY at 30 seconds, because you'll allways be off by a couple of milliseconds due to processing time.) |
|
|
|
|
|
upthescale
|
Posted: Sat May 27, 2006 2:58 pm Post subject: (No subject) |
|
|
liek this also:
code: |
setscreen ("offscreenonly;graphics:600;500;position:truemiddle;center;nobuttonbar")
var i : int
var font : int := Font.New ("arial:20")
loop
colorback (7)
cls
i := Time.Elapsed div 1000
Font.Draw ("Time: " + intstr (i), 250, maxy div 2, font, red)
View.Update
end loop
|
|
|
|
|
|
|
upthescale
|
Posted: Sat May 27, 2006 3:00 pm Post subject: (No subject) |
|
|
wont let me edit...make graphics isntead of w/e it is, to 200,500 so it will go on top! |
|
|
|
|
|
Cervantes
|
Posted: Sat May 27, 2006 4:14 pm Post subject: (No subject) |
|
|
upthescale wrote:
code: |
setscreen ("offscreenonly;graphics:600;500;position:truemiddle;center;nobuttonbar")
var i : int
var font : int := Font.New ("arial:20")
loop
colorback (7)
cls
i := Time.Elapsed div 1000
Font.Draw ("Time: " + intstr (i), 250, maxy div 2, font, red)
View.Update
end loop
|
What is the purpose of the 'i' variable? It does nothing except store the value of Time.Elapsed div 1000, and you only use that value once -- when drawing it. Thus, you don't need that variable. Move the Time.Elapsed div 1000 directly into the Font.Draw line.
code: |
var font : int := Font.New ("arial:20")
loop
colorback (7)
cls
Font.Draw ("Time: " + intstr (Time.Elapsed div 1000), 250, maxy div 2, font, red)
View.Update
end loop
|
|
|
|
|
|
|
Clayton
|
Posted: Sat May 27, 2006 6:44 pm Post subject: (No subject) |
|
|
upthescale wrote: wont let me edit...make graphics isntead of w/e it is, to 200,500 so it will go on top!
no,no,no, and no. the most simple way would be to use View.Set and the "position:x;y" command ex.
NOTE:*the above code is untested, but a similiar idea can be used to do this *[/code] |
|
|
|
|
|
Sponsor Sponsor
|
|
|
|
|