GI JOE RPG Launch
  1. #1
    Varsuuk's Avatar
    Join Date
    Dec 2015
    Location
    New York
    Posts
    2,102

    Example of "expanding" label

    I've been using "label_fieldtop", I was wondering - is there a better way than setting a "width" element in <anchored> to make it fit longer strings? Like is there a current control that either via some API or in script takes the textres and centers it above some control?
    I suspect this is a newbie question, but asking anyway (cos my way is clunky if the string resourse is changed)

  2. #2
    It all depends on how large you want the label to be.

    Since string controls must have a horizontal anchor; you have to specify either a left anchor, a right anchor, or both. label_fieldtop uses "above" which sets the bottom, left and right anchors along with offsets (1 pixel above, and 3 pixels expanded on each side). You can potentially specify a larger horizontal expansion by specifying an "<anchored offset="5,1" />" in your control (or something similar).

    When I find these situations, I usually shorten the label and add a hover tooltip with more information, so that the sheet doesn't become more cluttered.

    Regards,
    JPG

  3. #3
    Varsuuk's Avatar
    Join Date
    Dec 2015
    Location
    New York
    Posts
    2,102
    Thanks

    Yup, that's what I was doing - changing the offset per control if needed it.
    Yeah, I was TRYING to use the shorted label I could. But it is a "Temporary Hitpoints" and "Non-lethal Damage" numberbox. So I tried "TmpHP" and "TmpDmg" I had to expand both manually to make it work. I'd have preferred a thing that autoexpands so if I change the text in resources I didn't forget to also re-tweak the label window. Or if someone ELSE does it to internationalize it to another language they would have to know to edit the controls too. The good news is I highly doubt anyone else will be using it and needing that but still - I think of corners.

    I ended up making them a good deal bigger and squoze in "Tmp HP" and "Tmp DMG" with an exact fix (and slight space either side) via trial and error size tests.

  4. #4
    THP and TDMG; plus tooltips?

    Regards,
    JPG

  5. #5
    Varsuuk's Avatar
    Join Date
    Dec 2015
    Location
    New York
    Posts
    2,102
    I already had the detailed tooltips it DAMMIT MAN, Thep and tdmg work for me. Obviously, brevity and clarity are neither my advantages or feats to borrow from Savage Worlds and D&D

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