Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - Authoring Kit
Register FAQ Community Today's Posts Search

Notices

Reply
 
Thread Tools Display Modes
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old February 24th, 2009, 08:35 AM
Rob or Colen,
I'm getting myself pretty confused trying to write a position script.

The traits (assets and complications) can have:
A domain
3 thing-based choosers
a menu array

I also need to fit in the name, info, delete, and value fields, and have it all look good. Looking through the existing lists of assets and complications, the three optional elements are exclusive of each other (the same asset won't have both a domain and choosers). The problem is, I shouldn't write the position script assuming that they'll always be exclusive of each other.

Where is the user selection component? I need to modify that to add a 3rd chooser (I only need it for one Asset in Demon Hunters so far).

Can you give me any advice on how you'd approach fitting all that into a menu?

I've checked in the position script I have. I think it will properly display everything in BSG. If you want examples to work with, the Talented Asset has 2 choosers, the Addiction Complication has a domain, and the Dull Sense Complication uses the menu array.
Mathias is online now   #1 Reply With Quote
Colen
Senior Member
Lone Wolf Staff
 
Join Date: Dec 2008
Posts: 4,690

Old February 24th, 2009, 09:04 AM
In this case, it's not reasonable to expect things to work correctly when all 5 things are present. At most, you'll have a 400-ish pixel wide space, and unless you want to have a 2-row high table cell, you're just not going to be able to fit everything in and still have enough space.

In situations like this, I would think a reasonable assumption was "No more than 3 selections will be needed for any one pick". Then you can write a position script that operates as follows (pseudocode):

Code:
var nextleft as number
nextleft = right of name portal + 10
~nextleft is now the starting left position for the next visible portal

if domain portal is not used,
  hide it
else
  domain portal position = nextleft
  domain portal width = 1/3 of space to the right of the name
  nextleft = right of domain portal + 10
  endif

if thing menu 1 is not used,
  hide it
else
  thing menu 1 position = nextleft
  thing menu 1 width = 1/3 of space to the right of the name
   nextleft = right of thing menu 1 + 10
  endif

... repeat for other 3 portals ...
That way you're positioning all the portals one by one, putting them into an appropriate amount of space for each. If you have more than 3, the extras will be positioned off to the side, and not appear - you can also track the visible count and just hide them yourself.

The UserSelect component should be in the file "components.core", near the top.
Colen is offline   #2 Reply With Quote
rob
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 8,232

Old February 25th, 2009, 09:27 PM
There is also a "UserSelect" template defined in "visual.dat" that already contains most of what you are looking for. It works in conjunction with the "UserSelect" component. The only difference between what it provides and what you want is an extra menu. So adding one extra set of portals ought to be relatively easy compared to writing the full logic from scratch.
rob is offline   #3 Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 10:46 AM.


Powered by vBulletin® - Copyright ©2000 - 2024, vBulletin Solutions, Inc.
wolflair.com copyright ©1998-2016 Lone Wolf Development, Inc. View our Privacy Policy here.