View Single Post
TCArknight
Senior Member
 
Join Date: Jan 2007
Location: NW Arkansas
Posts: 1,321

Old August 8th, 2009, 12:36 PM
Howdy!

Ran into another snag...

I'm trying to allow the choice of one of the 4 reactionsto gain a bonus. From looking at the walkthrough, I should probably use the following portal:
Code:
    <portal
      id="menu1"
      style="menuSmall">
      <menu_things
        field="usrChosen1"
        component="none"
        maxvisible="10"
        usepicksfield="usrSource1"
        candidatefield="usrCandid1">
        </menu_things>
      </portal>
I've added this tag to all selectable reactions: <tag group="RAbil" tag="Adaptable"/>

However, although I get Adaptable: -choose- in red for the racial ability the menu to choose never shows up.

My template and the Racial ability:
Code:
<thing
  id="abAdapt"
  name="Adaptable"
  compset="RaceAbil"
  isunique="yes"
  description="Description goes here">
  <fieldval field="usrCandid1" value="thingid.Adaptable"/>
  <tag group="Hide" tag="Ability"/>
  <tag group="Hide" tag="RaceAbil"/>
  <tag group="ChooseSrc1" tag="Hero"/>

    <!-- Bootstrap Choose either Sta, Qui, Wil for a +2 bonus -->
  </thing>

  <template
    id="raPick"
    name="Racial Ability Pick"
    compset="RaceAbil"
    marginhorz="3"
    marginvert="2">

    <portal
      id="name"
      style="lblNormal"
      showinvalid="yes">
      <label
        field="name">
        </label>
      </portal>

    <portal
      id="menu1"
      style="menuSmall">
      <menu_things
        field="usrChosen1"
        component="none"
        maxvisible="10"
        usepicksfield="usrSource1"
        candidatefield="usrCandid1">
        </menu_things>
      </portal>

    <portal
      id="info"
      style="actInfo">
      <action
        action="info">
        </action>
      <mouseinfo/>
      </portal>

    <portal
      id="delete"
      style="actDelete"
      tiptext="Click to delete this item">
      <action
        action="delete">
        </action>
      </portal>

    <position><![CDATA[
      ~set up our height based on our tallest portal
      height = portal[info].height

      ~if this is a "sizing" calculation, we're done
      doneif (issizing <> 0)

      ~determine whether our menus are visible
      ~Note: Remember that a non-empty tagexpr field indicates menu selection is used.
      ~if (field[usrCandid1].isempty <> 0) then
        portal[menu1].visible = 0
      ~  endif

      ~position our tallest portal at the top
      portal[info].top = 0

      ~center the other portals vertically
      perform portal[name].centervert
      perform portal[delete].centervert
      perform portal[menu1].centervert

      ~position the delete portal on the far right
      perform portal[delete].alignedge[right,0]

      ~position the info portal to the left of the delete button
      perform portal[info].alignrel[rtol,delete,10]

      ~position the menus to the left of the info in the available space
      perform portal[menu1].alignrel[rtol,info,10]
      portal[menu1].width = (portal[info].left - portal[menu1].left - 20) / 2

      ~position the name on the left and use availble space, with a gap for menus
      portal[name].left = 0
      ~portal[name].width = minimum(portal[name].width,portal[menu1].left - portal[name].left)
      portal[name].width = 50

      ~if the ability is auto-added, change its font to indicate that fact
      if (candelete = 0) then
        perform portal[name].setstyle[lblAuto]
        endif
      ]]></position>

    </template>
What am I missing? Is my sizing and positioning off? I set the visibility always to 0, so I thought it would always show up even if there wasn't anything in the usrCandid1 field.

Suggestion?

Thanks!
Thomas
TCArknight is offline   #18 Reply With Quote