PlayerFrameHealthBar:ClearAllPoints()
PlayerFrameHealthBar:SetParent(NewPlayerFrameBorder)
PlayerFrameHealthBar:SetPoint("CENTER",NewPlayerFrameBorder,0,10)
PlayerFrameHealthBar:SetSize(120,20)
PlayerFrameHealthBar:SetAlpha(0.8)
PlayerFrameHealthBar:SetStatusBarTexture("Interface\\AddOns\\Test\\Textur\\statusbar.tga")
z.b. /run PlayerFrameHealthBar:ClearAllPoints() usw.
PlayerFrameHealthBar:SetPoint("CENTER",NewPlayerFrameBorder,0,10)
PlayerFrameHealthBar.SetPoint = function() end
local model = CreateFrame("Model", "MyPlayerModel", UIParent);
model:SetSize(50, 50);
model:SetPoint("CENTER");
model:SetUnit("player");
model:SetCamera(0);
if not DropDownMenuTest then
CreateFrame("Button", "DropDownMenuTest", UIParent, "UIDropDownMenuTemplate")
end
DropDownMenuTest:ClearAllPoints()
DropDownMenuTest:SetPoint("CENTER", 0, 0)
DropDownMenuTest:Show()
local items = {
"Alpha",
"Beta",
"Gamma",
"Delta",
}
local function OnClick(self)
UIDropDownMenu_SetSelectedID(DropDownMenuTest, self:GetID())
end
local function initialize(self, level)
local info = UIDropDownMenu_CreateInfo()
for k,v in pairs(items) do
info = UIDropDownMenu_CreateInfo()
info.text = v
info.value = v
info.func = OnClick
UIDropDownMenu_AddButton(info, level)
end
end
UIDropDownMenu_Initialize(DropDownMenuTest, initialize)
UIDropDownMenu_SetWidth(DropDownMenuTest, 100);
UIDropDownMenu_SetButtonWidth(DropDownMenuTest, 124)
UIDropDownMenu_SetSelectedID(DropDownMenuTest, 1)
UIDropDownMenu_JustifyText(DropDownMenuTest, "LEFT")
local function onclick(self)
UIDropDownMenu_SetSelectedID(DropDownMenuTest, self:GetID())
print(self.value)
end
local function onclick(self)
UIDropDownMenu_SetSelectedID(DropDownMenuTest, self:GetID())
local value = self.value;
if ( value == "Alpha" ) then
MainMenuBarLeftEndCap:SetTexture("pfad der textur");
elseif ( value == "Beta" ) then
MainMenuBarLeftEndCap:SetTexture("pfad der zweiten textur");
end
end