wbgmapper & tkui
Bartek Krzeszewski <bkrzeszewski-EDYeUJD08VlmR6Xm/[email protected]> Mon, 27 Sep 2004 21:10:42 +0200
| Newsgroups | gmane.comp.games.mud.client.lyntin |
|---|---|
| Message-ID | <[email protected]> |
With this few lines added #mshow command open map in new window so mam isn't
displayed in main window - this code need some checking if tkui is in use, I
didn't write it because I don't know how.
def mshow_cmd(ses, args, input):
"""
Shows the current map. The blue n's are rooms that have
notes. The red x is where you are.
If you want to see the notes too, pass a true in.
category: mapper
"""
global mapper
withnotes = args["withnotes"]
smallview = args["smallview"]
temp = mapper.getMap(1, withnotes, smallview)[0]
#exported.write_message("mapper: showing map\n%s" % temp)
#exported.write_message("%s" % temp)
#exported.write_message("coordinates are x%s, y%s." % (mapper._x,
mapper._y))
windowname = "map"
if not tkui.myui._windows.has_key(windowname):
tkui.myui._windows[windowname] = tkui.NamedWindow(windowname, "", "")
tkui.myui._windows[windowname].write(temp)
commands_dict["mshow"] = (mshow_cmd, "smallview:boolean=true
withnotes:boolean=false")
and at the beginning of the file u have to add:
from lyntin.ui import tkui
-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php