Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Full Screen
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
evan467




PostPosted: Sun Jan 10, 2010 2:35 pm   Post subject: Full Screen

is there any way turing can find the resolution of the screen and the program will become fullscreen? such as
setscreen("graphics :fullx;fully") or something like that
Sponsor
Sponsor
Sponsor
sponsor
syntax_error




PostPosted: Sun Jan 10, 2010 2:43 pm   Post subject: Re: Full Screen

code:


setscreen ("graphics:max;max,")
Euphoracle




PostPosted: Sun Jan 10, 2010 7:26 pm   Post subject: RE:Full Screen

Turing cannot make it true full screen, but you can make it fill as much as it can by doing that ^

and also using nobuttonbar.
ProgrammingFun




PostPosted: Mon Jan 11, 2010 7:53 pm   Post subject: Re: Full Screen

syntax_error wrote:

code:


setscreen ("graphics:max;max,")



This is not very efficient because your output will be disoriented when you change monitors.
This should only be used if you are creating a simple program which only outputs text.

However, as Euphoracle said, you can make it fill as much as possible by using the following:

Turing:


setscreen ("graphics:number of x pixels;number of y pixels, position:center;center")   % basic syntax

setscreen ("graphics:1010;690, position:center;center")   % example



Hope this helps. Cool
Ktomislav




PostPosted: Mon Jan 11, 2010 8:01 pm   Post subject: Re: Full Screen

You can fill it even more by doing this:
code:
View.Set ("graphics:max;max,nobuttonbar")
ProgrammingFun




PostPosted: Mon Jan 11, 2010 10:06 pm   Post subject: Re: Full Screen

Ktomislav wrote:

You can fill it even more by doing this:
code:
View.Set ("graphics:max;max,nobuttonbar")



True, but then how can you specify the location of a picture for example, so that it will appear on the same location on the screen of every monitor?

And what does nobuttonbar do B.T.W Embarassed
syntax_error




PostPosted: Mon Jan 11, 2010 10:36 pm   Post subject: RE:Full Screen

nobuttonbar, means you will not see the button bar on the top of the executed program.

Instead of using real values use the maxx and maxy and play around with it. In short, use variables instead of concrete number.
Ktomislav




PostPosted: Tue Jan 12, 2010 10:01 am   Post subject: Re: Full Screen

For example to place a picture in the center of the screen (size of monitor doesn't matter) you can you this:
Turing:
Pic.Draw (picture, (maxx div 2) - (Pic.Width (picture) div 2), (maxy div 2) - (Pic.Height (picture) div 2), picCopy)

You'll have to figure out the rest by yourself.
Sponsor
Sponsor
Sponsor
sponsor
mirhagk




PostPosted: Tue Jan 12, 2010 12:57 pm   Post subject: RE:Full Screen

the best way to do it would be create a new draw function that accepts a real number thats >0 and <1. Then it does the following to determine the location
Turing:

proc DrawRelativeBox(x1,y1,x2,y2:real)
var X1,X2,Y1,Y2:int
X1:=round(x1*maxx)
Y1:=round(y1*maxy)
X2:=round(x2*maxx)
Y2:=round(y2*maxy)
drawfillbox(X1,Y1,X2,Y2,black)
end DrawRelativeBox
ProgrammingFun




PostPosted: Tue Jan 12, 2010 7:33 pm   Post subject: RE:Full Screen

Thanks for the help.
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 10 Posts ]
Jump to:   


Style:  
Search: