Starfinder Playlist

Thread: framedef FGII

  1. #1
    Insanity's Avatar
    Join Date
    Mar 2007
    Location
    Terra, Sol system
    Posts
    198

    framedef FGII

    I was looking at the graphics_frame.xml file because I want to add my own frame. Looking at the slottedmodifier definition, I see that it appears the left rect are offset from the middle rects. Assuming I am reading the definition correctly. I am not familiar with .xml much, wasn't sure if there was a purpose to this or not?

    Code:
    	<framedef name="slottedmodifier">
    		<bitmap file="frames/slottedmodifier.png" />
    		<topleft rect="0,0,37,12" />
    		<top rect="37,0,160,12" />
    		<topright rect="212,0,12,12" />
    		<left rect="0,12,37,187" />
    		<middle rect="37,12,160,187" />
    		<right rect="212,12,12,187" />
    		<bottomleft rect="0,199,37,12" />
    		<bottom rect="37,199,160,12" />
    		<bottomright rect="212,199,12,12" />
    	</framedef>
    Am I wrong, or is there a reason?
    I wanted to define a custom frame and couldn't figure out why it would be defined this way.

  2. #2

    Join Date
    Feb 2006
    Location
    Fairfax County, Virginia
    Posts
    499
    The left rect starts at the left edge of the frame and is 37 pixels thick. Therefore, the middle rect has to start 37 pixels away from the edge. Both rects start 12 pixels down from the top and are the same height (187).

  3. #3
    Insanity's Avatar
    Join Date
    Mar 2007
    Location
    Terra, Sol system
    Posts
    198
    D'oh...my apology. It is the right rects that I had a question on. thanks for the response though.

  4. #4

    Join Date
    Feb 2006
    Location
    Fairfax County, Virginia
    Posts
    499
    Ahh, I see

    Okay, so the way it works, each rect takes from the specified portion of the bitmap image. In the case of the slottedmodifier frame, the middle rect has the repeating series of vertical lines. The left rect includes the first of these vertical lines, the left edge of the box, and the intervening space. The right rect only includes the right edge of the box.

    In order to get it so that a particularly wide control that uses this frame would have the vertical lines repeating at the same interval, the middle rect cuts it off just to the right of one of these vertical lines. But when they drew the bitmap image, they (for whatever reason) included extra space between the last vertical line and the right corner/edge. The gap in the offsets between the middle and right rects is just this extra space being skipped, and they could have instead make the rects line up edge-to-edge while cropping out that space from the bitmap image.

  5. #5
    Search is your friend.

    This was done up very nicely, and I believe it remains accurate.

    Crusader's Post referring to rectangles and pixels

    Later.
    Ram

    If I am walking with two other men, each of them will serve as my teacher. I will pick out the good points of the one and imitate them, and the bad points of the other and correct them in myself. -- Confucius

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
5E Product Walkthrough Playlist

Log in

Log in