STAR TREK 2d20
  1. #1

    Rect coordinates?

    What are the following refering to?

    Code:
    	<framedef name="mini_spellsheet">
    		<bitmap file="rulesets\d20 Modern\frames\mini_spellsheet.png" />
    		<topleft rect="0,0,9,24" />
    		<top rect="9,0,149,24" />
    		<topright rect="158,0,11,24" />
    		<left rect="0,24,9,120" />
    		<middle rect="9,24,149,120" />
    		<right rect="158,24,11,120" />
    		<bottomleft rect="0,144,9,23" />
    		<bottom rect="9,144,149,23" />
    		<bottomright rect="158,144,11,23" />
    	</framedef>

  2. #2
    They are portions of the graphics drawn in the corresponding places. And why this has been defined in such a cumbersome manner is because of enabling resizing windows. The corner parts are always drawn in the corners, but the top, left, right, and bottom parts are cycled to fill the required dimension. Therefore, in creating new graphics to some window, it should be kept in mind that those parts should cycle gracefully and also interface the corner bits in a suitable manner. middle means the bulk of the window texture.

  3. #3
    am I right in thinking all co-ordinates are given in X, Y, X-length, Y-length. Where X,Y gives you the top left corner and by adding the lengths you find the bottom right.

    If so how does that code relate to

    Code:
    	<windowclass name="charsheet_minispellentry">
    		<frame name="mini_spellsheetentry" />
    		<datasource name="spell" />
    		<defaultsize width="149" height="20" />
    		<sheetdata>
    			<stringcontrol name="name">
    				<bounds rect="0,3,145,15" />
    				<font name="smallcontrol" />
    				<static />
    			</stringcontrol>
    			<numbercontrol name="prepared">
    				<bounds rect="120,1,26,18" />
    				<font name="smallcontrol" />
    			</numbercontrol>
    		</sheetdata>
    	</windowclass>
    
    	<windowclass name="mini_spellsheet">
    		<frame name="mini_spellsheet" />
    		<datasource name="charsheet" />
    		<dynamic resize="vertical" />
    		<defaultsize width="169" height="200" />
    		<nodelete />
    		<playercontrol />
    		<sheetdata>
    			<windowlist class="charsheet_minispellentry">
    				<bounds rect="9,24,-11,-23" />
    				<allowcreate />
    				<allowdelete />
    				<nestdata />
    				<b-ounds rect="6,6,200,200" />
    				<sort fields="name,level" />
    				<filter field="prepared" value="!0" />
    			</windowlist>
    		</sheetdata>
    	</windowclass>
    The negative values are confusing me somewhat.

  4. #4
    There is a lot of stuff there and before answering I want to ask if there is anything specific besides the negative coordinates you are interested in. The negative coordinates are a way to start counting pixels from right and bottom and there are some limitations to their use. They are generally usable in sub entries within windows. Also a number of coordinates quoted above are relative coordinates for inserting graphics within the window,

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