RPGObjects.com http://www.rpgobjects.com/forum/ |
|
The frame attribute http://www.rpgobjects.com/forum/viewtopic.php?f=4&t=299 |
Page 1 of 1 |
Author: | peterb [ Wed May 26, 2010 8:46 pm ] |
Post subject: | 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 |
Author: | davidbyron [ Wed May 26, 2010 11:34 pm ] |
Post subject: | 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 |
Author: | prof.ebral [ Wed May 26, 2010 11:55 pm ] |
Post subject: | 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. |
Author: | davidbyron [ Thu May 27, 2010 2:45 am ] |
Post subject: | 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 !!! |
Page 1 of 1 | All times are UTC |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |