Skip to content

Commit

Permalink
Remove UI Sounds
Browse files Browse the repository at this point in the history
  • Loading branch information
Lythium4848 committed Aug 16, 2023
1 parent e5d3793 commit 06da149
Show file tree
Hide file tree
Showing 14 changed files with 7 additions and 319 deletions.
46 changes: 2 additions & 44 deletions lua/autorun/sh_pixelui_loader.lua
Original file line number Diff line number Diff line change
Expand Up @@ -19,34 +19,6 @@ PIXEL = PIXEL or {}
PIXEL.UI = PIXEL.UI or {}
PIXEL.UI.Version = "2.0.0"

PIXEL.Themes = PIXEL.Themes or {}

PIXEL.Themes["Dark"] = {
included = true,
Background = Color(29, 29, 29),
Header = Color(34, 34, 34),
SecondaryHeader = Color(47, 47, 47),
Scroller = Color(63, 63, 63),
PrimaryText = Color(255, 255, 255),
SecondaryText = Color(219, 219, 219),
DisabledText = Color(44, 44, 44),
Primary = Color(46, 83, 148),
Disabled = Color(178, 178, 178),
Positive = Color(0, 168, 107),
Negative = Color(234, 70, 70),
Diamond = Color(184, 242, 255),
Gold = Color(255, 214, 0),
Silver = Color(191, 191, 191),
Bronze = Color(144, 94, 52),
Transparent = Color(0, 0, 0, 0)
}

PIXEL.Colors = PIXEL.Themes["Dark"]

function PIXEL.Warn(...)
MsgC(PIXEL.Colors.Gold, "[PIXEL UI - Warning] ", PIXEL.Colors.Negative, ..., "\n")
end

function PIXEL.LoadDirectory(path)
local files, folders = file.Find(path .. "/*", "LUA")

Expand Down Expand Up @@ -84,20 +56,6 @@ end

PIXEL.LoadDirectoryRecursive("pixelui")
hook.Run("PIXEL.UI.FullyLoaded")
if CLIENT then return end
resource.AddWorkshop("2825396224")

hook.Add("Think", "PIXEL.UI.VersionChecker", function()
hook.Remove("Think", "PIXEL.UI.VersionChecker")

http.Fetch("https://raw.githubusercontent.com/Pulsar-Dev/pixel-ui/master/VERSION", function(body)
if PIXEL.UI.Version ~= string.Trim(body) then
local red = Color(192, 27, 27)
MsgC(red, "[PIXEL UI] There is an update available, please download it at: https://github.com/Pulsar-Dev/pixel-ui/releases/latest\n")
MsgC(red, "\nYour version: " .. PIXEL.UI.Version .. "\n")
MsgC(red, "New version: " .. body .. "\n")

return
end
end)
end)
if CLIENT then return end
resource.AddWorkshop("2825396224")
2 changes: 1 addition & 1 deletion lua/pixelui/core/cl_fonts.lua
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ do
weight = weight or 700
PIXEL.Fonts = PIXEL.Fonts or {}
fontName = name or "PIXEL.Font.Size" .. size
font = font or "Open Sans Bold"
font = font or "Rubik"

if !PIXEL.Fonts[fontName] or PIXEL.Fonts[fontName].size != size or PIXEL.Fonts[fontName].weight != weight then
PIXEL.Fonts[fontName] = {
Expand Down
1 change: 1 addition & 0 deletions lua/pixelui/core/cl_scaling.lua
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ local max = math.max
function PIXEL.Scale(value)
return max(value * (scrH() / 1080), 1)
end

function PIXEL.Scale1440(value)
return max(value * (scrH() / 1440), 1)
end
Expand Down
67 changes: 0 additions & 67 deletions lua/pixelui/core/cl_sounds.lua

This file was deleted.

66 changes: 0 additions & 66 deletions lua/pixelui/core/themes/cl_theme.lua

This file was deleted.

104 changes: 0 additions & 104 deletions lua/pixelui/core/themes/cl_themes.lua

This file was deleted.

23 changes: 0 additions & 23 deletions lua/pixelui/core/themes/sh_themes.lua

This file was deleted.

4 changes: 0 additions & 4 deletions lua/pixelui/elements/cl_button.lua
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,6 @@ local localPly
function PANEL:OnMousePressed(mouseCode)
if not self:IsEnabled() then return end

if self:GetSounds() then
PIXEL.PlayButtonSound()
end

if not localPly then
localPly = LocalPlayer()
end
Expand Down
5 changes: 1 addition & 4 deletions lua/pixelui/elements/cl_combo_box.lua
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,6 @@ end
function PANEL:OpenMenu(pControlOpener)
if pControlOpener and pControlOpener == self.TextEntry then return end
if #self.Choices == 0 then return end
PIXEL.PlayExpand("open")
self:OnOpen()

if IsValid(self.Menu) then
Expand Down Expand Up @@ -198,9 +197,7 @@ function PANEL:OpenMenu(pControlOpener)

self.Menu.OnRemove = function(s)
if not IsValid(self) then return end
PIXEL.PlayExpand("close")
self:OnClose()
PIXEL.PlayExpand("close")

self:OnClose()
self:SetToggle(false)
end
Expand Down
1 change: 0 additions & 1 deletion lua/pixelui/elements/cl_frame.lua
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,6 @@ function PANEL:LayoutContent(w, h)
end

function PANEL:Open()
PIXEL.PlayButtonSound()
self:SetVisible(false)
self:SetAlpha(0)
self:SetVisible(true)
Expand Down
2 changes: 1 addition & 1 deletion lua/pixelui/elements/cl_mini_sidebar.lua
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ end
function PANEL:SelectItem(id)
local item = self.Items[id]
if not item then return end
PIXEL.PlayChangeTab()

if self.SelectedItem and self.SelectedItem == id then return end
self.SelectedItem = id

Expand Down
Loading

0 comments on commit 06da149

Please sign in to comment.