Thread Tools Display Modes
Prev Previous Post   Next Post Next
12-13-19, 11:43 PM   #1
wildcat69
A Defias Bandit
Join Date: Dec 2019
Posts: 2
Question Trouble displaying 2 buttons.

EDIT: I fixed it thanks to @Fizzlemizz, you rock!

I am struggling displaying 2 buttons in the same frame. I am following Mayron's videos and am unable to add a 2nd button to my frame following his code.

I am attaching my code at the end of this message. Here is the video I am following.

Any help would be very much appreciated, I was flying through his videos until this. I can get everything working but displaying the 2nd 'reset' button

Thank you!

Code:
local UIConfig = CreateFrame("Frame", "MUI_BuffFrame", UIParent, "BasicFrameTemplateWithInset");

UIConfig:SetSize(300, 360); --width, height
UIConfig:SetPoint("CENTER", UIParent, "CENTER"); --point, relativeframe, relativepoint, xoffset, yoffset



--Child frames and regions
UIConfig.title = UIConfig:CreateFontString(nil, "OVERLAY");
UIConfig.title:SetFontObject("GameFontHighlight");
UIConfig.title:SetPoint("LEFT", UIConfig.TitleBg, "LEFT", 5, 0)
UIConfig.title:SetText("WildCat Addon");

--BUTTONS!!!
--UI Save Button
UIConfig.saveButton = CreateFrame("Button", nil, UIConfig, "GameMenuButtonTemplate");
UIConfig.saveButton:SetPoint("TOP", UIConfig, "TOP", 0, -70);
UIConfig.saveButton:SetSize(140, 40);
UIConfig.saveButton:SetText("Save"); --directly communicates to the buttons main FontString object
UIConfig.saveButton:SetNormalFontObject("GameFontNormalLarge");
UIConfig.saveButton:SetHighlighFontObject("GameFontHighlightLarge");



--UI RESET BUTTON

UIConfig.resetBtn = CreateFrame("Button", nil, UIConfig, "GameMenuButtonTemplate");
UIConfig.resetBtn:SetPoint("TOP", UIConfig.saveButton, "BOTTOM", 0, -10);
UIConfig.resetBtn:SetSize(140, 40);
UIConfig.resetBtn:SetText("Reset");
UIConfig.resetBtn:SetNormalFontObject("GameFontNormalLarge");
UIConfig.resetBtn:SetHighlighFontObject("GameFontHighlightLarge");

Last edited by wildcat69 : 12-14-19 at 12:35 PM.
  Reply With Quote
 

WoWInterface » Developer Discussions » Lua/XML Help » Trouble displaying 2 buttons.


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