diff --git a/MiniMap.xml b/MiniMap.xml index 01901aa..ff6e279 100644 --- a/MiniMap.xml +++ b/MiniMap.xml @@ -6,6 +6,7 @@ - + + --> \ No newline at end of file diff --git a/Notes.lua b/Notes.lua index 8bd3753..83e793f 100644 --- a/Notes.lua +++ b/Notes.lua @@ -6,7 +6,7 @@ local items = {} local listFrame, formFrame; -- local functions -local formatLocation, dump, sort, getPage, delete, edit, save, createForm, createList, getCoords +local formatLocation, dump, sort, getPage, delete, edit, save, createForm, createList vm.Notes = { display = function() @@ -40,13 +40,17 @@ end function getPage(page) local notesCount = getn(VadeMecum_Notes) pagesCount = ceil(notesCount / rowsPerPage) - + pagesCount = pagesCount == 0 and 1 or pagesCount + print('pagesCount', pagesCount) if (page < 1) or (page > pagesCount) then return end + print('page', page) for i = 1, rowsPerPage do local ii = rowsPerPage * (page - 1) + i + print('ii', ii) if ii > notesCount then + print('hide', ii) items[i].row:Hide() else items[i].row:Show() @@ -124,15 +128,15 @@ function createForm() -- --- local cont = CreateFrame("Frame", nil, formFrame) - cont:SetSize(formFrame:GetWidth() - 20, 200) - cont:SetPoint("TOPLEFT", 10, -40) + cont:SetSize(formFrame:GetWidth() - 20, 250) + cont:SetPoint("TOPLEFT", 10, -10) cont:SetBackdrop(backDrop) cont:SetBackdropColor(0, 0, 0, 0.5) -- --- local scroll = CreateFrame("ScrollFrame", "VadeMecum_Form_Scroll", cont, "UIPanelScrollFrameTemplate") - scroll:SetSize(cont:GetWidth() - 40 , 180) + scroll:SetSize(cont:GetWidth() - 40 , 230) scroll:SetPoint("TOPLEFT", 10, -10) -- --- @@ -155,21 +159,6 @@ function createForm() VadeMecum_Form_Scroll:SetVerticalScroll(h - hs) end end) --- --- - - local t = formFrame:CreateFontString("VadeMecum_Form_Coords", "OVERLAY", "GameFontNormal") - t:SetPoint("TOPLEFT", 10, -10) - --- --- - - local rb = CreateFrame("Button","VadeMecum_Edit_Refresh", formFrame, "UIPanelButtonTemplate") - rb:SetHeight(24) - rb:SetWidth(60) - rb:SetPoint("TOPRIGHT", -10, -5) - rb:SetText("Refresh") - rb:SetScript("OnClick", function() - getCoords() - end) -- --- @@ -312,10 +301,3 @@ function formatLocation(continent, zone) local zoneNames , key, val = { GetMapZones(continent)} return continentNames[continent] .. ', ' .. zoneNames[zone] end - --- +++ - -function getCoords() - local posX, posY = GetPlayerMapPosition("player") - VadeMecum_Form_Coords:SetText(shwcrd(posX) .. " / " .. shwcrd(posY)); -end diff --git a/WorldMap.xml b/WorldMap.xml index 663e2f1..8692f7b 100644 --- a/WorldMap.xml +++ b/WorldMap.xml @@ -23,7 +23,7 @@ - + diff --git a/vm.lua b/vm.lua index 381ea2b..633e8d8 100644 --- a/vm.lua +++ b/vm.lua @@ -23,6 +23,7 @@ function init () vm.Astrolabe = DongleStub("Astrolabe-0.4") vm.MiniMap.display() print(addonName .. " Loaded. Type /vm for notes list") + end -- +++