STAR TREK 2d20
  1. #1

    Anchored static width ignored for control

    Hey guys,
    I'm currently working on a new CoreRPG extension ruleset and am having good progress so far. Everything's working as expected and I get the stuff in I want rather quickly. However one thing is bothering me. I defined a new character sheet and filled it with various functionalities but whenever I open the sheet for the first time the console opens and gives me several warnings of the same type.
    Code:
    [12/2/2020 6:24:26 PM] [WARNING]  window: Anchored static width ignored for control (memory) in windowclass (charsheet_default)
    [12/2/2020 6:24:26 PM] [WARNING]  window: Anchored static width ignored for control (liftcarry) in windowclass (charsheet_default)
    [12/2/2020 6:24:26 PM] [WARNING]  window: Anchored static height ignored for control (used_side_actions) in windowclass (charsheet_default)
    [12/2/2020 6:24:26 PM] [WARNING]  window: Anchored static width ignored for control (used_side_actions_label) in windowclass (charsheet_default)
    [12/2/2020 6:24:26 PM] [WARNING]  window: Anchored static width ignored for control (used_side_actions_label) in windowclass (charsheet_default)
    [12/2/2020 6:24:26 PM] [WARNING]  window: Anchored static width ignored for control (attackscore_label) in windowclass (charsheet_default)
    [12/2/2020 6:24:26 PM] [WARNING]  window: Anchored static width ignored for control (attackscore) in windowclass (charsheet_default)
    I looked at the mentioned controls and tried several things. I removed width and height and readded them but nothing I do seems to change anything. Does anyone what triggers these?
    See an example of "memory" below.

    Code:
          <label name="label_memory" source="stats.memory.label">
            <anchored to="label_insight" position="below"  offset="0,6" height="22"/>
            <static textres="charsheet_default_memory" />
          </label>
          <auto_ability name="memory" source="stats.memory.score">
            <anchored to="insight" position="below"  offset="0,6" />
            <default>0</default>
            <source><name>stats.logic.score</name><op>+</op></source>
            <source><name>stats.intuition.score</name><op>+</op></source>
          </auto_ability>
    Is there a way to work around these or even disable specific warnings within the console? I also tried using width and height on their own since the API documentation suggests this, however when doing this one dimensions size is wrong (which is not surprising). So when setting the control to `width="22" and height="22"` it works as expected but throws the warnings out. When deleting one of the attributes the warning if gone but the dimensions are off.

  2. #2
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,404
    If you use position anchoring then that inherits various properties from the control being anchored to. For example, "memory" is anchored "below" so it inherits the top and horizontal position and the width from what it's anchored to - "insight". See the graphic in the Wiki that shows which parameters are inherited for each type of anchoring: https://fantasygroundsunity.atlassia...gets#Anchoring

    The "memory" control itself doesn't have a width defined, but the template it's based on (auto_ability) will, and it's that static width that's being ignored. You could try a different anchoring that will use the width from the template - for example belowleft
    Last edited by Trenloe; December 2nd, 2020 at 18:34.
    Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!

  3. #3
    Awesome! This helped me out a lot.
    For future references if somebody stumbles across the same problem I did the following to accomplish a list of attributes stacked on top of each other consisting of a label and stat next to it looking like
    | Attribute | Pool |
    | Initiative | 12 |
    | Memory | 12 |
    without having the WARNINGs appear.

    1. I defined a frame_char as follows
    Code:
    <frame_char name="actionsframe">
        <anchored position="insidetopright" offset="25,170">
          <left anchor="center" offset="1" />
          <bottom anchor="top" offset="515" />
        </anchored>
    </frame_char>
    2. I defined the first attributes control positions relative to the frame they are within
    Code:
    <label name="label_initiative" source="stats.initiative.label">
      <anchored to="actionsframe" position="insidetopleft"  offset="15,50" width="150" height="22"/> <!-- The width and height are not inherited from insidetopleft, thus we define them -->
      <static textres="charsheet_default_initiative" />
    </label>
    <init_check name="initiative" source="stats.initiative.pool">
      <anchored to="actionsframe" position="insidetopright"  offset="15,50" width="22" height="22"/> <!-- The width and height are not inherited from insidetopright, thus we define them -->
      <default>1</default>
    </init_check>
     <static_number name="initiative_score" source="stats.initiative.score">
       <anchored to="initiative" position="left"  offset="11,0" width="22" /> <!-- According to the mentioned graphic in the link provided by Trenlore the width is not inherited when anchoring position is left, illustrated by the indicating arrows so we define it again -->
       <default>0</default>
       <source><name>stats.reaction.score</name><op>+</op></source>
       <source><name>stats.intuition.score</name><op>+</op></source>
    </static_number>
    3. I defined the second attributes controls relative to the first attribute
    Code:
    <label name="label_memory" source="stats.memory.label">
      <anchored to="label_initiative" position="below"  offset="0,6" height="22"/> <!-- According to the graphic the height is not inherited when anchoring position is below -->
      <static textres="charsheet_default_memory" />
    </label>
    <auto_ability name="memory" source="stats.memory.score">
      <anchored to="initiative" position="below"  offset="0,6" height="22" /> <!-- According to the graphic the height is not inherited when anchoring position is below -->
      <default>0</default>
      <source><name>stats.logic.score</name><op>+</op></source>
      <source><name>stats.intuition.score</name><op>+</op></source>
    </auto_ability>
    Thanks Trenloe

  4. #4
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,404
    Nice one!
    Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!

  5. #5

  6. #6
    Quote Originally Posted by damned View Post
    Most importantly what are you building?
    A Shadowrun 6 ruleset. I looked at the SR5 which is posted in the forums and is not maintained anymore but porting it to SR6 is a mess, so I decided to start from the very beginning. It is in a very early stage though. I got rid off pretty much everything and as of now I implemented a character sheet and a custom d6 that shows successes and failures. As soon as it is somewhat usable I'll start up a new thread. Currently all strings are in German since I only own the German Core Rulebook, however I use static textres, so Localization should not be a problem at a later stage.

    I use the CoreRPG pack and get some insporation from the SR5 ruleset as well as MoreCore but it's pretty much a fresh start.

    Oh and I separated the theme from the actual ruleset, which is not done in the SR5 extension for MoreCore.
    Last edited by macskay90; December 2nd, 2020 at 23:01.

  7. #7
    damned's Avatar
    Join Date
    Mar 2011
    Location
    Australia
    Posts
    26,678
    Blog Entries
    1
    Quote Originally Posted by macskay90 View Post
    A Shadowrun 6 ruleset. I looked at the SR5 which is posted in the forums and is not maintained anymore but porting it to SR6 is a mess, so I decided to start from the very beginning. It is in a very early stage though. I got rid off pretty much everything and as of now I implemented a character sheet and a custom d6 that shows successes and failures. As soon as it is somewhat usable I'll start up a new thread. Currently all strings are in German since I only own the German Core Rulebook, however I use static textres, so Localization should not be a problem at a later stage.

    I use the CoreRPG pack and get some insporation from the SR5 ruleset as well as MoreCore but it's pretty much a fresh start.

    Oh and I separated the theme from the actual ruleset, which is not done in the SR5 extension for MoreCore.
    Brilliant!

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
  •  
FG Spreadshirt Swag

Log in

Log in