Changeset 2103


Ignore:
Timestamp:
07/03/10 22:24:43 (2 months ago)
Author:
tolteque
Message:

o LOMEFC2:

  • New Rules management

TODO: indentation and consistency check

tests

Location:
trunk/lomefc2
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/lomefc2/me_predicates.lua

    r2078 r2103  
    983983    }, 
    984984     
     985    -- ============================================================= 
     986    -- WARNING: keep these four decorations at the end of the list. 
     987    -- ============================================================= 
     988    { 
     989        name       = "op_startGroup", 
     990        fields     = {}, 
     991        decoration = "(" 
     992    }, 
     993    { 
     994        name       = "op_stopGroup", 
     995        fields     = {}, 
     996        decoration = ")" 
     997    }, 
     998    { 
     999        name       = "op_and", 
     1000        fields     = {}, 
     1001        decoration = " and " 
     1002    }, 
     1003    { 
     1004        name       = "op_or", 
     1005        fields     = {}, 
     1006        decoration = " or " 
     1007    }, 
     1008}; 
     1009 
     1010 
     1011cdata = { 
     1012 
     1013    predicates =  { 
     1014        op_startGroup             = _("("), 
     1015        op_stopGroup              = _(")"), 
     1016        op_and                    = _("and"), 
     1017        op_or                     = _("or"), 
    9851018     
    986     -- for tests 
    987     { 
    988         name = "getLoInterface", 
    989         fields = { 
    990         } 
    991     }, 
    992 }; 
    993  
    994  
    995 cdata = { 
    996  
    997     predicates =  { 
    9981019        c_unit_alive              = _("UNIT ALIVE"), 
    9991020        c_unit_damaged            = _("UNIT DAMAGED"), 
     
    10351056         
    10361057        c_file_exits              = _("FILE EXISTS"), 
    1037          
    1038          
    1039          
    1040          
    1041 --        getLoInterface            = _("GET LO INTERFACE"),       
    10421058    }, 
    10431059 
     
    10851101      for _tmp, v in ipairs(rules) do 
    10861102          local item = U.addListBoxItem(list, getRuleAsText(v, cdata), nil, v) 
    1087  
    1088           if v.operator == "or" then 
     1103          local color 
     1104          if v.decoration then 
     1105              if v.decoration == "(" or v.decoration == ")" then 
     1106                  color = Color.red 
     1107              else 
     1108                  color = Color.blue 
     1109              end 
    10891110              local theme = item:getTheme() 
    1090               theme.normalTheme.text.color = Color.red 
    1091               theme.selectedTheme.text.color = Color.red 
     1111              theme.normalTheme.text.color = color 
     1112              theme.selectedTheme.text.color = color 
    10921113              item:setTheme(theme)   
    10931114          end 
     
    11021123function getRuleAsText(rule, cdata) 
    11031124    local ruleDescr = rule.predicate 
    1104     local str = getPredicateName(ruleDescr, cdata) .. ' (' 
    1105  
    1106     local first = true 
    1107     local needComma = false 
    1108     for _tmp, field in ipairs(ruleDescr.fields) do 
    1109         if needComma then 
    1110             str = str .. ', ' 
    1111         else 
    1112             needComma = true 
     1125    local str = getPredicateName(ruleDescr, cdata) 
     1126    if not ruleDescr.decoration then 
     1127        str = str .. ' (' 
     1128        local first = true 
     1129        local needComma = false 
     1130        for _tmp, field in ipairs(ruleDescr.fields) do 
     1131            if needComma then 
     1132                str = str .. ', ' 
     1133            else 
     1134                needComma = true 
     1135            end 
     1136 
     1137            local text 
     1138            if field.displayFunc then 
     1139                text = field.displayFunc(cdata, rule[field.id]) 
     1140            else 
     1141                text = tostring(rule[field.id]) 
     1142            end 
     1143 
     1144            if first and ruleDescr.firstValueAsName then 
     1145                str = text .. ' (' 
     1146                needComma = false 
     1147            else 
     1148                str = str .. text 
     1149            end 
     1150 
     1151            first = false 
    11131152        end 
    11141153 
    1115         local text 
    1116         if field.displayFunc then 
    1117             text = field.displayFunc(cdata, rule[field.id]) 
    1118         else 
    1119             text = tostring(rule[field.id]) 
    1120         end 
    1121  
    1122         if first and ruleDescr.firstValueAsName then 
    1123             str = text .. ' (' 
    1124             needComma = false 
    1125         else 
    1126             str = str .. text 
    1127         end 
    1128  
    1129         first = false 
    1130     end 
    1131  
    1132     str = str .. ')' 
    1133     return str 
     1154        str = str .. ')' 
     1155      end 
     1156   return str 
    11341157end 
    11351158 
     
    13781401-- copy default values from rule descriptions 
    13791402function setRuleDefaults(rule, descr) 
     1403    -- Remove decoration field if it exists 
     1404    if rule.decoration then 
     1405        rule.decoration = nil 
     1406    end 
     1407     
     1408    -- Insert/Remove decoration according to the rule type 
     1409    if descr.decoration then 
     1410       rule.decoration = descr.decoration 
     1411    elseif rule.decoration then 
     1412       rule.decoration = nil 
     1413    end 
     1414     
    13801415    for _tmp, v in ipairs(descr.fields) do 
    13811416        if not rule[v.id] then 
     
    14961531 
    14971532    for i = 1, #toRemove do 
     1533        base.print("invalid rule" ) 
    14981534        table.remove(rulesList, toRemove[i] - (i - 1)) 
    14991535    end 
  • trunk/lomefc2/me_trigrules.lua

    r2051 r2103  
    783783    function window.newTriggerBtn:onChange() 
    784784        local trigger = createTrigger(triggersDescr[1]) 
    785  
    786785        for k,v in base.pairs(triggersDescr[1]) do base.print(k,v) end 
    787         base.table.insert(triggers, trigger) 
    788         local item = U.addListBoxItem(window.triggersList,  
    789                 predicates.getRuleAsText(trigger, cdata), nil, trigger) 
     786        base.table.insert( triggers, trigger) 
     787        local item = U.addListBoxItem( window.triggersList 
     788                                     , predicates.getRuleAsText( trigger, cdata) 
     789                                     , nil 
     790                                     , trigger 
     791                                     ) 
    790792        window.triggersList:selectItem(item) 
    791793        window.triggersList:onChange(item) 
     
    804806            for _tmp, action in base.ipairs(trigger.actions) do 
    805807              for _tmp, field in base.ipairs(action.predicate.fields) do 
    806                                         if (field.type == 'file_edit') and (action.file ~= '') then 
    807                                                 local num = 0 
    808                                                 for _tmp, trigger2 in base.ipairs(triggers)do 
    809                                                         for _tmp, action2 in base.ipairs(trigger2.actions) do 
    810                                                                 if ((action2.file == action.file) and (action2 ~= action)) then 
    811                                                                         num = num + 1 
    812                                                                 end 
    813                                                         end 
    814                                                 end 
    815  
    816                                                 if (num == 0) then 
    817                                                         --base.print("delFile") 
    818                                                         mission.removeFileFromMission(action.file);                                                                                                              
    819                                                 end 
    820                                                 action.file = ''; 
    821                                         end; 
     808                if (field.type == 'file_edit') and (action.file ~= '') then 
     809                  local num = 0 
     810                  for _tmp, trigger2 in base.ipairs(triggers)do 
     811                    for _tmp, action2 in base.ipairs(trigger2.actions) do 
     812                      if ((action2.file == action.file) and (action2 ~= action)) then 
     813                        num = num + 1 
     814                      end 
     815                    end 
     816                  end 
     817 
     818                  if (num == 0) then 
     819                    --base.print("delFile") 
     820                    mission.removeFileFromMission(action.file);                                                                                                          
     821                  end 
     822                  action.file = ''; 
     823                end; 
    822824              end 
    823825            end 
     
    854856 
    855857    -- called on new trigger selected  
    856     function window.triggersList:onChange(item)          
     858    function window.triggersList:onChange(item)  
     859--        base.print("triggersList:onChange") 
    857860        if item then 
    858861            showTriggersWidgets(window, true, noTriggerChoice) 
     
    874877    -- called on new goal selected  
    875878    function window.goalsList:onChange(item) 
    876                 --base.print('goalsList:onChange') 
     879--        base.print('goalsList:onChange') 
    877880        if item then 
    878881            showGoalsWidgets(window, true) 
     
    888891    -- add new goal on new button pressed 
    889892    function window.newGoalBtn:onChange() 
    890                 --base.print('newGoalBtn:onChange()') 
     893--        base.print('newGoalBtn:onChange()') 
    891894        local item = window.triggersList:getSelectedItem() 
    892895        if item then 
     
    903906    -- delete current action 
    904907    function window.delGoalBtn:onChange() 
    905                 --base.print('delGoalBtn:onChange()') 
     908--        base.print('delGoalBtn:onChange()') 
    906909        local triggerItem = window.triggersList:getSelectedItem() 
    907910        local item = window.goalsList:getSelectedItem() 
     
    943946    -- if action type was changed  
    944947    function window.goalTypeCombo:onChange(item) 
    945                 --base.print('goalTypeCombo:onChange') 
     948--        base.print('goalTypeCombo:onChange') 
    946949        self.selectedItem = item.itemId 
    947950        if window.goalsList:getSelectedItem() then 
     
    956959    -- if trigger type was changed  
    957960    function window.triggerTypeCombo:onChange(item) 
    958                 --base.print('window.triggerTypeCombo:onChange(item)') 
     961--        base.print('triggerTypeCombo:onChange(item)') 
    959962        self.selectedItem = item.itemId 
    960963        if window.triggersList:getSelectedItem() then 
     
    968971    -- called on new rule selected  
    969972    function window.rulesList:onChange(item) 
    970                 --base.print('window.rulesList:onChange(item)') 
     973--        base.print('rulesList:onChange(item)') 
    971974        if item then 
    972975            showRulesWidgets(window, true) 
     
    980983    end 
    981984    
    982      
     985    -- Create new rule 
    983986    function window.newRuleBtn:onChange() 
    984                 --base.print('window.newRuleBtn:onChange())') 
    985         local goalItem = window.triggersList:getSelectedItem() 
    986         if goalItem then 
     987--        base.print('newRuleBtn:onChange())') 
     988        op_and = { name       = "op_and", 
     989                   fields     = {}, 
     990                   decoration = true 
     991                 } 
     992        local currentGoal = window.triggersList:getSelectedItem() 
     993        local goal = currentGoal.itemId 
     994        if currentGoal then 
     995            -- Compute insertion index and 
     996            -- test if insertion of a new rule is allowed: First or after a "(" or after a logicalOpertor (or & and) 
     997            local idx = 1 
     998            local item = window.rulesList:getSelectedItem() 
     999            if item then 
     1000                rule = item.itemId 
     1001                idx = predicates.getIndex( goal.rules, rule) + 1 
     1002            end 
     1003 
    9871004            local rule = predicates.createRule(rulesDescr[1]) 
    988             base.table.insert(goalItem.itemId.rules, rule) 
    989             local item = U.addListBoxItem(window.rulesList,  
    990                         predicates.getRuleAsText(rule, cdata), nil, rule) 
     1005            base.table.insert(currentGoal.itemId.rules, idx, rule) 
     1006            local item = U.addListBoxItem( window.rulesList 
     1007                                         , predicates.getRuleAsText( rule, cdata) 
     1008                                         , nil 
     1009                                         , rule 
     1010                                         , idx 
     1011                                         ) 
    9911012            window.rulesList:selectItem(item) 
    9921013            window.rulesList:onChange(item) 
    993         end 
    994     end 
    995      
    996     function window.newRuleOrBtn:onChange() 
    997         base.print('window.newRuleOrBtn:onChange())') 
    998         local goalItem = window.triggersList:getSelectedItem() 
    999         if goalItem then 
    1000             local rule = predicates.createRule(rulesDescr[1]) 
    1001             rule.operator = "or" 
    1002             base.table.insert(goalItem.itemId.rules, rule) 
    1003             local item = U.addListBoxItem(window.rulesList,  
    1004                         predicates.getRuleAsText(rule, cdata), nil, rule) 
    1005  
    1006             local theme = item:getTheme() 
    1007             theme.normalTheme.text.color = Color.red 
    1008             theme.selectedTheme.text.color = Color.red 
    1009             item:setTheme(theme)   
    1010  
    1011             window.rulesList:selectItem(item) 
    1012             window.rulesList:onChange(item) 
    1013         end 
    1014     end 
    1015  
    1016     -- if predicate type was changed  
    1017     function window.ruleTypeCombo:onChange(item) 
    1018                 --base.print('ruleTypeCombo:onChange(item)') 
    1019         self.selectedItem = item.itemId 
    1020         if window.rulesList:getSelectedItem() then 
    1021             local rule = window.rulesList:getSelectedItem().itemId 
    1022             rule.predicate = item.itemId 
    1023             predicates.setRuleDefaults(rule, item.itemId) 
    1024             createRuleArgumentsWidgets(window, rule, window.rulesList, cdata) 
    1025             predicates.updateListRow(window.rulesList, predicates.ruleTextFunc(cdata)) 
    10261014        end 
    10271015    end 
     
    10291017    -- delete rule 
    10301018    function window.delRuleBtn:onChange() 
     1019--        base.print('delRuleBtn:onChange())') 
    10311020        local currentGoal = window.triggersList:getSelectedItem() 
    10321021        local item = window.rulesList:getSelectedItem() 
     
    10451034        end 
    10461035    end 
    1047  
     1036     
     1037    -- To insert a "(" 
     1038    function window.startGroupBtn:onChange() 
     1039--        base.print("Start group .....") 
     1040        window.insertDecorationInRule( rulesDescr[#rulesDescr-3]) 
     1041    end 
     1042     
     1043    -- To insert a ")" 
     1044    function window.stopGroupBtn:onChange() 
     1045--        base.print("Stop group .....") 
     1046        window.insertDecorationInRule( rulesDescr[#rulesDescr-2]) 
     1047    end 
     1048 
     1049    -- To insert an "and" 
     1050    function window.andRuleBtn:onChange() 
     1051--        base.print('window.andRuleBtn:onChange())') 
     1052        window.insertDecorationInRule( rulesDescr[#rulesDescr-1]) 
     1053    end     
     1054     
     1055    -- To insert an "or" 
     1056    function window.orRuleBtn:onChange() 
     1057--        base.print('window.orRuleBtn:onChange())') 
     1058        window.insertDecorationInRule( rulesDescr[#rulesDescr]) 
     1059    end 
     1060     
     1061    -- To add a decoration a the good place 
     1062    function window.insertDecorationInRule( decoRuleDesc) 
     1063        local currentGoal = window.triggersList:getSelectedItem() 
     1064        local goal = currentGoal.itemId 
     1065        if currentGoal then 
     1066            -- Compute insertion index and 
     1067            -- test if insertion of a new rule is allowed: First or after a "(" or after a logicalOpertor (or & and) 
     1068            local idx = 1 
     1069            local item = window.rulesList:getSelectedItem() 
     1070            if item then 
     1071                rule = item.itemId 
     1072                idx = predicates.getIndex( goal.rules, rule) + 1 
     1073            end 
     1074 
     1075            local rule = predicates.createRule( decoRuleDesc) 
     1076            base.table.insert(currentGoal.itemId.rules, idx, rule) 
     1077            local item = U.addListBoxItem( window.rulesList 
     1078                                         , predicates.getRuleAsText( rule, cdata) 
     1079                                         , nil 
     1080                                         , rule 
     1081                                         , idx 
     1082                                         ) 
     1083                                          
     1084            -- Set color for this decoration 
     1085            local theme = item:getTheme() 
     1086            local color 
     1087            if rule.predicate.decoration == "(" or rule.predicate.decoration == ")" then 
     1088                color = Color.red 
     1089            else 
     1090                color = Color.blue 
     1091            end 
     1092            theme.normalTheme.text.color = color 
     1093            theme.selectedTheme.text.color = color 
     1094            item:setTheme(theme)   
     1095             
     1096            window.rulesList:selectItem(item) 
     1097            window.rulesList:onChange(item) 
     1098        end 
     1099    end 
     1100 
     1101    -- if predicate type was changed  
     1102    function window.ruleTypeCombo:onChange(item) 
     1103                --base.print('ruleTypeCombo:onChange(item)') 
     1104        self.selectedItem = item.itemId 
     1105        local selectedItem = window.rulesList:getSelectedItem() 
     1106        if selectedItem then 
     1107            local rule = selectedItem.itemId 
     1108            rule.predicate = item.itemId 
     1109            predicates.setRuleDefaults(rule, item.itemId) 
     1110             
     1111            -- Set item color 
     1112            local theme = selectedItem:getTheme() 
     1113            if item.itemId.decoration then 
     1114                decoration = item.itemId.decoration 
     1115                local color 
     1116                if decoration == "(" or decoration == ")" then 
     1117                    color = Color.red 
     1118                else 
     1119                    color = Color.blue 
     1120                end 
     1121                theme.normalTheme.text.color = color 
     1122                theme.selectedTheme.text.color = color 
     1123            else 
     1124                theme.normalTheme.text.color = Color.black 
     1125                theme.selectedTheme.text.color = Color.black 
     1126            end 
     1127            selectedItem:setTheme(theme)   
     1128 
     1129 
     1130            createRuleArgumentsWidgets(window, rule, window.rulesList, cdata) 
     1131            predicates.updateListRow(window.rulesList, predicates.ruleTextFunc(cdata)) 
     1132        end 
     1133    end 
     1134     
    10481135    predicates.rulesToList(window.triggersList, triggers, cdata) 
    10491136    predicates.fillPredicatesCombo(window.triggerTypeCombo, triggersDescr, cdata) 
     
    10581145-- convert goals to serializable description 
    10591146function saveTriggers(triggers) 
    1060   if not triggers then 
    1061       return { } 
    1062   end 
    1063   local result = { } 
    1064   U.copyTable(result, triggers) 
    1065   for _tmp, goal in base.ipairs(result) do 
    1066       goal.predicate = goal.predicate.name 
    1067       for _tmp, rule in base.ipairs(goal.rules) do 
    1068           rule.predicate = rule.predicate.name 
    1069       end 
    1070       for _tmp, goal in base.ipairs(goal.actions) do 
    1071           goal.predicate = goal.predicate.name 
    1072       end 
    1073   end 
    1074   return result 
     1147--  base.print( "saveTriggers()") 
     1148    if not triggers then 
     1149        return { } 
     1150    end 
     1151    local result = { } 
     1152    U.copyTable(result, triggers) 
     1153    for _tmp, goal in base.ipairs(result) do 
     1154        goal.predicate = goal.predicate.name 
     1155        for _tmp, rule in base.ipairs(goal.rules) do 
     1156            rule.predicate = rule.predicate.name 
     1157        end 
     1158        for _tmp, goal in base.ipairs(goal.actions) do 
     1159            goal.predicate = goal.predicate.name 
     1160        end 
     1161    end 
     1162    return result 
    10751163end 
    10761164 
     
    10781166-- convert triggers from serializable desctiption to internal representation 
    10791167function loadTriggers(triggers) 
     1168--    base.print( "loadTriggers()") 
    10801169    if not triggers then 
    10811170        return { } 
     
    10911180        for _tmp, rule in base.ipairs(goal.rules) do 
    10921181            rule.predicate = predicatesByName[rule.predicate] 
    1093             if rule.operator == "or" then 
    1094               base.print('OR detected on LOAD') 
    1095             end 
    10961182        end 
    10971183        for _tmp, rule in base.ipairs(goal.actions) do 
     
    11061192-- All functions returned in array as strings 
    11071193function generateTriggerFunc(triggers, startup_) -- Dmut: obsolete, to be removed in A-10 
     1194  base.print( "generateTriggerFunc()") 
    11081195  if not triggers then 
    11091196      return { } 
     
    11171204 
    11181205      local str = "if " 
    1119       local first = true 
    1120  
    11211206      if save then 
    11221207        for _tmp, rule in base.ipairs(trigger.rules) do 
    1123           if not first then 
    1124               if rule.operator == "or" then 
    1125                 base.print('OR detected') 
    1126                 str = str .. 'or ' 
    1127               else 
    1128                             str = str .. 'and ' 
    1129               end 
     1208          if rule.predicate.decoration then 
     1209            str = str .. rule.predicate.decoration 
    11301210          else 
    1131             first = false 
     1211            str = str .. predicates.actionToString(rule) 
    11321212          end 
    1133           str = str .. predicates.actionToString(rule) .. ' ' 
    1134         end 
    1135  
     1213           
     1214        end 
     1215       
    11361216        str = str .. 'then ' 
    11371217 
     
    11621242 
    11631243function generateTriggerConditions(triggers)  
     1244--  base.print( "generateTriggerConditions()") 
    11641245  if not triggers then 
    11651246      return { } 
     
    11731254      local first = true 
    11741255 
    1175                 for _tmp, rule in base.ipairs(trigger.rules) do 
    1176                   if not first then 
    1177               if rule.operator == "or" then 
    1178                 base.print('OR detected') 
    1179                 str = str .. 'or ' 
    1180               else 
    1181                             str = str .. 'and ' 
    1182               end 
    1183                   else 
    1184                         first = false 
    1185                   end 
    1186                   str = str .. predicates.actionToString(rule) .. ' ' 
    1187                 end 
    1188                 str = str .. ')' 
    1189         result[idx] = str 
    1190                 idx = idx + 1 
     1256      for _tmp, rule in base.ipairs(trigger.rules) do 
     1257        if rule.predicate.decoration then 
     1258          str = str .. rule.predicate.decoration 
     1259        else 
     1260          str = str .. predicates.actionToString(rule) 
     1261        end 
     1262      end 
     1263       
     1264      str = str .. ')' 
     1265      result[idx] = str 
     1266      idx = idx + 1 
    11911267    end  
    11921268  end 
     
    11951271 
    11961272function generateTriggerActions(triggers, startup_)  
     1273--  base.print( "generateTriggerActions()") 
    11971274  if not triggers then 
    11981275      return { } 
     
    12031280    if trigger.rules and (0 < #trigger.rules) then 
    12041281 
    1205           local str = "" 
     1282        local str = "" 
    12061283 
    12071284        if trigger.predicate.name == "triggerFront" then 
     
    12291306 
    12301307function generateTriggerFunc2(triggers, startup_) -- Dmut: new format, conditions and actions separated 
     1308--  base.print( "generateTriggerFunc2()") 
    12311309  if not triggers then 
    12321310      return { } 
     
    12531331-- remove invalid rules and actions from triggers 
    12541332function fixTriggers(triggers) 
     1333--  base.print( "fixTriggers()") 
    12551334  if triggers then 
    12561335    for _tmp, trigger in base.ipairs(triggers) do 
     
    12581337        predicates.removeInvalidRules(trigger.actions) 
    12591338    end 
    1260   end -- if 
    1261 end 
    1262  
     1339  end 
     1340end 
     1341 
  • trunk/lomefc2/me_utilities.lua

    r2065 r2103  
    576576-- itemId will be assign to itemId field of item widget 
    577577-- returns created item. 
    578 function addBoxItem(box, item, theme, itemId) 
     578function addBoxItem(box, item, theme, itemId, idx) 
    579579    if itemId then 
    580580        item.itemId = itemId 
     
    583583        item:setTheme(theme) 
    584584    end 
    585      
    586     box:insertWidget(item) 
     585    if idx then 
     586        box:insertWidget(item, idx) 
     587    else 
     588        box:insertWidget(item) 
     589    end 
    587590end 
    588591 
     
    591594-- itemId will be assign to itemId field of item widget 
    592595-- returns created item. 
    593 function addListBoxItem(listBox, caption, theme, itemId) 
     596function addListBoxItem(listBox, caption, theme, itemId, idx) 
    594597    local item = ListBox.newItem(caption) 
    595     addBoxItem(listBox, item, theme, itemId) 
     598    addBoxItem(listBox, item, theme, itemId, idx) 
    596599    return item 
    597600end 
  • trunk/lomefc2/triggers_dialog.dlg

    r2061 r2103  
    535535            }, -- end of ["params"] 
    536536        }, -- end of ["widget1"] 
     537         
     538        ["startGroupBtn"] =  
     539        { 
     540            ["children"] =  
     541            { 
     542            }, -- end of ["children"] 
     543            ["type"] = "Button", 
     544            ["theme"] =  
     545            { 
     546                ["base"] = "newButtonTheme", 
     547                ["params"] =  
     548                { 
     549                }, -- end of ["params"] 
     550            }, -- end of ["theme"] 
     551            ["params"] =  
     552            { 
     553                ["enabled"] =  
     554                { 
     555                    [1] = true, 
     556                }, -- end of ["enabled"] 
     557                ["vert_anchor"] =  
     558                { 
     559                    [1] = "top", 
     560                }, -- end of ["vert_anchor"] 
     561                ["bounds"] =  
     562                { 
     563                    [1] = 310, 
     564                    [2] = 460, 
     565                    [3] = 30, 
     566                    [4] = 20, 
     567                }, -- end of ["bounds"] 
     568                ["visible"] =  
     569                { 
     570                    [1] = true, 
     571                }, -- end of ["visible"] 
     572                ["text"] =  
     573                { 
     574                    [1] = " ( ", 
     575                }, -- end of ["text"] 
     576                ["zindex"] =  
     577                { 
     578                    [1] = 0, 
     579                }, -- end of ["zindex"] 
     580                ["hor_anchor"] =  
     581                { 
     582                    [1] = "left", 
     583                }, -- end of ["hor_anchor"] 
     584            }, -- end of ["params"] 
     585        }, -- end of ["startGroupBtn"] 
     586        ["andRuleBtn"] =  
     587        { 
     588            ["children"] =  
     589            { 
     590            }, -- end of ["children"] 
     591            ["type"] = "Button", 
     592            ["theme"] =  
     593            { 
     594                ["base"] = "newButtonTheme", 
     595                ["params"] =  
     596                { 
     597                }, -- end of ["params"] 
     598            }, -- end of ["theme"] 
     599            ["params"] =  
     600            { 
     601                ["enabled"] =  
     602                { 
     603                    [1] = true, 
     604                }, -- end of ["enabled"] 
     605                ["vert_anchor"] =  
     606                { 
     607                    [1] = "top", 
     608                }, -- end of ["vert_anchor"] 
     609                ["bounds"] =  
     610                { 
     611                    [1] = 340, 
     612                    [2] = 460, 
     613                    [3] = 30, 
     614                    [4] = 20, 
     615                }, -- end of ["bounds"] 
     616                ["visible"] =  
     617                { 
     618                    [1] = true, 
     619                }, -- end of ["visible"] 
     620                ["text"] =  
     621                { 
     622                    [1] = "And", 
     623                }, -- end of ["text"] 
     624                ["zindex"] =  
     625                { 
     626                    [1] = 0, 
     627                }, -- end of ["zindex"] 
     628                ["hor_anchor"] =  
     629                { 
     630                    [1] = "left", 
     631                }, -- end of ["hor_anchor"] 
     632            }, -- end of ["params"] 
     633        }, -- end of ["newRuleBtn"] 
     634        ["orRuleBtn"] =  
     635        { 
     636            ["children"] =  
     637            { 
     638            }, -- end of ["children"] 
     639            ["type"] = "Button", 
     640            ["theme"] =  
     641            { 
     642                ["base"] = "newButtonTheme", 
     643                ["params"] =  
     644                { 
     645                }, -- end of ["params"] 
     646            }, -- end of ["theme"] 
     647            ["params"] =  
     648            { 
     649                ["enabled"] =  
     650                { 
     651                    [1] = true, 
     652                }, -- end of ["enabled"] 
     653                ["vert_anchor"] =  
     654                { 
     655                    [1] = "top", 
     656                }, -- end of ["vert_anchor"] 
     657                ["bounds"] =  
     658                { 
     659                    [1] = 370, 
     660                    [2] = 460, 
     661                    [3] = 30, 
     662                    [4] = 20, 
     663                }, -- end of ["bounds"] 
     664                ["visible"] =  
     665                { 
     666                    [1] = true, 
     667                }, -- end of ["visible"] 
     668                ["text"] =  
     669                { 
     670                    [1] = "Or", 
     671                }, -- end of ["text"] 
     672                ["zindex"] =  
     673                { 
     674                    [1] = 0, 
     675                }, -- end of ["zindex"] 
     676                ["hor_anchor"] =  
     677                { 
     678                    [1] = "left", 
     679                }, -- end of ["hor_anchor"] 
     680            }, -- end of ["params"] 
     681        }, -- end of ["newRuleOrBtn"] 
     682        ["stopGroupBtn"] =  
     683        { 
     684            ["children"] =  
     685            { 
     686            }, -- end of ["children"] 
     687            ["type"] = "Button", 
     688            ["theme"] =  
     689            { 
     690                ["base"] = "newButtonTheme", 
     691                ["params"] =  
     692                { 
     693                }, -- end of ["params"] 
     694            }, -- end of ["theme"] 
     695            ["params"] =  
     696            { 
     697                ["enabled"] =  
     698                { 
     699                    [1] = true, 
     700                }, -- end of ["enabled"] 
     701                ["vert_anchor"] =  
     702                { 
     703                    [1] = "top", 
     704                }, -- end of ["vert_anchor"] 
     705                ["bounds"] =  
     706                { 
     707                    [1] = 400, 
     708                    [2] = 460, 
     709                    [3] = 30, 
     710                    [4] = 20, 
     711                }, -- end of ["bounds"] 
     712                ["visible"] =  
     713                { 
     714                    [1] = true, 
     715                }, -- end of ["visible"] 
     716                ["text"] =  
     717                { 
     718                    [1] = " ) ", 
     719                }, -- end of ["text"] 
     720                ["zindex"] =  
     721                { 
     722                    [1] = 0, 
     723                }, -- end of ["zindex"] 
     724                ["hor_anchor"] =  
     725                { 
     726                    [1] = "left", 
     727                }, -- end of ["hor_anchor"] 
     728            }, -- end of ["params"] 
     729        }, -- end of ["stopGroupBtn"] 
     730        ["newRuleBtn"] =  
     731        { 
     732            ["children"] =  
     733            { 
     734            }, -- end of ["children"] 
     735            ["type"] = "Button", 
     736            ["theme"] =  
     737            { 
     738                ["base"] = "newButtonTheme", 
     739                ["params"] =  
     740                { 
     741                }, -- end of ["params"] 
     742            }, -- end of ["theme"] 
     743            ["params"] =  
     744            { 
     745                ["enabled"] =  
     746                { 
     747                    [1] = true, 
     748                }, -- end of ["enabled"] 
     749                ["vert_anchor"] =  
     750                { 
     751                    [1] = "top", 
     752                }, -- end of ["vert_anchor"] 
     753                ["bounds"] =  
     754                { 
     755                    [1] = 435, 
     756                    [2] = 460, 
     757                    [3] = 60, 
     758                    [4] = 20, 
     759                }, -- end of ["bounds"] 
     760                ["visible"] =  
     761                { 
     762                    [1] = true, 
     763                }, -- end of ["visible"] 
     764                ["text"] =  
     765                { 
     766                    [1] = "$new", 
     767                }, -- end of ["text"] 
     768                ["zindex"] =  
     769                { 
     770                    [1] = 0, 
     771                }, -- end of ["zindex"] 
     772                ["hor_anchor"] =  
     773                { 
     774                    [1] = "left", 
     775                }, -- end of ["hor_anchor"] 
     776            }, -- end of ["params"] 
     777        }, -- end of ["newRuleBtn"] 
    537778        ["delRuleBtn"] =  
    538779        { 
     
    562803                    [1] = 500, 
    563804                    [2] = 460, 
    564                     [3] = 90, 
     805                    [3] = 60, 
    565806                    [4] = 20, 
    566807                }, -- end of ["bounds"] 
     
    583824            }, -- end of ["params"] 
    584825        }, -- end of ["delRuleBtn"] 
    585         ["newRuleOrBtn"] =  
    586         { 
    587             ["children"] =  
    588             { 
    589             }, -- end of ["children"] 
    590             ["type"] = "Button", 
    591             ["theme"] =  
    592             { 
    593                 ["base"] = "newButtonTheme", 
    594                 ["params"] =  
    595                 { 
    596                 }, -- end of ["params"] 
    597             }, -- end of ["theme"] 
    598             ["params"] =  
    599             { 
    600                 ["enabled"] =  
    601                 { 
    602                     [1] = true, 
    603                 }, -- end of ["enabled"] 
    604                 ["vert_anchor"] =  
    605                 { 
    606                     [1] = "top", 
    607                 }, -- end of ["vert_anchor"] 
    608                 ["bounds"] =  
    609                 { 
    610                     [1] = 410, 
    611                     [2] = 460, 
    612                     [3] = 90, 
    613                     [4] = 20, 
    614                 }, -- end of ["bounds"] 
    615                 ["visible"] =  
    616                 { 
    617                     [1] = true, 
    618                 }, -- end of ["visible"] 
    619                 ["text"] =  
    620                 { 
    621                     [1] = "NEW OR", 
    622                 }, -- end of ["text"] 
    623                 ["zindex"] =  
    624                 { 
    625                     [1] = 0, 
    626                 }, -- end of ["zindex"] 
    627                 ["hor_anchor"] =  
    628                 { 
    629                     [1] = "left", 
    630                 }, -- end of ["hor_anchor"] 
    631             }, -- end of ["params"] 
    632         }, -- end of ["newRuleOrBtn"] 
     826         
    633827        ["goalTypeCombo"] =  
    634828        { 
     
    10831277            }, -- end of ["params"] 
    10841278        }, -- end of ["widget2"] 
    1085         ["newRuleBtn"] =  
    1086         { 
    1087             ["children"] =  
    1088             { 
    1089             }, -- end of ["children"] 
    1090             ["type"] = "Button", 
    1091             ["theme"] =  
    1092             { 
    1093                 ["base"] = "newButtonTheme", 
    1094                 ["params"] =  
    1095                 { 
    1096                 }, -- end of ["params"] 
    1097             }, -- end of ["theme"] 
    1098             ["params"] =  
    1099             { 
    1100                 ["enabled"] =  
    1101                 { 
    1102                     [1] = true, 
    1103                 }, -- end of ["enabled"] 
    1104                 ["vert_anchor"] =  
    1105                 { 
    1106                     [1] = "top", 
    1107                 }, -- end of ["vert_anchor"] 
    1108                 ["bounds"] =  
    1109                 { 
    1110                     [1] = 310, 
    1111                     [2] = 460, 
    1112                     [3] = 90, 
    1113                     [4] = 20, 
    1114                 }, -- end of ["bounds"] 
    1115                 ["visible"] =  
    1116                 { 
    1117                     [1] = true, 
    1118                 }, -- end of ["visible"] 
    1119                 ["text"] =  
    1120                 { 
    1121                     [1] = "$new", 
    1122                 }, -- end of ["text"] 
    1123                 ["zindex"] =  
    1124                 { 
    1125                     [1] = 0, 
    1126                 }, -- end of ["zindex"] 
    1127                 ["hor_anchor"] =  
    1128                 { 
    1129                     [1] = "left", 
    1130                 }, -- end of ["hor_anchor"] 
    1131             }, -- end of ["params"] 
    1132         }, -- end of ["newRuleBtn"] 
     1279         
    11331280        ["triggerTypeLabel"] =  
    11341281        { 
Note: See TracChangeset for help on using the changeset viewer.