pygsear-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [pygsear] config canvas dimensions


From: Lee Harr
Subject: Re: [pygsear] config canvas dimensions
Date: Sat, 29 Mar 2003 19:07:39 +0000

fullscreen mode now is in penguin interactive. When I start up >>>from penguin import * I get a full screen and the only way I can figure out how to >get-out is open another term
  using ctr-alt-f1 and going through a shutdown -f as root
  I flushed pygsear-0.36.3 and installed your new version 37.1
It worked initially, that is I was able to use the penguin >interactively. However when I ran /examples/accel.py the full screen parameter >showed up and poluted the penguin graphics.
  ~/.pygsear/config is winwidth = 800, winheigth= 600 ,fullwidth = 1
  any ideas?
  tahanks
  re-v


Well, you should not need to shut your system down to kill it.
Try something like:

ps ax | grep python

to see if you can find the right process to kill. Then

kill -9 [process id]


To get back to no-FULLSCREEN, just start one of the games,
press [ESC] to bring up the configuration screen, click on
Full/ Window to go back to windowed mode, then click Save.


Or you could edit ~/.pygsear/config and make the
winfull = 1  to winfull = 0


At this point, that pygsear configuration file is shared by
all pygsear programs. I guess it would be a good idea to allow
each different program to have its own section, but I have
not worked on that.


_________________________________________________________________
Tired of spam? Get advanced junk mail protection with MSN 8. http://join.msn.com/?page=features/junkmail
--- Begin Message --- Subject: Re: [pygsear] config canvas dimensions Date: Sat, 29 Mar 2003 13:45:05 -0500 User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20021130 Lee Harr wrote:
Hi,
I'd like to use a full screen canvas. I can find the dimensions using the forward command in the python2.2 module turtle.py. The process is:
invoke python interpreter
$ python
>>>from turtle import *
>>>reset()
#######at this point you'll see a canvas open,
use your expand button on the canvas###########

>>>reset()
############you will now have a full screen canvas with the pen centered. From here you can issue forward commands to the edges of the canvas to find it's full screen dimensions#############

if my canvas dimension is (1200,800), how can I inform the penguin.py?
TIA
re-v



There a few ways you might do this...

If you are on a unix system, you can use the game configuration
system to save your preferred window size. Start a game, (maybe
accel.py) press [ESC] then use [PAGE UP] and [PAGE DOWN] to
get the screen to the size you want. If you want a fullscreen
mode, you could click on the Full/ Window button, and then
click Save.

You could then go in to the saved configuration file and edit
it to be exactly 1200x800. It would be at ~/.pygsear/config

I have not worked out how to do that on windows yet...


The Turtle/ Penguin also has the grow() and shrink() methods.
That might be the easiest way.

So, if you know the screen defaults to 800x600, you could create
a Penguin subclass like this:


class MyPenguin(penguin.Penguin):
   def __init__(self):
       penguin.Penguin.__init__(self)
       # if you want a FULLSCREEN mode, do this:
       # from pygsear import conf
       # conf.WINFULL = 1

       # grow x-dimension from 800 to 1200
       #  and y-dimension from 600 to 800
       self.grow(400, 200)



Maybe I will add a Turtle method maximize() or something like that.

Be careful with that FULLSCREEN mode in an interactive session...
you won't be able to give the penguin any commands.

If you are making a sort of demo, like when you run penguin.py,
you might want to put it in the Game framework like in the latest
version. That way the viewer can change the video mode to taste.


_________________________________________________________________
MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. http://join.msn.com/?page=features/virus


lee
fullscreen mode now is in penguin interactive. When I start up
>>>from penguin import *
I get a full screen and the only way I can figure out how to get-out is open another term
using ctr-alt-f1 and going through a shutdown -f as root
I flushed pygsear-0.36.3 and installed your new version 37.1
It worked initially, that is I was able to use  the penguin interactively.
However when I ran /examples/accel.py the full screen parameter showed up and poluted the
penguin graphics.
~/.pygsear/config is winwidth = 800, winheigth= 600 ,fullwidth = 1
any ideas?
tahanks
re-v

--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]