Add another Button into the Blizzard Game Menu - WoWInterface
Thread Tools Display Modes
10-29-19, 02:44 PM   #1
A Murloc Raider
Join Date: Oct 2019
Posts: 4
Add another Button into the Blizzard Game Menu

Hello Guys,

I want to learn about Addon creating and .lua. Recently I am trying to figure out how I simply add another Button to the Game Menu with different functions. For example open up a config Menu of another AddOn, or simply a little script to open the Character Panel for example.

I guess this all can be done with the functions and templates from the Blizzard GameMenuFrame.lua and the Button design can be pulled from "GameMenuButtonTemplate".

My problem is I don't know how to set it all together, I've done the basics with the resources I could find, like creating a Button, creating a Button that makes an Emote on Press, creating a panel etc.

Question is how can I get to the Game Menu and add a button there. Step 1 is finding out how to add it to the menu and after that is done, Step 2 I can do all the function things I want and play around further.

Any Advice would be great.


EDIT: Okay, got my fingers wet. So I've started with hiding the Help Button for my own Button, after that I created a frame and as a parentFrame I just gave the "GameMenuFrame". Played around a little and used a SetScript to do an Emote when pressing the button, but now I have to figure out how to close the Frame after pressing the button and how to open the frames I want.

Code Snippet:


local frame = CreateFrame("Button","UIPanelButtonTemplateTest",
GameMenuFrame, "UIPanelButtonTemplate")
frame:SetText("Hello World Button")
frame:SetPoint("TOP", 0, -30)
frame:SetScript("OnClick", function()
	DoEmote("dance", UnitName("target"))
end )

Last edited by Noresa : 10-29-19 at 08:11 PM.
  Reply With Quote
10-30-19, 07:30 AM   #2
A Deviate Faerie Dragon
Join Date: Sep 2019
Posts: 10
Most frames obey the Show/Hide convention.

You could try a simple mytrame:GetParent():Hide().
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Add another Button into the Blizzard Game Menu

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off