comparison ObjectiveFrame.lua @ 15:f660f1c1e0aa

Objective Widgets - determine completion by fractional value
author Nenue
date Mon, 04 Apr 2016 03:41:28 -0400
parents ed642234f017
children 880828018bf4
comparison
equal deleted inserted replaced
14:ed642234f017 15:f660f1c1e0aa
360 line.title = line.text 360 line.title = line.text
361 else 361 else
362 line.displayText = line.text 362 line.displayText = line.text
363 end 363 end
364 364
365 line.progess = 0 365 line.progress = 0
366 print(' ', line.index,'|cFFFF0088-|r', line.objectiveType, line.text)
366 if line.objectiveType == 'progressbar' then 367 if line.objectiveType == 'progressbar' then
367 print(' |cFFFF0088==|r', line.type, line.text)
368 line.widgetType = 'ProgressBar' 368 line.widgetType = 'ProgressBar'
369 print(' |cFFFF44DDpercent='..tostring(GetQuestProgressBarPercent(info.questID))) 369 print(' |cFFFF44DDpercent='..tostring(GetQuestProgressBarPercent(info.questID)))
370 line.value = GetQuestProgressBarPercent(info.questID) or 0 370 line.value = GetQuestProgressBarPercent(info.questID) or 0
371 line.maxValue = 100 371 line.maxValue = 100
372 if line.value >= line.maxValue then 372 if line.value >= line.maxValue then
374 elseif line.value > 0 then 374 elseif line.value > 0 then
375 line.progress = 2 375 line.progress = 2
376 end 376 end
377 line.format = PERCENTAGE_STRING 377 line.format = PERCENTAGE_STRING
378 line.widget = mod.SetWidget(line, info, 'ProgressBar', info.questID..'-'..line.index) 378 line.widget = mod.SetWidget(line, info, 'ProgressBar', info.questID..'-'..line.index)
379 print('line.type =', line.type) 379 print(' ** text:', line.text, 'value:', line.value, 'max:', line.maxValue)
380 print(' ** qtyStr:', line.quantityString, 'qty:', line.value, 'assetID:', line.questID)
381 else 380 else
382 line.widget = nil 381 line.widget = nil
383 end 382 end
384 end 383 end
385 384