5E Product Walkthrough Playlist
  1. #1
    Varsuuk's Avatar
    Join Date
    Dec 2015
    Location
    New York
    Posts
    2,075

    Where does this control setup the line above AND below the header texT?

    I was trying to figure out how to properly position the textile in CorePRG to use as a separator since don't have access to the 5E graphics in wotc graphics one - I traced it to here where the control is derived from this and has the TRAITS test with line above and below using header simple instead.

    But not sure how this works - header simple is a single line - what does the effect of the above and below? I don't need that effect but curious -= really I was looking at this because my line didn't line up like wanted so was going to use this as example to help me set right values but can't since don't understand it yet.

    I am TERRIBLE with the xml UI stuff sorry.



    Code:
      <template name="header_column">
        <label>
          <anchored height="20">
            <top parent="columnanchor" anchor="bottom" relation="relative" offset="10" />
            <left offset="10" />
            <right offset="-10" />
          </anchored>
          <frame name="headersimple" offset="10,3,10,3" />
        </label>
      </template>

  2. #2
    Varsuuk's Avatar
    Join Date
    Dec 2015
    Location
    New York
    Posts
    2,075
    I keep playing with the offset field but as I said, I can't seem to grok these guy thingies:

    In template_campaign
    Code:
    	<template name="frame_record_content_tabbed">
    		<genericcontrol name="contentframe">
    			<anchored>
    				<top parent="header" anchor="bottom" offset="7" />
    				<left offset="15" />
    				<right offset="-30" />
    				<bottom offset="-20" />
    			</anchored>
    <!-- 			<frame name="textline" offset="0,5,-8,0" /> -->
    <!-- <frame name="headersimple" offset="10,3,10,3" /> -->
    <frame name="textline" offset="-1,8,-10,0" />
    			<disabled />
    		</genericcontrol>
    	</template>
    The 1st number seems to be how much to extend PAST the left margin, so negative numbers are needed.
    The 2nd seems to move my line up or down vertically.
    The 3rd and 4th I can't seem to make do anything for me when I play with em.

    I was trying to make the separator line line up with the TRAITS parallel lines (that's why was trying to understand in prior post how those are defined)

    The framed for textile is:
    Code:
    	
    	<framedef name="textline">
    		<bitmap file="graphics/frames/textline.png" />
    		<top rect="1,14,98,3" />
    	</framedef>
    I took it from CoreRPG to test my customizing the rect values but it didn't work - so I technically no longer need it and can change my form to using "separatorline" - but that doesn't solve my line up problem.


    Again, this is not my intended target GUI - just wanted to do some minor changes to learn the things and use while I continue the guts before reworking looks.

    Screen Shot 2019-04-30 at 2.29.28 AM.png

  3. #3
    The lines are part of the "headersimple" frame. So, to change the offsets of the lines within the control, you would need to change the height of the header_column control to create more space inside. If you wanted to make more space above, you would increase the top anchor offset. If you wanted to make more space below, you would increase the top anchor offset of the next control defined.

    In most situations, positive offsets extend to the right and down, and negative offsets extend to the left and up. There are a few exceptions when using the "position" tag, since it defines multiple anchors at once.

    If no parent anchor is defined, then it uses the matching parent anchor. Therefore, "<bottom offset="-20" />" means that the bottom anchor of this control is anchored up 20 pixels from the bottom of the window it is defined in. If a parent is defined in the "anchored" tag or in the "bottom" tag, then the bottom anchor would be anchored 20 pixels up from the bottom of that parent anchor control. You can also specify different anchor points, such as <top parent="label" anchor="bottom" offset="5">

    There's a whole section in the wiki on Anchoring at this link:
    https://www.fantasygrounds.com/wiki/...face#Anchoring

    The separator and headersimple frames both contain graphics that appear to go left to right edge, so as long as they are both anchored at the same point on the left and right, they should probably line up. They weren't necessarily designed to work together, so not sure what other adjustments made need to be made without implementing.

    Regards,
    JPG

  4. #4
    Varsuuk's Avatar
    Join Date
    Dec 2015
    Location
    New York
    Posts
    2,075
    Roger that Anchoring info - I have it bookmarked since it never sinks in (I also keep that reeeeeeeally useful inside-right,outside-right,top,bottom,etc square with all the little squares saved as a graphic )

    I was MAINLY confused on the header simple because [EDIT: OMG I JUST SAW MY MISTAKE, I could kick myself. I kept seeing the line smack down the "page" and wondered why that was but like I said I don't know graphics/UI well... only now as I was going to type that (whenever in troubleshooting I go to make an assertion in a question I post, I doublecheck it / my memory - and I FINALLY saw the blasted UPPER line... now and ONLY now does your comment about upper and lower frame edges makes sense.. lol so obvious I can't NOT see it now when I look but it was subtle at first to me)] ...
    Screen Shot 2019-04-30 at 9.27.38 PM.png


    Anyhow, THAT now understood, I was trying to line up the right edge better but was not able to make it extend as far as the parallel header lines line. I'm not sweating it specifically because when I get to UI "attempted cleanup" I will be replacing it with a colored header like is used in 2E or others. I have to just figure out how to tint the backgrounds in a way that is complementary (of course, I have no color sense, but will try)



    The picture I showed you, the separator was based on:
    <frame name="textline" offset="-1,8,-10,0" />

    To fix the leftmost edge, I changed it to 0,8,-10,0. Now those aligned.

    So, increasing the first number makes the edge of the left side of the line go MORE LEFT (which seems the opposite of what I'd expect as an "offset" - but my only "major" practice with these is with <anchor> offsets never <frame> ones.

    Is this right, 1st number positive moves the line to the LEFT?
    So, second number 8, made the line go up and down.Again, in reverse of what I expected, increasing the value moves it UP towards the top. So I guess the offset is from the "bottom" here of some reference point.

    Those two I can change and see a result I can work with even if it isn't the direction my intuition expected. So no probs.

    Changing further now, at a human hour of the night, to: <frame name="textline" offset="0,8,0,0" /> gives me the result I wanted. The two edges line up:
    Screen Shot 2019-04-30 at 9.47.04 PM.png

    That said, 3rd seems then to be how much to indent to LEFT if positive (same as before) and to right if negative. But what does this last digit (now 0) do? I tried changing it to 10, saw no visible change. I mean, I've never seen diagonal lines, so it isn't another y-axis up/down offset because if it wasn't the same as the second digit - we would not have a horizontal line. So, what does it represent here?

  5. #5
    I wouldn't change the frame offset, unless you really need to fine-tune or it's a text field that's left justified. I would focus more on changing the anchor points of the control using the frame.

    Frame offsets are different than anchoring. Positive numbers expand the frame away from the control, and negative numbers shrink the frame into the control.

    Regards,
    JPG

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
  •  
DICE PACKS BUNDLE

Log in

Log in