rendered paste bodyusing System;
using System.Collections.Generic;
using System.Text;
namespace Bytebot
{
public class LuaFrame
{
string name = null;
public LuaFrame(string Name)
{
name = Name;
Game.Instance.WoWScript(string.Format("local {0} = CreateFrame('Frame',nil,UIParent)",name));
Game.Instance.WoWScript(string.Format("{0}:SetFrameStrata('BACKGROUND')", name));
Game.Instance.WoWScript(string.Format("{0}:SetWidth(100)", name));
Game.Instance.WoWScript(string.Format("{0}:SetHeight(100)", name));
Game.Instance.WoWScript(string.Format("local t = {0}:CreateTexture(nil,'BACKGROUND')", name));
Game.Instance.WoWScript(string.Format("t:SetTexture('Interface\\\\Glues\\\\CharacterCreate\\\\UI-CharacterCreate-Factions.blp')"));
Game.Instance.WoWScript(string.Format("t:SetAllPoints({0})",name));
Game.Instance.WoWScript(string.Format("{0}.texture = t",name));
Game.Instance.WoWScript(string.Format("{0}:SetPoint('CENTER',0,0)", name));
}
~LuaFrame()
{
Game.Instance.WoWScript(string.Format("{0} = nil",name));
}
public void Show()
{
Game.Instance.WoWScript(string.Format("{0}:Show()", name));
}
}
}