Mercurial > wow > ouroloot
comparison gui.lua @ 10:67b8537e8432
More work on ML/EQDKP generator and its spawned subprojects.
author | Farmbuyer of US-Kilrogg <farmbuyer@gmail.com> |
---|---|
date | Tue, 28 Jun 2011 07:36:26 +0000 |
parents | 4fba9c6b5d3d |
children | 952c3ac0e783 |
comparison
equal
deleted
inserted
replaced
9:4fba9c6b5d3d | 10:67b8537e8432 |
---|---|
89 -- Can do clever things by passing other halting points as zero | 89 -- Can do clever things by passing other halting points as zero |
90 function addon:zero_printed_fenceposts(zero) | 90 function addon:zero_printed_fenceposts(zero) |
91 for t in pairs(text_gen_funcs) do | 91 for t in pairs(text_gen_funcs) do |
92 g_loot.printed[t] = zero or g_loot.printed[t] or 0 | 92 g_loot.printed[t] = zero or g_loot.printed[t] or 0 |
93 end | 93 end |
94 end | |
95 | |
96 function addon:registered_textgen_iter() | |
97 return pairs(text_gen_funcs) | |
94 end | 98 end |
95 | 99 |
96 -- This function is called during load, so be careful! | 100 -- This function is called during load, so be careful! |
97 function addon:register_text_generator (text_type, title, description, generator, opt_specgen) | 101 function addon:register_text_generator (text_type, title, description, generator, opt_specgen) |
98 if type(generator) ~= 'function' then | 102 if type(generator) ~= 'function' then |
1398 w:SetValue(v) | 1402 w:SetValue(v) |
1399 w:SetCallback("OnValueChanged", function(_w,event,value) addon.debug[d] = value end) | 1403 w:SetCallback("OnValueChanged", function(_w,event,value) addon.debug[d] = value end) |
1400 simple:AddChild(w) | 1404 simple:AddChild(w) |
1401 end | 1405 end |
1402 grp:AddChild(simple) | 1406 grp:AddChild(simple) |
1407 | |
1408 simple = GUI:Create("SimpleGroup") | |
1409 simple:SetLayout("Flow") | |
1410 simple:SetRelativeWidth(0.85) | |
1411 w = mkbutton("MidS-H", [[not exactly an Easter egg, with sound]]) | |
1412 w:SetRelativeWidth(0.15) | |
1413 w:SetCallback("OnClick", function() | |
1414 PlaySoundFile[[Sound\Music\WorldEvents\HordeFirepole.mp3]] | |
1415 end) | |
1416 simple:AddChild(w) | |
1417 w = mkbutton("MidS-A", [[not exactly an Easter egg, with sound]]) | |
1418 w:SetRelativeWidth(0.15) | |
1419 w:SetCallback("OnClick", function() | |
1420 PlaySoundFile[[Sound\Music\WorldEvents\AllianceFirepole.mp3]] | |
1421 end) | |
1422 simple:AddChild(w) | |
1423 grp:AddChild(simple) | |
1424 | |
1403 grp:ResumeLayout() | 1425 grp:ResumeLayout() |
1404 | |
1405 container:AddChild(grp) | 1426 container:AddChild(grp) |
1406 GUI:ClearFocus() | 1427 GUI:ClearFocus() |
1407 end | 1428 end |
1408 | 1429 |
1409 -- Initial lower panel function | 1430 -- Initial lower panel function |
1435 grp = GUI:Create("InlineGroup") | 1456 grp = GUI:Create("InlineGroup") |
1436 grp:SetLayout("Flow") | 1457 grp:SetLayout("Flow") |
1437 grp:SetFullWidth(true) | 1458 grp:SetFullWidth(true) |
1438 grp:SetTitle("User Options [these are saved across sessions]") | 1459 grp:SetTitle("User Options [these are saved across sessions]") |
1439 | 1460 |
1461 -- The relative width fields used to be done to take up less vertical space, but | |
1462 -- that turned out to look messy. Now they're just a straight line for the most part. | |
1463 | |
1440 -- reminder popup | 1464 -- reminder popup |
1441 w = mkoption ('popup_on_join', "Show reminder popup", 0.35, | 1465 w = mkoption ('popup_on_join', "Show reminder popup", 0.95, |
1442 [[When joining a raid and not already tracking, display a dialog asking for instructions.]]) | 1466 [[When joining a raid and not already tracking, display a dialog asking for instructions.]]) |
1443 grp:AddChild(w) | 1467 grp:AddChild(w) |
1444 | 1468 |
1445 -- toggle scroll-to-bottom on first tab | 1469 -- toggle scroll-to-bottom on first tab |
1446 w = mkoption('scroll_to_bottom', "Scroll to bottom when opening display", 0.60, | 1470 w = mkoption('scroll_to_bottom', "Scroll to bottom when opening display", 0.95, |
1447 [[Scroll to the bottom of the loot window (most recent entries) when displaying the GUI.]]) | 1471 [[Scroll to the bottom of the loot window (most recent entries) when displaying the GUI.]]) |
1448 grp:AddChild(w) | 1472 grp:AddChild(w) |
1449 | 1473 |
1450 -- /loot option | 1474 -- /loot option |
1451 w = mkoption('register_slashloot', "Register /loot slash command on login", 0.45, | 1475 w = mkoption('register_slashloot', "Register /loot slash command on login", 0.95, |
1452 [[Register "/loot" as a slash command in addition to the normal "/ouroloot". Relog to take effect.]]) | 1476 [[Register "/loot" as a slash command in addition to the normal "/ouroloot". Relog to take effect.]]) |
1453 grp:AddChild(w) | 1477 grp:AddChild(w) |
1454 | 1478 |
1455 -- chatty mode | 1479 -- chatty mode |
1456 w = mkoption('chatty_on_kill', "Be chatty on boss kill", 0.30, | 1480 w = mkoption('chatty_on_kill', "Be chatty on boss kill", 0.95, |
1457 [[Print something to chat output when DBM tells Ouro Loot about a successful boss kill.]]) | 1481 [[Print something to chat output when DBM tells Ouro Loot about a successful boss kill.]]) |
1458 grp:AddChild(w) | 1482 grp:AddChild(w) |
1459 | 1483 |
1460 -- less noise in main panel | 1484 -- less noise in main panel |
1461 w = mkoption('no_tracking_wipes', "Do not track wipes", 0.25, | 1485 w = mkoption('no_tracking_wipes', "Do not track wipes", 0.95, |
1462 [[Do not add 'wipe' entries on the main loot grid, or generate any text for them.]]) | 1486 [[Do not add 'wipe' entries on the main loot grid, or generate any text for them.]]) |
1463 grp:AddChild(w) | 1487 grp:AddChild(w) |
1464 | 1488 |
1465 -- cutesy abbrevs | 1489 -- cutesy abbrevs |
1466 w = mkoption('snarky_boss', "Use snarky boss names", 0.35, | 1490 w = mkoption('snarky_boss', "Use snarky boss names", 0.95, |
1467 [[Irreverent replacement names for boss events.]]) | 1491 [[Irreverent replacement names for boss events.]]) |
1468 grp:AddChild(w) | 1492 grp:AddChild(w) |
1469 | 1493 |
1470 -- possible keybindings | 1494 -- possible keybindings |
1471 do | 1495 do |
1472 local pair = GUI:Create("SimpleGroup") | 1496 local pair = GUI:Create("SimpleGroup") |
1473 pair:SetLayout("Flow") | 1497 pair:SetLayout("Flow") |
1474 pair:SetRelativeWidth(0.6) | 1498 pair:SetRelativeWidth(0.95) |
1475 local editbox, checkbox | 1499 local editbox, checkbox |
1476 editbox = mkbutton("EditBox", nil, OuroLootSV_opts.keybinding_text, | 1500 editbox = mkbutton("EditBox", nil, OuroLootSV_opts.keybinding_text, |
1477 [[Keybinding text format is fragile! Relog to take effect.]]) | 1501 [[Keybinding text format is fragile! Relog to take effect.]]) |
1478 editbox:SetRelativeWidth(0.5) | 1502 editbox:SetRelativeWidth(0.5) |
1479 editbox:SetLabel("Keybinding text") | 1503 editbox:SetLabel("Keybinding text") |