Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- Project: Wrytch it!
- Version: 1.0.0
- Author: BoboEGR (http://www.sven-bobrowski.de - info@sven-bobrowski.de)
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
- ]]
- WrytchIt = {}
- local context = UI.CreateContext("WrytchItContext")
- local WrytchItWindow = UI.CreateFrame("SimpleWindow", "WrytchItWindow", context)
- local closeButton = UI.CreateFrame("Texture", "WrytchItCloseButton", WrytchItWindow)
- -- Addon initialisation
- local function init()
- WrytchItWindow:SetVisible(false)
- WrytchItWindow:SetWidth(300)
- WrytchItWindow:SetHeight(200)
- WrytchItWindow:SetPoint("TOPLEFT", UIParent, "TOPLEFT", 100, 100)
- WrytchItWindow:SetTitle("Wrytch It!")
- WrytchItWindow:SetLayer(1)
- WrytchItWindow:SetAlpha(0.8)
- closeButton:SetTexture("WrytchIt", "Textures/close.png")
- closeButton:SetPoint("TOPRIGHT", WrytchItWindow, "TOPRIGHT", -8, 16)
- closeButton:SetLayer(2)
- function closeButton.Event:LeftClick()
- WrytchItWindow:SetVisible(false)
- end
- end
- -- display WrytchIt
- local function showWrytchIt()
- WrytchItWindow:SetVisible(true)
- end
- -- Register the slash commands
- table.insert(Command.Slash.Register("wrytchit"), {showWrytchIt, "Wrytch_It", "Slash command"})
- table.insert(Command.Slash.Register("wi"), {showWrytchIt, "Wrytch_It", "Slash command"})
- -- initialisation
- init()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement