Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improvement of the /AreaEdit derma #449

Merged
merged 1 commit into from
Sep 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions plugins/area/derma/cl_areaedit.lua
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ function PANEL:Init()

-- name entry
self.nameEntry = vgui.Create("ixTextEntry")
self.nameEntry:SetFont("ixMenuButtonFont")
self.nameEntry:SetFont("ixMediumLightFont")
self.nameEntry:SetText(L("areaNew"))

local listRow = self.canvas:Add("ixListRow")
Expand All @@ -34,8 +34,8 @@ function PANEL:Init()
-- type entry
self.typeEntry = self.canvas:Add("DComboBox")
self.typeEntry:Dock(RIGHT)
self.typeEntry:SetFont("ixMenuButtonFont")
self.typeEntry:SetTextColor(color_white)
self.typeEntry:SetFont("ixMediumLightFont")
self.typeEntry:SetTextColor(color_black)
self.typeEntry.OnSelect = function(panel)
panel:SizeToContents()
panel:SetWide(panel:GetWide() + 12) -- padding for arrow (nice)
Expand Down Expand Up @@ -70,6 +70,7 @@ function PANEL:Init()
elseif (v.type == ix.type.bool) then
panel = vgui.Create("ixCheckBox")
panel:SetChecked(v.default, true)
panel:SetFont("ixMediumLightFont")
elseif (v.type == ix.type.color) then
panel = vgui.Create("DButton")
panel.value = v.default
Expand Down Expand Up @@ -142,7 +143,7 @@ function PANEL:Init()
end

function PANEL:SizeToContents()
local width = 64
local width = 600
local height = 37

for _, v in ipairs(self.canvas:GetCanvas():GetChildren()) do
Expand All @@ -151,7 +152,7 @@ function PANEL:SizeToContents()
end

self:SetWide(width + 200)
self:SetTall(height + self.saveButton:GetTall())
self:SetTall(height + self.saveButton:GetTall() + 50)
end

function PANEL:Submit()
Expand Down
Loading