FG Spreadshirt Swag
Page 4 of 5 First ... 2345 Last
  1. #31
    Minty23185Fresh's Avatar
    Join Date
    Dec 2015
    Location
    Goldstone, CA, USA
    Posts
    1,211
    Blog Entries
    29
    Quote Originally Posted by Bidmaron View Post
    But windowclass merging supports only merge, join, and delete I believe
    Agreed. There is a description of the merge option in templates. I guess merge could do two different things depending on whether it's affects a template or a windowclass. But given the description I think that might not be too hard to verify. I say with skepticism!

  2. #32

    Join Date
    Apr 2008
    Location
    Virginia Beach
    Posts
    3,096
    Still trying to figure out anchoring and control sizing. Within the table_main.xml file of the CoreRPG ruleset, there is a windowclass definition of table_main. And within that windowclass there is this control definition:

    Code:
    			<string_column_full name="description">
    				<empty textres="table_emptydesc" />
    			</string_column_full>
    Nowhere in there or the tree of inherited templates is the height set. How does FG know how big to make the height of the control?

  3. #33
    Minty23185Fresh's Avatar
    Join Date
    Dec 2015
    Location
    Goldstone, CA, USA
    Posts
    1,211
    Blog Entries
    29
    How does FG know how big to make it?

    I can't speak for table_main, and I'm doing this on my iPhone, but for masterindex, it pretty slick. There is a min size for the masterindex windowclass. Then there are three main anchors. One just below the form's title, one just below the list and one at the bottom of the form. The list's bottom anchor is attached to the bottom of the form anchor. The controls just below the list, including the filters are attached to the anchor just below the list. When there are no filters, the bottom of form anchor is really at the bottom of the form and because the list is resizable it fills the form. If there are filters, a lua routine calculates how much room is needed below the list and moves the bottom of form anchor up that much. The list collapses that much and the filters fit below the list and above the bottom of the form.

    So what the hell dies this mean for you? Tables are even mor dynamic that a list because they work in two dimensions. As columns are added, it wouldn't surprise me if something similar is going on.

    My suggestion: figure out where every control's four anchors are. If the controls (e.g. columns or rows) dynamically change size look for a setAnchor() call (it's a member of windowcontrol).

  4. #34
    For controls, if the width and/or height is not defined, then the width/height will be calculated automatically during the window layout routine. At least one vertical anchor and at least one horizontal anchor is still required, and is thus the minimum necessary for an anchored definition. Additional anchors or specified width/height are optional.

    Each control will perform it's automatic width/height calculation differently, based on the type of control it is.

    • formattedtextcontrol (width defined) - W=Defined width; H=Height necessary to display formatted text within width
    • numbercontrol (always single line) - W=Width of display string based on font asset; Height of display string based on font asset
    • stringcontrol (not multiline or width not defined) - W=Width of text string based on font asset; H=Height of text string based on font asset
    • stringcontrol (multiline and width defined) - W=Defined width; H=Number of lines to fit wrap text within defined with multiplied by multiline height tag value
    • subwindow - W=0; H=0 (if contained window not instantiated); H=instantiated window height
    • windowlist - W=0; H=total height of list child windows (each child recalculates layout size based on width of list control)
    • otherwise - W=0; H=0
      (includes buttoncontrol, chatwindow, diecontrol, formattedtextcontrol (no width defined), genericcontrol, imagecontrol, portraitselectioncontrol, scrollbarcontrol, scrollercontrol, tokenbag, tokencontrol, windowreferencecontrol)


    Cheers,
    JPG

  5. #35

    Join Date
    Apr 2008
    Location
    Virginia Beach
    Posts
    3,096
    Thanks, MW.

  6. #36

    Join Date
    Apr 2008
    Location
    Virginia Beach
    Posts
    3,096
    OK, one more, MW or Trenloe or whoever has the controls mastered:

    I want a multiline string box that will have a scrollbar (vertical) if it needs it. I checked the character sheet of CoreRPG, and the Notes section of the character sheet has a scroll bar if you fill up the allotted vertical space. That control is a stringu, defined in common.xml as:

    Code:
    		<stringfield>
    			<font>sheettext</font>
    			<lineoffset default="on" mergerule="replace">1</lineoffset>
    		</stringfield>
    So, I have the following control definition:

    Code:
    			<basicstring name="preprocessor">
    				<empty textres="generator_emptyforward" />
    				<anchored position="insidetop" offset="-5" height="100"/>
    				<invisible />
    				<multilinespacing>20</multilinespacing>
    			</basicstring>
    basicstring is defined in common.xml as:

    Code:
    	<template name="basicstring">
    		<simplestring>
    			<frame mergerule="replace" name="fielddark" offset="7,5,7,5" hidereadonly="true" />
    			<stateframe>
    				<keyedit name="fieldfocus" offset="7,5,7,5" />
    				<hover name="fieldfocus" offset="7,5,7,5" hidereadonly="true" />
    				<drophilight name="fieldfocus" offset="7,5,7,5" hidereadonly="true" />
    			</stateframe>
    		</simplestring>
    	</template>
    When I fill my control up with a lot of text, there is no scroll bar. What have I done wrong that the scroll bar doesn't materialize when the box fills up vertically?

  7. #37
    Minty23185Fresh's Avatar
    Join Date
    Dec 2015
    Location
    Goldstone, CA, USA
    Posts
    1,211
    Blog Entries
    29
    Are you positive you can have attach a scrollbar to a simple string? All the basic string controls I am familiar with don't have scrollbars. It seems as though they allow multi line text, but don't have that pop up scroll bar. only the formatted text (free form text) fields seem to support it. (e.g. record_story.xml)

    Additionally, I think you need to "attach" a scrollbar object to it. I suspect you have done this, I just don't see it there. Is that what "multilinespacing" does?

  8. #38

    Join Date
    Apr 2008
    Location
    Virginia Beach
    Posts
    3,096
    Let me go back and look at the caharacter page notes. I think you are right that I need to attach a scrollbar

  9. #39
    Minty23185Fresh's Avatar
    Join Date
    Dec 2015
    Location
    Goldstone, CA, USA
    Posts
    1,211
    Blog Entries
    29
    I was looking at a couple of the other CoreRPG library dialogs for small, basic text fields. NPCs has a few on the form. For it, if you put multiple lines of text in a box the box expands to fit it, until it is too tall to fit on the form then a scrollbar for the entire form appears. The scroll bar doesn't appear to be attached to the box itself but to the whole of the windowclass (see record_npc.xml). The individual text controls are basicstrings. So maybe you can't attach a scrollbar to them - I don't know. Personally I'd search the whole ruleset for the type of control you want to use, e.g. basicstring, see what windowclasses and templates it's in then look to see if scrollbars are ever attached to it. (a Hecka-Ton to work, I know!)

  10. #40

    Join Date
    Apr 2008
    Location
    Virginia Beach
    Posts
    3,096
    Look at the character notes page in the character sheet. That has individual scroll bars on the bottom notes field

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