diff --git a/lua/pac3/editor/client/init.lua b/lua/pac3/editor/client/init.lua index 958539dcb..75a63e3ef 100644 --- a/lua/pac3/editor/client/init.lua +++ b/lua/pac3/editor/client/init.lua @@ -102,8 +102,10 @@ function pace.OpenEditor() pace.SetLanguage() + local editorWidth = 280 + local editor = pace.CreatePanel("editor") - editor:SetSize(240, ScrH()) + editor:SetSize(editorWidth, ScrH()) editor:MakePopup() --editor:SetPos(0, 0) editor.Close = function() @@ -117,7 +119,7 @@ function pace.OpenEditor() if remember:GetBool() then local x = cookie.GetNumber("pac_editor_x", 0) - if x < 0 or x + 240 > ScrW() then + if x < 0 or x + editorWidth > ScrW() then x = 0 end @@ -127,9 +129,9 @@ function pace.OpenEditor() local mode = positionMode:GetInt() if mode == 1 then - editor:SetPos(ScrW() / 2 - 120, 0) + editor:SetPos(ScrW() / 2 - editorWidth / 2, 0) elseif mode == 2 then - editor:SetPos(ScrW() - 240, 0) + editor:SetPos(ScrW() - editorWidth, 0) else editor:SetPos(0, 0) end diff --git a/lua/pac3/editor/client/settings.lua b/lua/pac3/editor/client/settings.lua index 574c99876..949c32342 100644 --- a/lua/pac3/editor/client/settings.lua +++ b/lua/pac3/editor/client/settings.lua @@ -31,4 +31,4 @@ end concommand.Add("pace_settings", function() pace.OpenSettings() -end) \ No newline at end of file +end, nil, "Open pac3 settings menu (wear whitelist/blacklist)") \ No newline at end of file diff --git a/lua/pac3/editor/client/wear_filter.lua b/lua/pac3/editor/client/wear_filter.lua index 52fb3dc65..18c80a6fa 100644 --- a/lua/pac3/editor/client/wear_filter.lua +++ b/lua/pac3/editor/client/wear_filter.lua @@ -326,16 +326,19 @@ function pace.FillWearSettings(pnl) mode.form:Remove() end + -- create form based on selection if value == "steam friends" then mode.form = generic_form(L"Only your steam friends can see your worn outfit.") elseif value == "whitelist" then mode.form = player_list_form(L"whitelist", "wear_whitelist", L"Only the players in the whitelist can see your worn outfit.") elseif value == "blacklist" then mode.form = player_list_form( L"blacklist", "wear_blacklist", L"The players in the blacklist cannot see your worn outfit.") - elseif value == "disabled" then + else -- make sure we stay as one of these options + value = "disabled" mode.form = generic_form(L"Everyone can see your worn outfit.") end + -- and set cvar to update filter GetConVar("pace_wear_filter_mode"):SetString(value:gsub(" ", "_")) mode.form:SetParent(list) @@ -366,16 +369,19 @@ function pace.FillWearSettings(pnl) mode.form:Remove() end + -- create form based on selection if value == "steam friends" then mode.form = generic_form(L"You will only see outfits from your steam friends.") elseif value == "whitelist" then mode.form = player_list_form(L"whitelist", "outfit_whitelist", L"You will only see outfits from the players in the whitelist.") elseif value == "blacklist" then mode.form = player_list_form(L"blacklist", "outfit_blacklist", L"You will see outfits from everyone except the players in the blacklist.") - elseif value == "disabled" then + else -- make sure we stay as one of these options + value = "disabled" mode.form = generic_form(L"You will see everyone's outfits.") end + -- and set cvar to update filter GetConVar("pace_outfit_filter_mode"):SetString(value:gsub(" ", "_")) mode.form:SetParent(list)