Thread: Control centering?
-
April 11th, 2018, 06:14 #11
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>
-
April 11th, 2018, 06:33 #12
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!
-
April 11th, 2018, 06:51 #13
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 )
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