View unanswered posts | View active topics It is currently Fri Mar 29, 2024 4:58 am



Post new topic Reply to topic  [ 4 posts ] 
 The frame attribute 
Author Message

Joined: Mon May 24, 2010 12:48 pm
Posts: 3
Post The frame attribute
I have a question about the frame attribute of a <nodehandler>

Code:
<nodehandler class="rpg_grid_handler" frame="400,400,0,23"


I understand that we are dealing with coordinates and possibly sizes. I've searched the source code but didn't find anything obvious. So what does 400,400,0,23 in the frame attribute mean?

/Peter Brink


Wed May 26, 2010 8:46 pm
Profile

Joined: Thu Dec 10, 2009 6:37 am
Posts: 335
Post Re: The frame attribute
Off hand I think there was an old parameter which didn't do anything much and then I added a new one for the size and position of the use dialog of the node, and more recently the same for the design dialog (not released yet). I can't recall if "frame" is the old one. Try moving the use dialog around or resizing it and you'll find out.

The code for it would be inside of \orpg\gametree\nodehandlers\core.py

Code:
self.frame_size = None
        self.frame_pos  = None
        try:
            frame = self.master_dom.getAttribute("frame")
            if len(frame):
                (sx,sy,px,py) = [int(value) for value in frame.split(',')]
                self.frame_size = (sx, sy)
                (maxx, maxy) = DisplaySize()
                if px < maxx-80 and py < maxy-50:#if it's off screen ignore the saved pos
                    self.frame_pos  = (px, py)
        except:
            pass


So that looks like frame is the working parameter and it's size X, size Y, pos X, pos Y


Wed May 26, 2010 11:34 pm
Profile
User avatar

Joined: Wed Dec 09, 2009 9:39 pm
Posts: 712
Post Re: The frame attribute
Traipse is slightly different from the Gilcrease version. David is correct. The frame attribute is just that.

In the older version the nodes had an _attribs (grid_attribs or whatever). Data was supposed to be loaded from there, but as it was a child itself, it confused the gametree parser. And as I am about to post on mayhem why, it slowed the gametree parsing down and slowed the loading of the gametree down.

Also .. it never worked. The child never retained the data, and if it did I never saw it being retrieved. So I just deleted the child.

_________________
I ate your Death Knell.
The Traipse Movement
Please show your support for Traipse OpenRPG http://www.facebook.com/MadMathLabs
Send me Traipse OpenRPG Ideas, Bugs, Complaints, Praises here: https://getsatisfaction.com/mml


Wed May 26, 2010 11:55 pm
Profile YIM WWW

Joined: Thu Dec 10, 2009 6:37 am
Posts: 335
Post Re: The frame attribute
I fixed that old code so the data loaded as intended ... but I am not sure if was actually doing anything with it when it did load !!!


Thu May 27, 2010 2:45 am
Profile
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 


Who is online

Users browsing this forum: No registered users and 24 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by Vjacheslav Trushkin for Free Forums/DivisionCore.