5E Product Walkthrough Playlist
Page 2 of 2 First 12
  1. #11
    Varsuuk's Avatar
    Join Date
    Dec 2015
    Location
    New York
    Posts
    2,075
    PS as a gift for going blind? reading my posts:

    Anyone who might wonder about how to do multiline labels under a control:
    I found I could do it by just adding the multiline tag (I did trial and error to see for my font/height what spacing looked 'right') and defining my string with a "\n" between the two words since I wanted to center the words and without that the space from second word is considered part of second line and throws off centering - will post 2 pics to show what mean:

    MultiCenterOffBit.jpeg

    MultiCenterBetter.jpeg

    Code:
    strings xml file:
    	<string name="char_label_armorclass">Armor\nClass</string>
    	<string name="char_label_savingthrow">Saving\nThrow</string>
    
    template file:
    	<template name="labelbelow">
    		<label>
    	 		<anchored to="" position="below"	offset="0,-5" />	
    			<font>font_charsheet_labelbelow</font>
    			<static text="**MISSING LABEL**" />
    		</label>
    	</template>
    
    
     sheet data:
    			<labelbelow name="savingthrow_label">
    				<anchored to="savingthrow" offset="0,3" height="25" />
    				<multilinespacing>12</multilinespacing>
    				<center />
    				<static textres="char_label_savingthrow" />
    			</labelbelow>

  2. #12
    damned's Avatar
    Join Date
    Mar 2011
    Location
    Australia
    Posts
    26,685
    Blog Entries
    1
    Quote Originally Posted by Varsuuk View Post
    The first 18 pixels on left (from top to bottom up to 200 pixels since the source 547 is taller than target 200) are taken and used as the first 18 pixels top to bottom on my target frame.

    Next the top 18 pixels (starting from 0,0 or 19,0?) of the source is copied from left to right up to 400 pixels since source is 547 and target 400) is used as the top "border" of the resulting target frame?

    Then the right 17 pixels of the source form the rightmost 17 pixels of my frame from top to bottom (again because source is taller than target)

    Penultimately the bottom 17 pixels of the source is used to create the bottom 17 pixels of my frame all across (as source is wider than target is wider, no tiling needed)

    Finally the center is created by taking the innermost square and tiling it (if necessary, here that target square is 547 - 35= 512x512 so still target than the remaining 400-35=365 x 165 (200-35)
    topleft = 0,0,18,18
    top=18,0,512,18
    topright=530,0,17,18

    left=0,18,18,512
    middle=18,18,477,512
    right=530,18,17,512

    bottomleft=0,530,18,17
    bottom=18,530,512,17
    bottomright=530,530,17,17


    top, right, tile horizontally
    left, right tile vertically
    middle tiles vertically and horizontally

    so you can that writing it out 18,18,17,17 is a huge time saver!

  3. #13
    Varsuuk's Avatar
    Join Date
    Dec 2015
    Location
    New York
    Posts
    2,075
    OMG - THAT'S what I should have asked you...

    "could you translate the L,R,T,B format to the 'extended' format" - wow, I GET IT NOW

    You rock (and as I said, I wish I had better skills at expressing what I am trying to ask.)

    It is all clear!
    Glad you are presenting the extension class. I bet you will help lots of folks with your class. I can't teach worth a damn myself. I did well with junior devs in prior jobs but that was more code-review notes and showing them examples to look at. Putting together a hoot point A through Z... not so much.

    Hey, at least I have a diagnosis to explain me
    Thank you again.


    EDIT: Welp, it is 1:52AM my time, so heading to bed (I only find time to work on FG/rulesets at weird hours when my son and wife are asleep or lunchtime or commute... but plugging away - can't wait until can do Lua primarily vs control setups )

    Quote Originally Posted by damned View Post
    topleft = 0,0,18,18
    top=18,0,512,18
    topright=530,0,17,18

    left=0,18,18,512
    middle=18,18,477,512
    right=530,18,17,512

    bottomleft=0,530,18,17
    bottom=18,530,512,17
    bottomright=530,530,17,17


    top, right, tile horizontally
    left, right tile vertically
    middle tiles vertically and horizontally

    so you can that writing it out 18,18,17,17 is a huge time saver!
    Last edited by Varsuuk; April 11th, 2018 at 06:54.

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 Character Create Playlist

Log in

Log in