--[[
	MOD/lua/menu_plugins/luaconsole/cp_luamenu.lua [#1594 (#1645), 2236611592, UID:1105096610]
	gorgeous turtle | STEAM_0:0:71356345 <82.238.182.218:27005> | [23.06.14 05:53:32PM]
	===BadFile===
]]

PANEL.Name = "LuaMenu"
PANEL.Icon = "gui/silkicons/application"

function PANEL:Init()
	self.SkinHelp = vgui.Create("DLabel",self)
	self.SkinHelp:SetPos(5,5)
	self.SkinHelp:SetText("Choose your skin")
	self.SkinHelp:SizeToContents()
	
	self.Skin = vgui.Create("DMultiChoice",self)
	for k, v in pairs(LuaMenu.Skins) do
		self.Skin:AddChoice(k)
	end
	self.Skin.OnSelect = function(panel,num,str)
		LuaMenu.Settings.Skin = str
		SaveSettings()
	end
	self.Skin:SetText(LuaMenu.Settings.Skin)
	
	self.TitleHelp = vgui.Create("DLabel",self)
	self.TitleHelp:SetPos(5,55)
	self.TitleHelp:SetText("Set your title (%time%, %size%)")
	self.TitleHelp:SizeToContents()
	
	self.Title = vgui.Create("DTextEntry",self)
	self.Title:SetText(LuaMenu.Settings.Title)
	self.Title:RequestFocus()
	self.Title.OnEnter = function(self)
		LuaMenu.Settings.Title = self:GetValue()
		SaveSettings()
	end
	
	self.PopupHelp = vgui.Create("DLabel",self)
	self.PopupHelp:SetPos(5,105)
	self.PopupHelp:SetText("Popups come from where")
	self.PopupHelp:SizeToContents()
	
	self.Popup = vgui.Create("DMultiChoice",self)
	self.Popup:AddChoice("Top")
	self.Popup:AddChoice("Bottom")
	self.Popup.OnSelect = function(panel,num,str)
		LuaMenu.Settings.InfoFlip = (str == "Top") and true or false
		SaveSettings()
	end
	self.Popup:SetText(LuaMenu.Settings.InfoFlip == true and "Top" or "Bottom")
end
function PANEL:PerformLayout()
	self:StretchToParent(4,27,4,4)
	self.Skin:StretchToParent(5,25,5,self:GetTall() - 45)
	self.Title:StretchToParent(5,75,5,self:GetTall() - 95)
	self.Popup:StretchToParent(5,125,5,self:GetTall() - 145)
end