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

Username:   Password: 
 RegisterRegister   
 Screen size problem on various computers.
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
xBloodyHeartx




PostPosted: Tue Jun 16, 2015 8:04 pm   Post subject: Screen size problem on various computers.

What is it you are trying to achieve?
I am trying to to have a fix screen size of my program that is able to use on any computer screens.

What is the problem you are having?
when i setscreen ("graphics:760,500") in my progam. run it on one computer it shows rest of my program properly on that screen size on that computer. but when i go on another computer and run the same program again, the screen size window is the same but rest of the program output is all over the place so gives me a error of column is greater than maxcol or row is greather than maxrow. then to fix it i have to increase/decrease the screen size to make it work again.

so how to make it work on any computer monitor screen or laptop screen properly without editing the value. i just want to create it on one computer then once finalize i can run it on any computer the program with that screen size being fixed.


Describe what you have tried to solve this problem
having both computer run side by side and trying to adjust the screen value in the program to match both ways correctly.


Please specify what version of Turing you are using
4.1.2
Sponsor
Sponsor
Sponsor
sponsor
TokenHerbz




PostPosted: Sat Jun 27, 2015 4:15 am   Post subject: RE:Screen size problem on various computers.

I'm not sure what computer screen doesn't have at least 760x500.

Could you describe the problem a bit more?

Aside from that I would suggest grid out percentage locations of your content (not really sure what your aiming for) then you can use math to position everything correctly on different sized screens... using the maxx, maxy.

code:

setscreen("graphics:max, max") %% try one
%setscreen("graphics:250,500")  %% try two
%setscreen("graphics:700,300")  %% try three
drawbox(maxx div 2, maxy div 2, maxx div 2+5, maxy div 2+5, black)
Clayton




PostPosted: Sat Jul 04, 2015 6:24 pm   Post subject: RE:Screen size problem on various computers.

Do you have a snippet of your code where you're getting this problem? Turing has, for lack of a better description, 2 panels that occupy the same window space, using two different coordinate systems, to draw various elements to the screen. The first is the text panel, which handles text from the keyboard while getting input, using a system of rows and columns, with (0,0) being at the top left of the run-time window, and (maxrow, maxcol) being at the bottom right. The second is the "everything else" panel, that outputs using an (x,y) pair, measured in pixels, (0,0) at the bottom left, (maxx, maxy) at the top right.

My guess is that you're trying to use pixel coordinates at some point where Turing thinks you should be using table coordinates for a cell, thus being out of bounds, and throwing an error.
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  [ 3 Posts ]
Jump to:   


Style:  
Search: