public
Description: WoW Powerleveling addon
Homepage: http://www.tekkub.net/
Clone URL: git://github.com/tekkub/tourguide.git
Click here to lend your support to: tourguide and make a donation at www.pledgie.com !
tourguide / Config.lua
100644 61 lines (47 sloc) 2.792 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
local TourGuide = TourGuide
local GAP = 8
local tekcheck = LibStub("tekKonfig-Checkbox")
 
 
local frame = CreateFrame("Frame", nil, UIParent)
TourGuide.configpanel = frame
frame.name = "Tour Guide"
frame:Hide()
frame:SetScript("OnShow", function()
  local title, subtitle = LibStub("tekKonfig-Heading").new(frame, "Tour Guide", "These settings are saved on a per-char basis.")
 
  local qtrack = tekcheck.new(frame, nil, "Automatically track quests", "TOPLEFT", subtitle, "BOTTOMLEFT", -2, -GAP)
  qtrack.tiptext = "Automatically toggle the default quest tracker for current 'complete quest' objectives."
  local checksound = qtrack:GetScript("OnClick")
  qtrack:SetScript("OnClick", function(self) checksound(self); TourGuide.db.char.trackquests = not TourGuide.db.char.trackquests end)
  qtrack:SetChecked(TourGuide.db.char.trackquests)
 
  local mapnotecoords = tekcheck.new(frame, nil, "Map note coords", "TOPLEFT", qtrack, "BOTTOMLEFT", 0, -GAP)
  mapnotecoords.tiptext = "Map coordinates found in tooltip notes (requires TomTom)."
  mapnotecoords:SetScript("OnClick", function(self) checksound(self); TourGuide.db.char.mapnotecoords = not TourGuide.db.char.mapnotecoords end)
  mapnotecoords:SetChecked(TourGuide.db.char.mapnotecoords)
 
  local mapquestgivers = tekcheck.new(frame, nil, "Automatically map questgivers", "TOPLEFT", mapnotecoords, "BOTTOMLEFT", 0, -GAP)
  mapquestgivers.tiptext = "Automatically map questgivers for accept and turnin objectives (requires LightHeaded and TomTom)."
  mapquestgivers:SetChecked(TourGuide.db.char.mapquestgivers)
 
  local mapquestgivernotes, mapquestgivernoteslabel = tekcheck.new(frame, nil, "Always map coords from notes", "TOPLEFT", mapquestgivers, "BOTTOMLEFT", GAP*2, -GAP)
  mapquestgivernotes.tiptext = "Map note coords even when LightHeaded provides coords."
  mapquestgivernotes:SetScript("OnClick", function(self) checksound(self); TourGuide.db.char.alwaysmapnotecoords = not TourGuide.db.char.alwaysmapnotecoords end)
  mapquestgivernotes:SetChecked(TourGuide.db.char.alwaysmapnotecoords)
  if TourGuide.db.char.mapquestgivers then
    mapquestgivernotes:Enable()
    mapquestgivernoteslabel:SetFontObject(GameFontHighlight)
  else
    mapquestgivernotes:Disable()
    mapquestgivernoteslabel:SetFontObject(GameFontDisable)
  end
 
  mapquestgivers:SetScript("OnClick", function(self)
    checksound(self)
    TourGuide.db.char.mapquestgivers = not TourGuide.db.char.mapquestgivers
    if TourGuide.db.char.mapquestgivers then
      mapquestgivernotes:Enable()
      mapquestgivernoteslabel:SetFontObject(GameFontHighlight)
    else
      mapquestgivernotes:Disable()
      mapquestgivernoteslabel:SetFontObject(GameFontDisable)
    end
  end)
 
  frame:SetScript("OnShow", nil)
end)
 
InterfaceOptions_AddCategory(frame)
 
 
LibStub("tekKonfig-AboutPanel").new("Tour Guide", "TourGuide")