5E Character Create Playlist
Page 2 of 2 First 12
  1. #11

  2. #12
    Oh, I get what you're saying now, damned. Moon Wizard clarified offset for me - that it only takes TWO values, and not four - and I should probably use bounds instead. That's where "setStaticBounds" comes in. Things make sense now.

  3. #13
    Returning after a few days break, I finally got it to work.
    For reference, this is the code that I used:

    Code:
    <label_char name="occupationlabel">
    	<anchored to="occupationframe" position="insidetopleft" height="15" />
    	<static textres="char_label_occupation" />
    	<script>
    		function onFirstLayout()
    			local nWidth,_ = getSize();
    			setAnchoredWidth(nWidth+10)
    		end
    	</script>
    </label_char>
    By using an anchored tag instead of a bounds tag, I avoid setting a definite width for the control, which was my first mistake, because that meant that the text had stopped pushing the width out entirely. (Yes, I was that stupid.)
    This meant that I went with setAnchoredWidth() instead of setStaticBounds().
    I might update the code later, since this is just my first working prototype. (To get the margins on both sides, I just included the "<center />" tag.)

    Thank you again, damned. You set me on the right track.
    Bidmaron, I still don't understand what you meant by lua tables, but thank you for trying to help none-the-less.

  4. #14

    Join Date
    Apr 2008
    Location
    Virginia Beach
    Posts
    3,096
    Glad you got it working. I am out of town again and will try to get you specific references for what I was talking about cuz you will probably need it at some point

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