• 0

    posted a message on Need some help.
    Oh I did mean to takes those out, and just use mostly default files. However the background that I am using I have created it via screen cap from the start window, as I haven't been able to find it in the available game art. I will re-upload a new zip file now.

    http://www.curseforge.com/media/files/719/642/MapandNav.zip
    Posted in: Need Help?
  • 0

    posted a message on Need some help.
    Im getting a bug that I cant work out. When I first open the addon the scroll frames appear to be working fine, however on subsequent openings there is a bug with the scroll frames. Can someone help me with this. I have uploaded the addon http://www.curseforge.com/media/files/719/159/MapandNav.zip




    Main.lua
    -- -- -- -- -- MapandNavStartMenu -- -- -- -- --
    local frame = CreateFrame("Frame","MapandNavStartMenu" ,UIParent)
    frame:SetWidth(500) -- Set these to whatever height/width is needed 
    frame:SetHeight(300) -- for your Texture
    
    local frametexture = frame:CreateTexture(nil,"BACKGROUND")
    frametexture:SetTexture("Interface\\AddOns\\MapandNav\\Art\\Background.tga")
    frametexture:SetAllPoints(frame)
    frame.texture = frametexture
    frame:SetPoint("CENTER",0,0)
    frame:Hide()
    frame:SetScript("OnKeyDown", 
    							function(self, Escape, ...)				
    							MapandNavStartMenu:Hide()							
    							MapandNavFindscrollparentframe:Hide()
    							MapandNavscrollframe:Hide()
    							MapandNavcontentframe:Hide()
    							MapandNavFindtabelperantframe:Hide()
    							MapandNavFindtabelperantframe:SetParent(nil)
    							MapandNavCitySelecttabelperantframe:Hide()
    							MapandNavCitySelecttabelperantframe:SetParent(nil)
    							end) 
    							
    -- -- -- -- -- MapandNavStartButton -- -- -- -- --
    local button = CreateFrame("Button", "MapandNavStartButton", UIParent, "UIPanelButtonTemplate")
    button:SetText("Start")
    button:SetPoint("TOP",0,0)
    button:SetWidth(120)
    button:SetHeight(50)
    button:RegisterForClicks("AnyUp")
    button:SetScript("OnClick", 
    				function (self, button, down)
    				if 
    				MapandNavStartMenu:IsVisible() 
    				then 
    				MapandNavStartMenu:Hide()
    
    				else
    				MapandNavStartMenu:Show()
    				MapandNavFindButton:Show()
    				MapandNavExploreButton:Show()
    				end
    				end)
    
    -- -- -- -- -- MapandNavStartCloseButton -- -- -- -- --
    local button = CreateFrame("button", "MapandNavStartCloseButton", MapandNavStartMenu, "UIPanelCloseButton")
    button:SetPoint("TOPRight",-15,-25)
    button:SetWidth(40)
    button:SetHeight(40)
    button:RegisterForClicks("AnyUp")
    button:SetScript("OnClick", 
    				function (self, button, down)				
    							MapandNavStartMenu:Hide()							
    							MapandNavFindscrollparentframe:Hide()
    							MapandNavscrollframe:Hide()
    							MapandNavcontentframe:Hide()
    							MapandNavFindtabelperantframe:Hide()
    							MapandNavFindtabelperantframe:SetParent(nil)
    							MapandNavCitySelecttabelperantframe:Hide()
    							MapandNavCitySelecttabelperantframe:SetParent(nil)				
    				end)
    				
    -- -- -- -- -- MapandNavFindButton -- -- -- -- --
    local button = CreateFrame("Button", "MapandNavFindButton", MapandNavStartMenu, "UIPanelButtonTemplate")
    button:SetText("Find")
    button:SetPoint("LEFT", 50,0)
    button:SetWidth(180)
    button:SetHeight(180)
    button:RegisterForClicks("AnyUp")
    button:SetScript("OnClick", 
    				function (self, button, down)
    				MapandNavExploreButton:Hide()
    				MapandNavFindButton:Hide()
    				MapandNavFindscrollparentframe:Show()
    				MapandNavFindtabelperantframe:Show()
    				MapandNavscrollframe:Show()
    				MapandNavcontentframe:Show()
    				
    				end)
    				
    -- -- -- -- -- MapandNavExploreButton -- -- -- -- --
    local button = CreateFrame("Button", "MapandNavExploreButton", MapandNavStartMenu, "UIPanelButtonTemplate")
    button:SetText("Explore")
    button:SetPoint("RIGHT", -50,0)
    button:SetWidth(180)
    button:SetHeight(180)
    button:RegisterForClicks("AnyUp")
    button:SetScript("OnClick", 
    				function (self, button, down)
    				MapandNavExploreButton:Hide()
    
    				MapandNavFindButton:Hide()
    
    				end)
    
    
    
    


    Find.lua
    --parent frame 
    local frame = CreateFrame("Frame", "MapandNavFindscrollparentframe", MapandNavStartMenu) 
    frame:Hide()
    frame:SetSize(400, 200) 
    frame:SetPoint("CENTER", MapandNavStartMenu, "CENTER", 0,0) 
    local texture = frame:CreateTexture() 
    texture:SetAllPoints() 
    texture:SetTexture(0,0,0,0) 
    frame.background = texture 
    
    --scrollframe 
    scrollframe = CreateFrame("ScrollFrame", "MapandNavscrollframe", frame) 
    scrollframe:SetPoint("TOPLEFT", 0,0) 
    scrollframe:SetPoint("BOTTOMRIGHT", 0,0) 
    local texture = scrollframe:CreateTexture() 
    texture:SetAllPoints() 
    texture:SetTexture(0,0,0,0) 
    frame.scrollframe = scrollframe 
    
    --scrollbar 
    scrollbar = CreateFrame("Slider", nil, scrollframe, "UIPanelScrollBarTemplate") 
    scrollbar:SetPoint("TOPLEFT", frame, "TOPRIGHT", 6, -22) 
    scrollbar:SetPoint("BOTTOMLEFT", frame, "BOTTOMRIGHT", 0,2) 
    scrollbar:SetMinMaxValues(1, 200) --How Far the Bar Goes Down and Moves the Frame
    scrollbar:SetValueStep(1) 
    scrollbar.scrollStep = 1 
    scrollbar:SetValue(0) 
    scrollbar:SetWidth(16)
     
    scrollbar:SetScript("OnValueChanged", 
    function (self, value) 
    self:GetParent():SetVerticalScroll(value) 
    end) 
    local scrollbg = scrollbar:CreateTexture(nil, "BACKGROUND") 
    scrollbg:SetAllPoints(scrollbar) 
    scrollbg:SetTexture(0, 0, 0, 0.4) 
    frame.scrollbar = scrollbar 
    
    --content frame 
    local content = CreateFrame("Frame", "MapandNavcontentframe", MapandNavscrollframe) 
    content:SetSize(500, 300) 
    
    
    --local texture = content:CreateTexture() 
    --texture:SetAllPoints() 
    --texture:SetTexture("Interface\\GLUES\\MainMenu\\Glues-BlizzardLogo") 
    --content.texture = texture 
    
    scrollframe.content = content 
     
    scrollframe:SetScrollChild(content)
    
    -- Table describing the buttons you want to create:
    local buttonData = {
    	{
    		text = "Auction House",
    		click = function(self, mouseButton)
    			print("FindTableOptionsLEFT1")
    			MapandNavFindtabelperantframe:Hide()
    			MapandNavFindtabelperantframe:SetParent(nil)
    			MapandNavCitySelecttabelperantframe:Show()
    			
    			
    		end,
    	},
    	{
    		text = "Bank",
    		click = function(self, mouseButton)
    			print("FindTableOptionsLEFT2")
    		end,
    	},
    	{
    		text = "Barber",
    		click = function(self, mouseButton)
    			print("FindTableOptionsLEFT3")
    		end,
    	},
    	{
    		text = "Battle Pet Trainer",
    		click = function(self, mouseButton)
    			print("FindTableOptionsLEFT4")
    		end,
    	},
    	{
    		text = "Class Trainer",
    		click = function(self, mouseButton)
    			print("FindTableOptionsLEFT5")
    		end,
    	},
    		{
    		text = "Flight Master",
    		click = function(self, mouseButton)
    			print("FindTableOptionsLEFT6")
    		end,
    	},
    	{
    		text = "Guild Master",
    		click = function(self, mouseButton)
    			print("FindTableOptionsLEFT7")
    		end,
    	},
    	{
    		text = "Guild Vendor",
    		click = function(self, mouseButton)
    			print("FindTableOptionsLEFT8")
    		end,
    	},
    	{
    		text = "Inn",
    		click = function(self, mouseButton)
    			print("FindTableOptionsLEFT9")
    		end,
    	},
    	{
    		text = "Mailbox",
    		click = function(self, mouseButton)
    			print("FindTableOptionsRIGHT1")
    		end,
    	},
    	{
    		text = "Points of Interest",
    		click = function(self, mouseButton)
    			print("FindTableOptionsRIGHT2")
    		end,
    	},
    	{
    		text = "Portals",
    		click = function(self, mouseButton)
    			print("FindTableOptionsRIGHT3")
    		end,
    	},
    	{
    		text = "Profession Trainer",
    		click = function(self, mouseButton)
    			print("FindTableOptionsRIGHT4")
    		end,
    	},
    	{
    		text = "Reforge",
    		click = function(self, mouseButton)
    			print("FindTableOptionsRIGHT5")
    		end,
    	},
    	{
    		text = "Stable Master",
    		click = function(self, mouseButton)
    			print("FindTableOptionsRIGHT6")
    		end,
    	},
    	{
    		text = "Transmogrification",
    		click = function(self, mouseButton)
    			print("FindTableOptionsRIGHT7")
    		end,
    	},
    	{
    		text = "Vendor",
    		click = function(self, mouseButton)
    			print("FindTableOptionsRIGHT8")
    		end,
    	},
    	{
    		text = "Void Storage",
    		click = function(self, mouseButton)
    			print("FindTableOptionsRIGHT9")
    		end,
    	},
    }
    
    -- Table to hold the actual button objects:
    local buttons = {}
    
    -- Create the container frame:
    local frame = CreateFrame("Frame", "MapandNavFindtabelperantframe", MapandNavcontentframe)
    frame:Hide()
    frame:SetPoint("TOPLEFT", MapandNavcontentframe, 0, 0)
    frame:SetSize(200, 20)
    
    -- Give it a background:
    local backdrop = frame:CreateTexture(nil, "BACKDROP")
    backdrop:SetAllPoints(true)
    backdrop:SetTexture(0, 0, 0, 0)
    
    -- Loop over the data list:
    for i = 1, 9 do -- For all button data use for i = 1, #buttonData do
    	-- For each entry, create a button:
    	local button = CreateFrame("Button", "FindTableOptionsLEFT"..i, frame, "UIPanelButtonTemplate")
    	button:SetWidth(200)
    	button:SetHeight(40)
    
    	-- Add the button to the table:
    	buttons[i] = button
    
    	-- Attach the data for later reference:
    	button.data = buttonData[i]
    
    	-- Set the button's text based on the data:
    	button:SetText(button.data.text)
    	-- Set the OnClick script based on the data:
    	button:SetScript("OnClick", button.data.click)
    
    	-- If this is the first button...
    	if i == 1 then
    		-- ...anchor the button to the container:
    		button:SetPoint("TOP", frame, "BOTTOM", 0, 20)
    	else
    		-- ...otherwise, anchor it to the previous button:
    		button:SetPoint("TOP", buttons[i-1], "BOTTOM", 0, -5)
    	end
    end
    
    -- Loop over the data list:
    for i = 10, 18 do -- For all button data use for i = 1, #buttonData do
    	-- For each entry, create a button:
    	local button = CreateFrame("Button", "FindTableOptionsRIGHT"..i, frame, "UIPanelButtonTemplate")
    	button:SetWidth(200)
    	button:SetHeight(40)
    
    	-- Add the button to the table:
    	buttons[i] = button
    
    	-- Attach the data for later reference:
    	button.data = buttonData[i]
    
    	-- Set the button's text based on the data:
    	button:SetText(button.data.text)
    	-- Set the OnClick script based on the data:
    	button:SetScript("OnClick", button.data.click)
    
    	-- If this is the first button...
    	if i == 10 then
    		-- ...anchor the button to the container:
    		button:SetPoint("TOPLEFT", frame, "BOTTOM", 100, 20)
    	else
    		-- ...otherwise, anchor it to the previous button:
    		button:SetPoint("TOP", buttons[i-1], "BOTTOM", 0, -5)
    	end
    end
    
    
    -- Now your "buttons" table looks like this:
    -- buttons = {
    -- 	[1] = <button object named "MyButton1">,
    -- 	[2] = <button object named "MyButton2">,
    -- }
    
    -- Table describing the buttons you want to create:
    local buttonData = {
    	{
    		text = "Dalaran",
    		click = function(self, mouseButton)
    			print("FindTableOptionsLEFT1")
    			
    		end,
    	},
    	{
    		text = "Darnassus",
    		click = function(self, mouseButton)
    			print("FindTableOptionsLEFT2")
    			
    		end,
    	},
    	{
    		text = "Exodar",
    		click = function(self, mouseButton)
    			print("FindTableOptionsLEFT3")
    			
    		end,
    	},
    	{
    		text = "Ironforge",
    		click = function(self, mouseButton)
    			print("FindTableOptionsLEFT4")
    			
    		end,
    	},
    	{
    		text = "Orgrimmar",
    		click = function(self, mouseButton)
    			print("FindTableOptionsLEFT5")
    			
    		end,
    	},
    	{
    		text = "Shattrath City",
    		click = function(self, mouseButton)
    			print("FindTableOptionsLEFT6")
    			
    		end,
    	},
    	{
    		text = "Shrine of Seven Stars",
    		click = function(self, mouseButton)
    			print("FindTableOptionsRIGHT1")
    			
    		end,
    	},
    	{
    		text = "Shrine of Two Moons",
    		click = function(self, mouseButton)
    			print("FindTableOptionsRIGHT2")
    			
    		end,
    	},
    	{
    		text = "Silvermoon City",
    		click = function(self, mouseButton)
    			print("FindTableOptionsRIGHT3")
    			
    		end,
    	},
    	{
    		text = "Stormwind City",
    		click = function(self, mouseButton)
    			print("FindTableOptionsRIGHT4")
    			
    		end,
    	},
    	{
    		text = "Thunder Bluff",
    		click = function(self, mouseButton)
    			print("FindTableOptionsRIGHT5")
    			
    		end,
    	},
    	{
    		text = "Undercity",
    		click = function(self, mouseButton)
    			print("FindTableOptionsRIGHT6")
    			
    		end,
    	},
    }
    
    
    -- Table to hold the actual button objects:
    local buttons = {}
    
    -- Create the container frame:
    local frame = CreateFrame("Frame", "MapandNavCitySelecttabelperantframe", MapandNavcontentframe)
    frame:Hide()
    frame:SetPoint("TOPLEFT", MapandNavcontentframe, 0, 0)
    frame:SetSize(200, 20)
    
    -- Give it a background:
    local backdrop = frame:CreateTexture(nil, "BACKDROP")
    backdrop:SetAllPoints(true)
    backdrop:SetTexture(0, 0, 0, 0)
    
    -- Loop over the data list:
    for i = 1, 6 do -- For all button data use for i = 1, #buttonData do
    	-- For each entry, create a button:
    	local button = CreateFrame("Button", "FindTableOptionsLEFT"..i, frame, "UIPanelButtonTemplate")
    	button:SetWidth(200)
    	button:SetHeight(40)
    
    	-- Add the button to the table:
    	buttons[i] = button
    
    	-- Attach the data for later reference:
    	button.data = buttonData[i]
    
    	-- Set the button's text based on the data:
    	button:SetText(button.data.text)
    	-- Set the OnClick script based on the data:
    	button:SetScript("OnClick", button.data.click)
    
    	-- If this is the first button...
    	if i == 1 then
    		-- ...anchor the button to the container:
    		button:SetPoint("TOP", frame, "BOTTOM", 0, 20)
    	else
    		-- ...otherwise, anchor it to the previous button:
    		button:SetPoint("TOP", buttons[i-1], "BOTTOM", 0, -5)
    	end
    end
    
    -- Loop over the data list:
    for i = 7, 12 do -- For all button data use for i = 1, #buttonData do
    	-- For each entry, create a button:
    	local button = CreateFrame("Button", "FindTableOptionsRIGHT"..i, frame, "UIPanelButtonTemplate")
    	button:SetWidth(200)
    	button:SetHeight(40)
    
    	-- Add the button to the table:
    	buttons[i] = button
    
    	-- Attach the data for later reference:
    	button.data = buttonData[i]
    
    	-- Set the button's text based on the data:
    	button:SetText(button.data.text)
    	-- Set the OnClick script based on the data:
    	button:SetScript("OnClick", button.data.click)
    
    	-- If this is the first button...
    	if i == 10 then
    		-- ...anchor the button to the container:
    		button:SetPoint("TOPLEFT", frame, "BOTTOM", 100, 20)
    	else
    		-- ...otherwise, anchor it to the previous button:
    		button:SetPoint("TOP", buttons[i-1], "BOTTOM", 0, -5)
    	end
    end
    
    
    -- Now your "buttons" table looks like this:
    -- buttons = {
    -- 	[1] = <button object named "MyButton1">,
    -- 	[2] = <button object named "MyButton2">,
    -- }
    


    CitySelect.lua
    -- Table describing the buttons you want to create:
    local buttonData = {
    	{
    		text = "Dalaran",
    		click = function(self, mouseButton)
    			print("FindTableOptionsLEFT1")
    			
    		end,
    	},
    	{
    		text = "Darnassus",
    		click = function(self, mouseButton)
    			print("FindTableOptionsLEFT2")
    			
    		end,
    	},
    	{
    		text = "Exodar",
    		click = function(self, mouseButton)
    			print("FindTableOptionsLEFT3")
    			
    		end,
    	},
    	{
    		text = "Ironforge",
    		click = function(self, mouseButton)
    			print("FindTableOptionsLEFT4")
    			
    		end,
    	},
    	{
    		text = "Orgrimmar",
    		click = function(self, mouseButton)
    			print("FindTableOptionsLEFT5")
    			
    		end,
    	},
    	{
    		text = "Shattrath City",
    		click = function(self, mouseButton)
    			print("FindTableOptionsLEFT6")
    			
    		end,
    	},
    	{
    		text = "Shrine of Seven Stars",
    		click = function(self, mouseButton)
    			print("FindTableOptionsRIGHT1")
    			
    		end,
    	},
    	{
    		text = "Shrine of Two Moons",
    		click = function(self, mouseButton)
    			print("FindTableOptionsRIGHT2")
    			
    		end,
    	},
    	{
    		text = "Silvermoon City",
    		click = function(self, mouseButton)
    			print("FindTableOptionsRIGHT3")
    			
    		end,
    	},
    	{
    		text = "Stormwind City",
    		click = function(self, mouseButton)
    			print("FindTableOptionsRIGHT4")
    			
    		end,
    	},
    	{
    		text = "Thunder Bluff",
    		click = function(self, mouseButton)
    			print("FindTableOptionsRIGHT5")
    			
    		end,
    	},
    	{
    		text = "Undercity",
    		click = function(self, mouseButton)
    			print("FindTableOptionsRIGHT6")
    			
    		end,
    	},
    }
    
    
    -- Table to hold the actual button objects:
    local buttons = {}
    
    -- Create the container frame:
    local frame = CreateFrame("Frame", "MapandNavCitySelecttabelperantframe", MapandNavcontentframe)
    frame:Hide()
    frame:SetPoint("TOPLEFT", MapandNavcontentframe, 0, 0)
    frame:SetSize(200, 20)
    
    -- Give it a background:
    local backdrop = frame:CreateTexture(nil, "BACKDROP")
    backdrop:SetAllPoints(true)
    backdrop:SetTexture(0, 0, 0, 0)
    
    -- Loop over the data list:
    for i = 1, 6 do -- For all button data use for i = 1, #buttonData do
    	-- For each entry, create a button:
    	local button = CreateFrame("Button", "FindTableOptionsLEFT"..i, frame, "UIPanelButtonTemplate")
    	button:SetWidth(200)
    	button:SetHeight(40)
    
    	-- Add the button to the table:
    	buttons[i] = button
    
    	-- Attach the data for later reference:
    	button.data = buttonData[i]
    
    	-- Set the button's text based on the data:
    	button:SetText(button.data.text)
    	-- Set the OnClick script based on the data:
    	button:SetScript("OnClick", button.data.click)
    
    	-- If this is the first button...
    	if i == 1 then
    		-- ...anchor the button to the container:
    		button:SetPoint("TOP", frame, "BOTTOM", 0, 20)
    	else
    		-- ...otherwise, anchor it to the previous button:
    		button:SetPoint("TOP", buttons[i-1], "BOTTOM", 0, -5)
    	end
    end
    
    -- Loop over the data list:
    for i = 7, 12 do -- For all button data use for i = 1, #buttonData do
    	-- For each entry, create a button:
    	local button = CreateFrame("Button", "FindTableOptionsRIGHT"..i, frame, "UIPanelButtonTemplate")
    	button:SetWidth(200)
    	button:SetHeight(40)
    
    	-- Add the button to the table:
    	buttons[i] = button
    
    	-- Attach the data for later reference:
    	button.data = buttonData[i]
    
    	-- Set the button's text based on the data:
    	button:SetText(button.data.text)
    	-- Set the OnClick script based on the data:
    	button:SetScript("OnClick", button.data.click)
    
    	-- If this is the first button...
    	if i == 10 then
    		-- ...anchor the button to the container:
    		button:SetPoint("TOPLEFT", frame, "BOTTOM", 100, 20)
    	else
    		-- ...otherwise, anchor it to the previous button:
    		button:SetPoint("TOP", buttons[i-1], "BOTTOM", 0, -5)
    	end
    end
    
    
    -- Now your "buttons" table looks like this:
    -- buttons = {
    -- 	[1] = <button object named "MyButton1">,
    -- 	[2] = <button object named "MyButton2">,
    -- }
    Posted in: Need Help?
  • 0

    posted a message on Point Me Offical Thread
    Added LDB support for TitanPanel - suggested by Curse User

    Enable All Local POI option for zones
    Posted in: General AddOns
  • 0

    posted a message on Point Me Offical Thread
    Added Location Names to Way Point Arrows - Suggested By User

    Point Me Button Now Moveable Shift + Left click to move - Suggested By User

    Added in-game Help type /pmhelp or /pointmehelp for in-game help information.
    Posted in: General AddOns
  • 0

    posted a message on Button Locations on World Map
    is it possable to set parent for a button too two different locations if the Worldmap is the larger or smaller version.

    what im trying to find out is what the name of the parent for the world map frame is for the smaller one.
    Posted in: AddOn HELP!
  • 0

    posted a message on Point Me Offical Thread
    ** Update**

    Now includes Hallow's End Trick or Treat Innkeeper Locations.
    Posted in: General AddOns
  • 0

    posted a message on Point Me Offical Thread
    Point Me is a very simple and light weight addon.

    The addon allows you to select a destination from an option menu when opening the world map. The option menu contains all Zones and local POI's. The POI's are the same as the requirement for each step in the Explorer Achievement.

    This addon can assist you with, getting your Explorer Achievement, as well as pointing you in the right direction to go anywhere in Azeroth or Outland that you wish to travel to. Point Me will become increasingly useful with the release of World of Warcraft Cataclysm and with old world flying.

    Point Me is a fire and forget addon, that once you have selected you destination, all that it required of you is to start traveling in the right direction. Point Me makes use of the TomTom addon, by displaying a Crazy arrow, Distance to destination and Estimated time till arrival.

    Note that the TomTom addon is required for this addon to function.


    You can get Point Me From

    http://wow.curse.com/downloads/wow-addons/details/point-me.aspx
    Posted in: General AddOns
  • 0

    posted a message on Routes: Official Thread
    This has to be my favorite addon. - Well apart from my own :P
    Posted in: General AddOns
  • 0

    posted a message on Firing Actions drop down menu Help
    Thank you very much
    Posted in: Lua Code Discussion
  • 0

    posted a message on Firing Actions drop down menu Help
    it's also fireing on mouse over and not on mouse click
    Posted in: Lua Code Discussion
  • 0

    posted a message on Firing Actions drop down menu Help
    Hi my addon is nearly complete, so hopfully this will be the last time I bug everone.

    The problem I am having is I run my addon, I select the first level in the drop down menu, ( Works Fine) then I select the second option in the menu (This is the problem) and it fires all of the TomTom:AddZWaypoint data, that is ment for the third level.

    additionaly when I do click on an option in the third level it doesn't do anything. Can someone take a quick look over the code and give me a suggestion.

    I think i have provided everything needed. If i have missed something out tell me

    else its all here
    http://wow.curseforge.com/addons/point-me/

    Thanks very much to everyone who has helped me with this addon.

    Level 1

    -- Level 1 Options [Contenent] list complete
    
        if level == 1 then
    
            local info = UIDropDownMenu_CreateInfo()
    
            info.text = "Point Me"
    
            info.isTitle = true
    
            UIDropDownMenu_AddButton(info, level)
    
    
    
    -- Eastern Kindoms
            info = UIDropDownMenu_CreateInfo()
    
    
            info.text = "Eastern Kingdoms"
    
            info.hasArrow = true
    
            info.value = "Eastern Kindoms"
    
            UIDropDownMenu_AddButton(info, level)


    Level 2

    -- Eastern Kindoms
      
        elseif (level == 2)
     and (UIDROPDOWNMENU_MENU_VALUE == "Eastern Kindoms")
     then
    
            local info = UIDropDownMenu_CreateInfo()
    
            info.text = "Alterac Mountains"
        info.hasArrow = true
        info.value = "Alterac Mountains"
    
            UIDropDownMenu_AddButton(info, level


    Level 3
    -- Eastern Kingdoms [Local] Alterac Mountains
        elseif (level == 3)
     and (UIDROPDOWNMENU_MENU_VALUE == "Alterac Mountains")
     then
    
    
    
    
            
        local info = UIDropDownMenu_CreateInfo()
    
            info.text = "Chillwind Point"
        TomTom:AddZWaypoint(2, 1, 60, 64, "");
        UIDropDownMenu_AddButton(info, level)


    Lua Functions

    function PointMe_InitializeDropDown(self, level)
    
    ----- Rest of the code
    
    
    
    function PointMe_DropDownOnLoad(self)
    
        UIDropDownMenu_Initialize(self, PointMe_InitializeDropDown)
    
    end
    
    
    function PointMe_ButtonOnClick(self, button, down)
    
        local name = self:GetName()
    
        ToggleDropDownMenu(1, nil, PointMe_DropDown, name, 0, 0)
    
    end
    
    


    XML

    <Ui xmlns="http://www.blizzard.com/wow/ui/"
    
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    
        xsi:schemaLocation="http://www.blizzard.com/wow/ui/
    
        http://wowprogramming.com/FrameXML/UI.xsd">
    
    
        <Button name="PointMe_Button"
     inherits="GameMenuButtonTemplate"
     parent="WorldMapFrame" text="Point Me">
    
            <Anchors>
                <Anchor point="TOPRIGHT">
                    <Offset x="-213" y="-1"/>
                </Anchor>
            </Anchors>
    
            <Scripts>
    
                <OnClick>
    
                    PointMe_ButtonOnClick(self, button, down)
    
                </OnClick>
    
            </Scripts>
    
        </Button>
    
        <Frame name="PointMe_DropDown" inherits="UIDropDownMenuTemplate" frameStrata="FULLSCREEN_DIALOG">
    
            <Scripts>
    
                <OnLoad>
    
                    PointMe_DropDownOnLoad(self)
    
                </OnLoad>
    
            </Scripts>
    
        </Frame>
    
    </Ui>
    
    Posted in: Lua Code Discussion
  • 0

    posted a message on Send / commands to chat.
    Ok so here is how my code will work *it's working as of now* for future reference for anyone who many want to do the same thing.

    -- Eastern Kingdoms [Zone]
    -- Eastern Kingdoms [Local] Alterac Mountains
        elseif (level == 3)
     and (UIDROPDOWNMENU_MENU_VALUE == "Alterac Mountains")
     then
            
    local info = UIDropDownMenu_CreateInfo()
    info.text = "Chillwind Point"
    TomTom:AddZWaypoint(0, 1, 80, 64, "Chillwind Point");
    UIDropDownMenu_AddButton(info, level)


    Works like this
    TomTom:AddZWaypoint -- you gotta have that in to call th addon
    (0 -- The Continent 0 = Eastern Kingdoms
    1 -- The Zone 1 = Alterac Mountains
    80 -- The X co ord
    64 -- The Y co ord
    "Chillwind Point"); -- The string an the end

    if you where to type this into chat manually it would like like
    /way Alterac Mountains 80 64 Chillywind Point

    you put in the Continent because it needs to know it -- Thats how i can best explain it.
    Posted in: Lua Code Discussion
  • 0

    posted a message on Send / commands to chat.
    Is it possible for a drop down menu option to send a / command to another addon via chat

    What I want to do is when an option from the menu it clicked I want it to send a command to TomTom, but I cant find an elegant way of doing it so i thought of just generating a /way command and then sending it to chat.

    if so how could i put it into this code

    -- Eastern Kingdoms [Zone]
    -- Eastern Kingdoms [Local] Alterac Mountains
        elseif (level == 3)
     and (UIDROPDOWNMENU_MENU_VALUE == "Alterac Mountains")
     then
            
        local info = UIDropDownMenu_CreateInfo()
        info.text = "Chillwind Point"
        UIDropDownMenu_AddButton(info, level)
    Posted in: Lua Code Discussion
  • 0

    posted a message on Drop Down Menu - Levels
    -- Forum No Longer Required --

    I did a total rebuild.

    I got it working now, if anyone is interested in the code for their own reference of building Drop Down Menu's my code is as follows.

    TOC
    ## Interface: 30300
    ## Title: Point Me
    
    ## Notes: Point Me Addon Requires Tom Tom Addon
    
    Point Me.lua
    
    Point Me.xml
    


    LUA
    function PointMe_InitializeDropDown(self, level)
    
    
    -- Level 1 Options [Contenent] list complete
    
        if level == 1 then
    
            local info = UIDropDownMenu_CreateInfo()
    
            info.text = "Point Me"
    
            info.isTitle = true
    
            UIDropDownMenu_AddButton(info, level)
    
    
    
    -- Eastern Kindoms
            info = UIDropDownMenu_CreateInfo()
    
    
            info.text = "Eastern Kingdoms"
    
            info.hasArrow = true
    
            info.value = "Eastern Kindoms"
    
            UIDropDownMenu_AddButton(info, level)
    
    
    -- Kalimdor
    
    
    
    
            info = UIDropDownMenu_CreateInfo()
    
            info.text = "Kalimdor"
    
            info.hasArrow = true
    
            info.value = "Kalimdor"
    
            UIDropDownMenu_AddButton(info, level)
    
    
    -- Outland
    
            info = UIDropDownMenu_CreateInfo()
    
            info.text = "Outland"
    
            info.hasArrow = true
    
            info.value = "Outland"
    
            UIDropDownMenu_AddButton(info, level)
    
    
    -- Northrend
    
    
    
    
            info = UIDropDownMenu_CreateInfo()
    
            info.text = "Northrend"
    
            info.hasArrow = true
    
            info.value = "Northrend"
    
            UIDropDownMenu_AddButton(info, level)
    
    -- Level 2 Options [Zone] Add Options for local submenu
    
    -- Eastern Kindoms
      
        elseif (level == 2)
     and (UIDROPDOWNMENU_MENU_VALUE == "Eastern Kindoms")
     then
    
            local info = UIDropDownMenu_CreateInfo()
    
            info.text = "Alterac Mountains"
        info.hasArrow = true
        info.value = "Alterac Mountains"
    
            UIDropDownMenu_AddButton(info, level)
    
    local info = UIDropDownMenu_CreateInfo()
    
            info.text = "Arathi Highlands"
        info.hasArrow = true
        info.value = "Arathi Highlands"
    
            UIDropDownMenu_AddButton(info, level)
    
    local info = UIDropDownMenu_CreateInfo()
    
            info.text = "Badlands"
        info.hasArrow = true
        info.value = "Badlands"
    
            UIDropDownMenu_AddButton(info, level)
    
    local info = UIDropDownMenu_CreateInfo()
    
            info.text = "Blasted Lands"
        info.hasArrow = true
        info.value = "Blasted Lands"
    
            UIDropDownMenu_AddButton(info, level)
    
    local info = UIDropDownMenu_CreateInfo()
    
            info.text = "Burning Steppes"
        info.hasArrow = true
        info.value = "Burning Steppes"
    
            UIDropDownMenu_AddButton(info, level)
    
    local info = UIDropDownMenu_CreateInfo()
    
            info.text = "Deadwind Pass"
        info.hasArrow = true
        info.value = "Deadwind Pass"
    
            UIDropDownMenu_AddButton(info, level)
    
    local info = UIDropDownMenu_CreateInfo()
    
            info.text = "Dun Morogh"
        info.hasArrow = true
        info.value = "Dun Morogh"
    
            UIDropDownMenu_AddButton(info, level)
    
    local info = UIDropDownMenu_CreateInfo()
    
            info.text = "Duskwood"
        info.hasArrow = true
        info.value = "Duskwood"
    
            UIDropDownMenu_AddButton(info, level)
    
    local info = UIDropDownMenu_CreateInfo()
    
            info.text = "Eastern Plaguelands"
        info.hasArrow = true
        info.value = "Eastern Plaguelands"
    
            UIDropDownMenu_AddButton(info, level)
    
    local info = UIDropDownMenu_CreateInfo()
    
            info.text = "Elwynn Forest"
        info.hasArrow = true
        info.value = "Elwynn Forest"
    
            UIDropDownMenu_AddButton(info, level)
    
    local info = UIDropDownMenu_CreateInfo()
    
            info.text = "Eversong Woods"
        info.hasArrow = true
        info.value = "Eversong Woods"
    
            UIDropDownMenu_AddButton(info, level)
    
    local info = UIDropDownMenu_CreateInfo()
    
            info.text = "Ghostlands"
        info.hasArrow = true
        info.value = "Ghostlands"
    
            UIDropDownMenu_AddButton(info, level)
    
    local info = UIDropDownMenu_CreateInfo()
    
            info.text = "Hillsbrad Foothills"
        info.hasArrow = true
        info.value = "Hillsbrad Foothills"
    
            UIDropDownMenu_AddButton(info, level)
    
    local info = UIDropDownMenu_CreateInfo()
    
            info.text = "Isle of Quel'Danas"
        info.hasArrow = true
        info.value = "Isle of Quel'Danas"
    
            UIDropDownMenu_AddButton(info, level)
    
    local info = UIDropDownMenu_CreateInfo()
    
            info.text = "Loch Modan"
        info.hasArrow = true
        info.value = "Loch Modan"
    
            UIDropDownMenu_AddButton(info, level)
    
    local info = UIDropDownMenu_CreateInfo()
    
            info.text = "Redridge Mountains"
        info.hasArrow = true
        info.value = "Redridge Mountains"
    
            UIDropDownMenu_AddButton(info, level)
    
    local info = UIDropDownMenu_CreateInfo()
    
            info.text = "Redridge Mountains"
        info.hasArrow = true
        info.value = "Redridge Mountains"
    
            UIDropDownMenu_AddButton(info, level)
    
    local info = UIDropDownMenu_CreateInfo()
    
            info.text = "Silverpine Forest"
        info.hasArrow = true
        info.value = "Silverpine Forest"
    
            UIDropDownMenu_AddButton(info, level)
    
    local info = UIDropDownMenu_CreateInfo()
    
            info.text = "Stranglethorn Vale"
        info.hasArrow = true
        info.value = "Stranglethorn Vale"
    
            UIDropDownMenu_AddButton(info, level)
    
    local info = UIDropDownMenu_CreateInfo()
    
            info.text = "Swamp of Sorrows"
        info.hasArrow = true
        info.value = "Swamp of Sorrows"
    
            UIDropDownMenu_AddButton(info, level)
    
    local info = UIDropDownMenu_CreateInfo()
    
            info.text = "The Hinterlands"
        info.hasArrow = true
        info.value = "The Hinterlandss"
    
            UIDropDownMenu_AddButton(info, level)
    
    local info = UIDropDownMenu_CreateInfo()
    
            info.text = "Tirisfal Glades"
        info.hasArrow = true
        info.value = "Tirisfal Glades"
    
            UIDropDownMenu_AddButton(info, level)
    
    local info = UIDropDownMenu_CreateInfo()
    
            info.text = "Western Plaguelands"
        info.hasArrow = true
        info.value = "Western Plaguelands"
    
            UIDropDownMenu_AddButton(info, level)
    
    local info = UIDropDownMenu_CreateInfo()
    
            info.text = "Westfall"
        info.hasArrow = true
        info.value = "Westfall"
    
            UIDropDownMenu_AddButton(info, level)
    
    local info = UIDropDownMenu_CreateInfo()
    
            info.text = "Wetlands"
        info.hasArrow = true
        info.value = "Wetlands"
    
            UIDropDownMenu_AddButton(info, level)
    
    
    
    -- Kalimdor
    
    
        elseif (level == 2)
     and (UIDROPDOWNMENU_MENU_VALUE == "Kalimdor")
     then
    
            local info = UIDropDownMenu_CreateInfo()
    
            info.text = "Beta Sub-item 1"
    
            UIDropDownMenu_AddButton(info, level)
    
    
    -- Outland
       
        elseif (level == 2)
     and (UIDROPDOWNMENU_MENU_VALUE == "Outland")
     then
    
            local info = UIDropDownMenu_CreateInfo()
    
            info.text = "Alpha Sub-item 1"
        info.hasArrow = true
        info.value = "test"
    
            UIDropDownMenu_AddButton(info, level)
            
        local info = UIDropDownMenu_CreateInfo()
    
            info.text = "Alpha Sub-item 2"
        info.hasArrow = true
        info.value = "test 2"
    
            UIDropDownMenu_AddButton(info, level)
    
    
    
    -- Northrend
    
    
    
    
        elseif (level == 2)
     and (UIDROPDOWNMENU_MENU_VALUE == "Northrend")
     then
    
            local info = UIDropDownMenu_CreateInfo()
    
            info.text = "Beta Sub-item 1"
    
            UIDropDownMenu_AddButton(info, level)
    
    -- Level 3 Options [Local] Add function to options to allow for Tom Tom Commands
    
        elseif (level == 3)
     and (UIDROPDOWNMENU_MENU_VALUE == "test")
     then
    
            local info = UIDropDownMenu_CreateInfo()
    
            info.text = "Beta Sub-item 1"
    
            UIDropDownMenu_AddButton(info, level)
    
    
        
        end
    
    end
    
    
    
    
    function PointMe_DropDownOnLoad(self)
    
        UIDropDownMenu_Initialize(self, PointMe_InitializeDropDown)
    
    end
    
    
    function PointMe_ButtonOnClick(self, button, down)
    
        local name = self:GetName()
    
        ToggleDropDownMenu(1, nil, PointMe_DropDown, name, 0, 0)
    
    end
    
    


    XML
    <Ui xmlns="http://www.blizzard.com/wow/ui/"
    
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    
        xsi:schemaLocation="http://www.blizzard.com/wow/ui/
    
        http://wowprogramming.com/FrameXML/UI.xsd">
    
    
        <Button name="PointMe_Button"
     inherits="GameMenuButtonTemplate"
     parent="WorldMapFrame" text="Point Me">
    
            <Anchors>
                <Anchor point="TOPRIGHT">
                    <Offset x="-50" y="-40"/>
                </Anchor>
            </Anchors>
    
            <Scripts>
    
                <OnClick>
    
                    PointMe_ButtonOnClick(self, button, down)
    
                </OnClick>
    
            </Scripts>
    
        </Button>
    
        <Frame name="PointMe_DropDown" inherits="UIDropDownMenuTemplate" frameStrata="FULLSCREEN_DIALOG">
    
            <Scripts>
    
                <OnLoad>
    
                    PointMe_DropDownOnLoad(self)
    
                </OnLoad>
    
            </Scripts>
    
        </Frame>
    
    </Ui>
    
    Posted in: Need Help?
  • 0

    posted a message on Drop Down Menu - Levels
    Im Trying to create a drop down menu with different levels

    I have built a code that will work if there are no levels but then I try and put levels in it doesn't work.

    If anyone has some experience with drop down menu's can you take a look and show me what I have done wrong.

    
    Total Code Rebuild See Below.
    
    
    Posted in: Need Help?
  • To post a comment, please or register a new account.