• 0

    posted a message on Config options, scrolling, and repeating groups
    First, thanks for responding. I appreciate your time and efforts in educating me. Second, let me state up front I'm trying to understand how to apply this guidance rather than arguing with it. If if sounds like I'm being difficult, then I'm just explaining my confusion badly.

    I can see how to use this mechanism to manage lists of single objects, but I'm not entirely clear on how to use it for lists of repeating groups of more complex objects.
    Assume there are four steps in the reforging process. Each step is described by two select boxes: one to select the attribute, and one to select the cap.

    options.rule1 = {
      type = 'group',
      args = {
        stat = {
          type = 'select',
          name = 'Stat',
          values = {
            "ITEM_MOD_HIT_RATING_SHORT" = _G["ITEM_MOD_HIT_RATING_SHORT"],
            "ITEM_MOD_EXPERTISE_RATING_SHORT" = _G["ITEM_MOD_EXPERTISE_RATING_SHORT"],
            ...
          },
          get = function() ... end,
          set = function() ... end,
        },
        cap = {
          type = 'select',
          name = 'Cap',
          values = {
             "MeleeHitCap",
             "SoftExpertiseCap",
            ...
          },
        },
        userdata = {
          type = 'input',
          name = 'Values',
        },
      }
    }


    Rule #2 looks just like this, as do rules #3 and #4. Do I need to copy out this table three more times? Or is there a mechanism for capturing the "repeat" nature in the options table?

    And for the other component of a rule, there is an ordering of the eight reforgable attributes. My first thought, UI-in-XML-wise, was a label with two buttons for each stat, and then stack eight of them in a chunk so the user can click the up and down buttons to change the position of things in the stack; this would be somewhat like the sections in the flyout panel in the new character sheet where you can rearrange the order of "Melee", "Spell", "Ranged", "Defense", etc. Do you have any suggestions on how to implement that, or a different way to present it so it's possible in the constraints of the ACD options table?
    Posted in: Ace3
  • 0

    posted a message on Config options, scrolling, and repeating groups
    I'm probably going about this the wrong way, so I'm hoping for guidance as to what direction I should be pushing.

    My addon is "Reforgenator". It has internal models for reforging that have a smidgeon of structure. Each model has a stack-rank list of attributes, and a set of rules for reforging stats up to some cap. The structure looks like

    local model = {
       statRank = {
          ITEM_MOD_HIT_RATING_SHORT,
          ITEM_MOD_EXPERTISE_RATING_SHORT,
          ...
       },
    
       reforgingOrder = {
          { ITEM_MOD_HIT_RATING_SHORT, "MeleeHitCap" },
          { ITEM_MOD_EXPERTISE_RATING_SHORT, "SoftExpertiseCap" },
          ...
       }
    }


    My current task is to expose this to editing in the config frame. I got a basic screen working with the layout defined in XML like so (lots of detail elided), which I then add to the Blizzard options panel via InterfaceOptions_AddCategory:

    <Frame name="ReforgenatorStatRankTemplate">
       ...
       <FontString name="$parent_Name">
       ...
       <Button name="$parent_UpArrow">
       ...
       <Button name="$parent_DownArrow">
       ...
    </Frame>
    
    <Frame name="ReforgenatorRuleTemplate">
       <Frame name="$parentStat" inherits="UIDropDownMenuTemplate">
       ...
       <Frame name="$parentCap" inherits="UIDropDownMenuTemplate">
       ...
       <EditBox name="$parentUserdata">
    </Frame>
    
    <Frame name="ReforgenatorEditorPanel">
       ...
       <Frame name="StatRank1" inherits="ReforgenatorStatRankTemplate" id="1"/>
       <Frame name="StatRank2" inherits="ReforgenatorStatRankTemplate" id="2"/>
       ...
    </Frame>


    But when I extend this pattern to use the template for the reforging part, the window gets rather tall. Tall enough to not fit inside the options frame, so something else has to be done.

    This is the only part of the options that isn't built by AceConfigDialog, and it's really been rather more hassle than I'd like. Can I recast this problem into something that could be built by AceConfigDialog? If not, is there a better scrolling solution than FauxScrollFrame?
    Posted in: Ace3
  • To post a comment, please or register a new account.