diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a225d33 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +themer.gma \ No newline at end of file diff --git a/README.md b/README.md index f21a563..f06dc14 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,3 @@ # [Themer](https://steamcommunity.com/sharedfiles/filedetails/?id=938347376) -A tool to make derma skin application easier. \ No newline at end of file +Themer is a utility to replace derma themes on the fly without overwriting files. + diff --git a/addon.json b/addon.json index eaabe42..ebe5db5 100644 --- a/addon.json +++ b/addon.json @@ -1,6 +1,6 @@ { "description": "A tool to make derma skin application easier.", - "ignore": ["*.psd", ".git/*", "icon.jpg", "themer.gma"], + "ignore": ["*.psd", ".git/*", ".gitignore", "icon.jpg", "themer.gma"], "logo": "icon.jpg", "tags": ["build", "scenic"], "title": "Themer", diff --git a/icon.jpg b/icon.jpg index 4f54d60..222b20b 100644 Binary files a/icon.jpg and b/icon.jpg differ diff --git a/lua/skins/themer.lua b/lua/skins/themer.lua index 7bcca49..7ad3503 100644 --- a/lua/skins/themer.lua +++ b/lua/skins/themer.lua @@ -17,24 +17,22 @@ if not tex or tex:IsError() then end SKIN.GwenTexture = tex - -SKIN.bg_color = Color( 101, 100, 105, 255 ) -SKIN.bg_color_sleep = Color( 70, 70, 70, 255 ) +SKIN.bg_color = Color( 101, 100, 105, 255 ) +SKIN.bg_color_sleep = Color( 70, 70, 70, 255 ) SKIN.bg_color_dark = Color( 55, 57, 61, 255 ) SKIN.bg_color_bright = Color( 220, 220, 220, 255 ) SKIN.frame_border = Color( 50, 50, 50, 255 ) - SKIN.fontFrame = "DermaDefault" -SKIN.control_color = Color( 120, 120, 120, 255 ) +SKIN.control_color = Color( 120, 120, 120, 255 ) SKIN.control_color_highlight = Color( 150, 150, 150, 255 ) -SKIN.control_color_active = Color( 110, 150, 250, 255 ) -SKIN.control_color_bright = Color( 255, 200, 100, 255 ) -SKIN.control_color_dark = Color( 100, 100, 100, 255 ) +SKIN.control_color_active = Color( 110, 150, 250, 255 ) +SKIN.control_color_bright = Color( 255, 200, 100, 255 ) +SKIN.control_color_dark = Color( 100, 100, 100, 255 ) -SKIN.bg_alt1 = Color( 50, 50, 50, 255 ) -SKIN.bg_alt2 = Color( 55, 55, 55, 255 ) +SKIN.bg_alt1 = Color( 50, 50, 50, 255 ) +SKIN.bg_alt2 = Color( 55, 55, 55, 255 ) SKIN.listview_hover = Color( 70, 70, 70, 255 ) SKIN.listview_selected = Color( 100, 170, 220, 255 ) @@ -52,11 +50,11 @@ SKIN.combobox_selected = SKIN.listview_selected SKIN.panel_transback = Color( 255, 255, 255, 50 ) SKIN.tooltip = Color( 255, 245, 175, 255 ) -SKIN.colPropertySheet = Color( 170, 170, 170, 255 ) -SKIN.colTab = SKIN.colPropertySheet +SKIN.colPropertySheet = Color( 170, 170, 170, 255 ) +SKIN.colTab = SKIN.colPropertySheet SKIN.colTabInactive = Color( 140, 140, 140, 255 ) SKIN.colTabShadow = Color( 0, 0, 0, 170 ) -SKIN.colTabText = Color( 255, 255, 255, 255 ) +SKIN.colTabText = Color( 255, 255, 255, 255 ) SKIN.colTabTextInactive = Color( 0, 0, 0, 200 ) SKIN.fontTab = "DermaDefault" @@ -70,8 +68,9 @@ SKIN.colNumberWangBG = Color( 255, 240, 150, 255 ) SKIN.colTextEntryBG = Color( 240, 240, 240, 255 ) SKIN.colTextEntryBorder = Color( 20, 20, 20, 255 ) SKIN.colTextEntryText = Color( 20, 20, 20, 255 ) -SKIN.colTextEntryTextHighlight = Color( 20, 200, 250, 255 ) +SKIN.colTextEntryTextHighlight = Color( 20, 200, 250, 255 ) SKIN.colTextEntryTextCursor = Color( 0, 0, 100, 255 ) +SKIN.colTextEntryTextPlaceholder= Color( 128, 128, 128, 255 ) SKIN.colMenuBG = Color( 255, 255, 255, 200 ) SKIN.colMenuBorder = Color( 0, 0, 0, 200 ) @@ -82,243 +81,238 @@ SKIN.colButtonBorder = Color( 20, 20, 20, 255 ) SKIN.colButtonBorderHighlight = Color( 255, 255, 255, 50 ) SKIN.colButtonBorderShadow = Color( 0, 0, 0, 100 ) - - SKIN.tex = {} -SKIN.tex.Selection = GWEN.CreateTextureBorder( 384, 32, 31, 31, 4, 4, 4, 4 ); +SKIN.tex.Selection = GWEN.CreateTextureBorder( 384, 32, 31, 31, 4, 4, 4, 4 ) SKIN.tex.Panels = {} -SKIN.tex.Panels.Normal = GWEN.CreateTextureBorder( 256, 0, 63, 63, 16, 16, 16, 16 ) -SKIN.tex.Panels.Bright = GWEN.CreateTextureBorder( 256+64, 0, 63, 63, 16, 16, 16, 16 ) -SKIN.tex.Panels.Dark = GWEN.CreateTextureBorder( 256, 64, 63, 63, 16, 16, 16, 16 ) -SKIN.tex.Panels.Highlight = GWEN.CreateTextureBorder( 256+64, 64, 63, 63, 16, 16, 16, 16 ) +SKIN.tex.Panels.Normal = GWEN.CreateTextureBorder( 256, 0, 63, 63, 16, 16, 16, 16 ) +SKIN.tex.Panels.Bright = GWEN.CreateTextureBorder( 256+64, 0, 63, 63, 16, 16, 16, 16 ) +SKIN.tex.Panels.Dark = GWEN.CreateTextureBorder( 256, 64, 63, 63, 16, 16, 16, 16 ) +SKIN.tex.Panels.Highlight = GWEN.CreateTextureBorder( 256+64, 64, 63, 63, 16, 16, 16, 16 ) -SKIN.tex.Button = GWEN.CreateTextureBorder( 480, 0, 31, 31, 8, 8, 8, 8 ) -SKIN.tex.Button_Hovered = GWEN.CreateTextureBorder( 480, 32, 31, 31, 8, 8, 8, 8 ) -SKIN.tex.Button_Dead = GWEN.CreateTextureBorder( 480, 64, 31, 31, 8, 8, 8, 8 ) -SKIN.tex.Button_Down = GWEN.CreateTextureBorder( 480, 96, 31, 31, 8, 8, 8, 8 ) -SKIN.tex.Shadow = GWEN.CreateTextureBorder( 448, 0, 31, 31, 8, 8, 8, 8 ) +SKIN.tex.Button = GWEN.CreateTextureBorder( 480, 0, 31, 31, 8, 8, 8, 8 ) +SKIN.tex.Button_Hovered = GWEN.CreateTextureBorder( 480, 32, 31, 31, 8, 8, 8, 8 ) +SKIN.tex.Button_Dead = GWEN.CreateTextureBorder( 480, 64, 31, 31, 8, 8, 8, 8 ) +SKIN.tex.Button_Down = GWEN.CreateTextureBorder( 480, 96, 31, 31, 8, 8, 8, 8 ) +SKIN.tex.Shadow = GWEN.CreateTextureBorder( 448, 0, 31, 31, 8, 8, 8, 8 ) -SKIN.tex.Tree = GWEN.CreateTextureBorder( 256, 128, 127, 127, 16, 16, 16, 16 ) +SKIN.tex.Tree = GWEN.CreateTextureBorder( 256, 128, 127, 127, 16, 16, 16, 16 ) SKIN.tex.Checkbox_Checked = GWEN.CreateTextureNormal( 448, 32, 15, 15 ) SKIN.tex.Checkbox = GWEN.CreateTextureNormal( 464, 32, 15, 15 ) SKIN.tex.CheckboxD_Checked = GWEN.CreateTextureNormal( 448, 48, 15, 15 ) SKIN.tex.CheckboxD = GWEN.CreateTextureNormal( 464, 48, 15, 15 ) ---SKIN.tex.RadioButton_Checked = GWEN.CreateTextureNormal( 448, 64, 15, 15 ) ---SKIN.tex.RadioButton = GWEN.CreateTextureNormal( 464, 64, 15, 15 ) ---SKIN.tex.RadioButtonD_Checked = GWEN.CreateTextureNormal( 448, 80, 15, 15 ) ---SKIN.tex.RadioButtonD = GWEN.CreateTextureNormal( 464, 80, 15, 15 ) +SKIN.tex.RadioButton_Checked = GWEN.CreateTextureNormal( 448, 64, 15, 15 ) +SKIN.tex.RadioButton = GWEN.CreateTextureNormal( 464, 64, 15, 15 ) +SKIN.tex.RadioButtonD_Checked = GWEN.CreateTextureNormal( 448, 80, 15, 15 ) +SKIN.tex.RadioButtonD = GWEN.CreateTextureNormal( 464, 80, 15, 15 ) SKIN.tex.TreePlus = GWEN.CreateTextureNormal( 448, 96, 15, 15 ) SKIN.tex.TreeMinus = GWEN.CreateTextureNormal( 464, 96, 15, 15 ) ---SKIN.tex.Menu_Strip = GWEN.CreateTextureBorder( 0, 128, 127, 21, 1, 1, 1, 1 ) -SKIN.tex.TextBox = GWEN.CreateTextureBorder( 0, 150, 127, 21, 4, 4, 4, 4 ) -SKIN.tex.TextBox_Focus = GWEN.CreateTextureBorder( 0, 172, 127, 21, 4, 4, 4, 4 ) -SKIN.tex.TextBox_Disabled = GWEN.CreateTextureBorder( 0, 194, 127, 21, 4, 4, 4, 4 ) -SKIN.tex.MenuBG_Column = GWEN.CreateTextureBorder( 128, 128, 127, 63, 24, 8, 8, 8 ) -SKIN.tex.MenuBG = GWEN.CreateTextureBorder( 128, 192, 127, 63, 8, 8, 8, 8 ) -SKIN.tex.MenuBG_Hover = GWEN.CreateTextureBorder( 128, 256, 127, 31, 8, 8, 8, 8 ) +SKIN.tex.TextBox = GWEN.CreateTextureBorder( 0, 150, 127, 21, 4, 4, 4, 4 ) +SKIN.tex.TextBox_Focus = GWEN.CreateTextureBorder( 0, 172, 127, 21, 4, 4, 4, 4 ) +SKIN.tex.TextBox_Disabled = GWEN.CreateTextureBorder( 0, 194, 127, 21, 4, 4, 4, 4 ) +SKIN.tex.MenuBG_Column = GWEN.CreateTextureBorder( 128, 128, 127, 63, 24, 8, 8, 8 ) +SKIN.tex.MenuBG = GWEN.CreateTextureBorder( 128, 192, 127, 63, 8, 8, 8, 8 ) +SKIN.tex.MenuBG_Hover = GWEN.CreateTextureBorder( 128, 256, 127, 31, 8, 8, 8, 8 ) SKIN.tex.MenuBG_Spacer = GWEN.CreateTextureNormal( 128, 288, 127, 3 ) -SKIN.tex.Menu_Strip = GWEN.CreateTextureBorder( 0, 128, 127, 21, 8, 8, 8, 8) +SKIN.tex.Menu_Strip = GWEN.CreateTextureBorder( 0, 128, 127, 21, 8, 8, 8, 8 ) SKIN.tex.Menu_Check = GWEN.CreateTextureNormal( 448, 112, 15, 15 ) SKIN.tex.Tab_Control = GWEN.CreateTextureBorder( 0, 256, 127, 127, 8, 8, 8, 8 ) SKIN.tex.TabB_Active = GWEN.CreateTextureBorder( 0, 416, 63, 31, 8, 8, 8, 8 ) -SKIN.tex.TabB_Inactive = GWEN.CreateTextureBorder( 0+128, 416, 63, 31, 8, 8, 8, 8 ) +SKIN.tex.TabB_Inactive = GWEN.CreateTextureBorder( 128, 416, 63, 31, 8, 8, 8, 8 ) SKIN.tex.TabT_Active = GWEN.CreateTextureBorder( 0, 384, 63, 31, 8, 8, 8, 8 ) -SKIN.tex.TabT_Inactive = GWEN.CreateTextureBorder( 0+128, 384, 63, 31, 8, 8, 8, 8 ) +SKIN.tex.TabT_Inactive = GWEN.CreateTextureBorder( 128, 384, 63, 31, 8, 8, 8, 8 ) SKIN.tex.TabL_Active = GWEN.CreateTextureBorder( 64, 384, 31, 63, 8, 8, 8, 8 ) -SKIN.tex.TabL_Inactive = GWEN.CreateTextureBorder( 64+128, 384, 31, 63, 8, 8, 8, 8 ) +SKIN.tex.TabL_Inactive = GWEN.CreateTextureBorder( 64+128, 384, 31, 63, 8, 8, 8, 8 ) SKIN.tex.TabR_Active = GWEN.CreateTextureBorder( 96, 384, 31, 63, 8, 8, 8, 8 ) -SKIN.tex.TabR_Inactive = GWEN.CreateTextureBorder( 96+128, 384, 31, 63, 8, 8, 8, 8 ) +SKIN.tex.TabR_Inactive = GWEN.CreateTextureBorder( 96+128, 384, 31, 63, 8, 8, 8, 8 ) SKIN.tex.Tab_Bar = GWEN.CreateTextureBorder( 128, 352, 127, 31, 4, 4, 4, 4 ) SKIN.tex.Window = {} -SKIN.tex.Window.Normal = GWEN.CreateTextureBorder( 0, 0, 127, 127, 8, 32, 8, 8 ) -SKIN.tex.Window.Inactive = GWEN.CreateTextureBorder( 128, 0, 127, 127, 8, 32, 8, 8 ) +SKIN.tex.Window.Normal = GWEN.CreateTextureBorder( 0, 0, 127, 127, 8, 24, 8, 8 ) +SKIN.tex.Window.Inactive = GWEN.CreateTextureBorder( 128, 0, 127, 127, 8, 24, 8, 8 ) -SKIN.tex.Window.Close = GWEN.CreateTextureNormal( 32, 448, 31, 31 ); -SKIN.tex.Window.Close_Hover = GWEN.CreateTextureNormal( 64, 448, 31, 31 ); -SKIN.tex.Window.Close_Down = GWEN.CreateTextureNormal( 96, 448, 31, 31 ); +SKIN.tex.Window.Close = GWEN.CreateTextureNormal( 32, 448, 31, 24 ) +SKIN.tex.Window.Close_Hover = GWEN.CreateTextureNormal( 64, 448, 31, 24 ) +SKIN.tex.Window.Close_Down = GWEN.CreateTextureNormal( 96, 448, 31, 24 ) -SKIN.tex.Window.Maxi = GWEN.CreateTextureNormal( 32 + 96*2, 448, 31, 31 ); -SKIN.tex.Window.Maxi_Hover = GWEN.CreateTextureNormal( 64 + 96*2, 448, 31, 31 ); -SKIN.tex.Window.Maxi_Down = GWEN.CreateTextureNormal( 96 + 96*2, 448, 31, 31 ); +SKIN.tex.Window.Maxi = GWEN.CreateTextureNormal( 32 + 96 * 2, 448, 31, 24 ) +SKIN.tex.Window.Maxi_Hover = GWEN.CreateTextureNormal( 64 + 96 * 2, 448, 31, 24 ) +SKIN.tex.Window.Maxi_Down = GWEN.CreateTextureNormal( 96 + 96 * 2, 448, 31, 24 ) -SKIN.tex.Window.Restore = GWEN.CreateTextureNormal( 32 + 96*2, 448+32, 31, 31 ); -SKIN.tex.Window.Restore_Hover = GWEN.CreateTextureNormal( 64 + 96*2, 448+32, 31, 31 ); -SKIN.tex.Window.Restore_Down = GWEN.CreateTextureNormal( 96 + 96*2, 448+32, 31, 31 ); +SKIN.tex.Window.Restore = GWEN.CreateTextureNormal( 32 + 96 * 2, 448 + 32, 31, 24 ) +SKIN.tex.Window.Restore_Hover = GWEN.CreateTextureNormal( 64 + 96 * 2, 448 + 32, 31, 24 ) +SKIN.tex.Window.Restore_Down = GWEN.CreateTextureNormal( 96 + 96 * 2, 448 + 32, 31, 24 ) -SKIN.tex.Window.Mini = GWEN.CreateTextureNormal( 32 + 96, 448, 31, 31 ); -SKIN.tex.Window.Mini_Hover = GWEN.CreateTextureNormal( 64 + 96, 448, 31, 31 ); -SKIN.tex.Window.Mini_Down = GWEN.CreateTextureNormal( 96 + 96, 448, 31, 31 ); +SKIN.tex.Window.Mini = GWEN.CreateTextureNormal( 32 + 96, 448, 31, 24 ) +SKIN.tex.Window.Mini_Hover = GWEN.CreateTextureNormal( 64 + 96, 448, 31, 24 ) +SKIN.tex.Window.Mini_Down = GWEN.CreateTextureNormal( 96 + 96, 448, 31, 24 ) SKIN.tex.Scroller = {} -SKIN.tex.Scroller.TrackV = GWEN.CreateTextureBorder( 384, 208, 15, 127, 4, 4, 4, 4 ); -SKIN.tex.Scroller.ButtonV_Normal = GWEN.CreateTextureBorder( 384 + 16, 208, 15, 127, 4, 4, 4, 4 ); -SKIN.tex.Scroller.ButtonV_Hover = GWEN.CreateTextureBorder( 384 + 32, 208, 15, 127, 4, 4, 4, 4 ); -SKIN.tex.Scroller.ButtonV_Down = GWEN.CreateTextureBorder( 384 + 48, 208, 15, 127, 4, 4, 4, 4 ); -SKIN.tex.Scroller.ButtonV_Disabled = GWEN.CreateTextureBorder( 384 + 64, 208, 15, 127, 4, 4, 4, 4 ); +SKIN.tex.Scroller.TrackV = GWEN.CreateTextureBorder( 384, 208, 15, 127, 4, 4, 4, 4 ) +SKIN.tex.Scroller.ButtonV_Normal = GWEN.CreateTextureBorder( 384 + 16, 208, 15, 127, 4, 4, 4, 4 ) +SKIN.tex.Scroller.ButtonV_Hover = GWEN.CreateTextureBorder( 384 + 32, 208, 15, 127, 4, 4, 4, 4 ) +SKIN.tex.Scroller.ButtonV_Down = GWEN.CreateTextureBorder( 384 + 48, 208, 15, 127, 4, 4, 4, 4 ) +SKIN.tex.Scroller.ButtonV_Disabled = GWEN.CreateTextureBorder( 384 + 64, 208, 15, 127, 4, 4, 4, 4 ) -SKIN.tex.Scroller.TrackH = GWEN.CreateTextureBorder( 384, 128, 127, 15, 4, 4, 4, 4 ); -SKIN.tex.Scroller.ButtonH_Normal = GWEN.CreateTextureBorder( 384, 128 + 16, 127, 15, 4, 4, 4, 4 ); -SKIN.tex.Scroller.ButtonH_Hover = GWEN.CreateTextureBorder( 384, 128 + 32, 127, 15, 4, 4, 4, 4 ); -SKIN.tex.Scroller.ButtonH_Down = GWEN.CreateTextureBorder( 384, 128 + 48, 127, 15, 4, 4, 4, 4 ); -SKIN.tex.Scroller.ButtonH_Disabled = GWEN.CreateTextureBorder( 384, 128 + 64, 127, 15, 4, 4, 4, 4 ); +SKIN.tex.Scroller.TrackH = GWEN.CreateTextureBorder( 384, 128, 127, 15, 4, 4, 4, 4 ) +SKIN.tex.Scroller.ButtonH_Normal = GWEN.CreateTextureBorder( 384, 128 + 16, 127, 15, 4, 4, 4, 4 ) +SKIN.tex.Scroller.ButtonH_Hover = GWEN.CreateTextureBorder( 384, 128 + 32, 127, 15, 4, 4, 4, 4 ) +SKIN.tex.Scroller.ButtonH_Down = GWEN.CreateTextureBorder( 384, 128 + 48, 127, 15, 4, 4, 4, 4 ) +SKIN.tex.Scroller.ButtonH_Disabled = GWEN.CreateTextureBorder( 384, 128 + 64, 127, 15, 4, 4, 4, 4 ) -SKIN.tex.Scroller.LeftButton_Normal = GWEN.CreateTextureBorder( 464, 208, 15, 15, 2, 2, 2, 2 ); -SKIN.tex.Scroller.LeftButton_Hover = GWEN.CreateTextureBorder( 480, 208, 15, 15, 2, 2, 2, 2 ); -SKIN.tex.Scroller.LeftButton_Down = GWEN.CreateTextureBorder( 464, 272, 15, 15, 2, 2, 2, 2 ); -SKIN.tex.Scroller.LeftButton_Disabled = GWEN.CreateTextureBorder( 480 + 48, 272, 15, 15, 2, 2, 2, 2 ); +SKIN.tex.Scroller.LeftButton_Normal = GWEN.CreateTextureBorder( 464, 208, 15, 15, 2, 2, 2, 2 ) +SKIN.tex.Scroller.LeftButton_Hover = GWEN.CreateTextureBorder( 480, 208, 15, 15, 2, 2, 2, 2 ) +SKIN.tex.Scroller.LeftButton_Down = GWEN.CreateTextureBorder( 464, 272, 15, 15, 2, 2, 2, 2 ) +SKIN.tex.Scroller.LeftButton_Disabled = GWEN.CreateTextureBorder( 480 + 48, 272, 15, 15, 2, 2, 2, 2 ) -SKIN.tex.Scroller.UpButton_Normal = GWEN.CreateTextureBorder( 464, 208 + 16, 15, 15, 2, 2, 2, 2 ); -SKIN.tex.Scroller.UpButton_Hover = GWEN.CreateTextureBorder( 480, 208 + 16, 15, 15, 2, 2, 2, 2 ); -SKIN.tex.Scroller.UpButton_Down = GWEN.CreateTextureBorder( 464, 272 + 16, 15, 15, 2, 2, 2, 2 ); -SKIN.tex.Scroller.UpButton_Disabled = GWEN.CreateTextureBorder( 480 + 48, 272 + 16, 15, 15, 2, 2, 2, 2 ); +SKIN.tex.Scroller.UpButton_Normal = GWEN.CreateTextureBorder( 464, 208 + 16, 15, 15, 2, 2, 2, 2 ) +SKIN.tex.Scroller.UpButton_Hover = GWEN.CreateTextureBorder( 480, 208 + 16, 15, 15, 2, 2, 2, 2 ) +SKIN.tex.Scroller.UpButton_Down = GWEN.CreateTextureBorder( 464, 272 + 16, 15, 15, 2, 2, 2, 2 ) +SKIN.tex.Scroller.UpButton_Disabled = GWEN.CreateTextureBorder( 480 + 48, 272 + 16, 15, 15, 2, 2, 2, 2 ) -SKIN.tex.Scroller.RightButton_Normal = GWEN.CreateTextureBorder( 464, 208 + 32, 15, 15, 2, 2, 2, 2 ); -SKIN.tex.Scroller.RightButton_Hover = GWEN.CreateTextureBorder( 480, 208 + 32, 15, 15, 2, 2, 2, 2 ); -SKIN.tex.Scroller.RightButton_Down = GWEN.CreateTextureBorder( 464, 272 + 32, 15, 15, 2, 2, 2, 2 ); -SKIN.tex.Scroller.RightButton_Disabled = GWEN.CreateTextureBorder( 480 + 48, 272 + 32, 15, 15, 2, 2, 2, 2 ); +SKIN.tex.Scroller.RightButton_Normal = GWEN.CreateTextureBorder( 464, 208 + 32, 15, 15, 2, 2, 2, 2 ) +SKIN.tex.Scroller.RightButton_Hover = GWEN.CreateTextureBorder( 480, 208 + 32, 15, 15, 2, 2, 2, 2 ) +SKIN.tex.Scroller.RightButton_Down = GWEN.CreateTextureBorder( 464, 272 + 32, 15, 15, 2, 2, 2, 2 ) +SKIN.tex.Scroller.RightButton_Disabled = GWEN.CreateTextureBorder( 480 + 48, 272 + 32, 15, 15, 2, 2, 2, 2 ) -SKIN.tex.Scroller.DownButton_Normal = GWEN.CreateTextureBorder( 464, 208 + 48, 15, 15, 2, 2, 2, 2 ); -SKIN.tex.Scroller.DownButton_Hover = GWEN.CreateTextureBorder( 480, 208 + 48, 15, 15, 2, 2, 2, 2 ); -SKIN.tex.Scroller.DownButton_Down = GWEN.CreateTextureBorder( 464, 272 + 48, 15, 15, 2, 2, 2, 2 ); -SKIN.tex.Scroller.DownButton_Disabled = GWEN.CreateTextureBorder( 480 + 48, 272 + 48, 15, 15, 2, 2, 2, 2 ); +SKIN.tex.Scroller.DownButton_Normal = GWEN.CreateTextureBorder( 464, 208 + 48, 15, 15, 2, 2, 2, 2 ) +SKIN.tex.Scroller.DownButton_Hover = GWEN.CreateTextureBorder( 480, 208 + 48, 15, 15, 2, 2, 2, 2 ) +SKIN.tex.Scroller.DownButton_Down = GWEN.CreateTextureBorder( 464, 272 + 48, 15, 15, 2, 2, 2, 2 ) +SKIN.tex.Scroller.DownButton_Disabled = GWEN.CreateTextureBorder( 480 + 48, 272 + 48, 15, 15, 2, 2, 2, 2 ) SKIN.tex.Menu = {} -SKIN.tex.Menu.RightArrow = GWEN.CreateTextureNormal( 464, 112, 15, 15 ); +SKIN.tex.Menu.RightArrow = GWEN.CreateTextureNormal( 464, 112, 15, 15 ) SKIN.tex.Input = {} SKIN.tex.Input.ComboBox = {} -SKIN.tex.Input.ComboBox.Normal = GWEN.CreateTextureBorder( 384, 336, 127, 31, 8, 8, 32, 8 ); -SKIN.tex.Input.ComboBox.Hover = GWEN.CreateTextureBorder( 384, 336+32, 127, 31, 8, 8, 32, 8 ); -SKIN.tex.Input.ComboBox.Down = GWEN.CreateTextureBorder( 384, 336+64, 127, 31, 8, 8, 32, 8 ); -SKIN.tex.Input.ComboBox.Disabled = GWEN.CreateTextureBorder( 384, 336+96, 127, 31, 8, 8, 32, 8 ); +SKIN.tex.Input.ComboBox.Normal = GWEN.CreateTextureBorder( 384, 336, 127, 31, 8, 8, 32, 8 ) +SKIN.tex.Input.ComboBox.Hover = GWEN.CreateTextureBorder( 384, 336+32, 127, 31, 8, 8, 32, 8 ) +SKIN.tex.Input.ComboBox.Down = GWEN.CreateTextureBorder( 384, 336+64, 127, 31, 8, 8, 32, 8 ) +SKIN.tex.Input.ComboBox.Disabled = GWEN.CreateTextureBorder( 384, 336+96, 127, 31, 8, 8, 32, 8 ) SKIN.tex.Input.ComboBox.Button = {} -SKIN.tex.Input.ComboBox.Button.Normal = GWEN.CreateTextureNormal( 496, 272, 15, 15 ); -SKIN.tex.Input.ComboBox.Button.Hover = GWEN.CreateTextureNormal( 496, 272+16, 15, 15 ); -SKIN.tex.Input.ComboBox.Button.Down = GWEN.CreateTextureNormal( 496, 272+32, 15, 15 ); -SKIN.tex.Input.ComboBox.Button.Disabled = GWEN.CreateTextureNormal( 496, 272+48, 15, 15 ); +SKIN.tex.Input.ComboBox.Button.Normal = GWEN.CreateTextureNormal( 496, 272, 15, 15 ) +SKIN.tex.Input.ComboBox.Button.Hover = GWEN.CreateTextureNormal( 496, 272+16, 15, 15 ) +SKIN.tex.Input.ComboBox.Button.Down = GWEN.CreateTextureNormal( 496, 272+32, 15, 15 ) +SKIN.tex.Input.ComboBox.Button.Disabled = GWEN.CreateTextureNormal( 496, 272+48, 15, 15 ) SKIN.tex.Input.UpDown = {} SKIN.tex.Input.UpDown.Up = {} -SKIN.tex.Input.UpDown.Up.Normal = GWEN.CreateTextureCentered( 384, 112, 7, 7 ); -SKIN.tex.Input.UpDown.Up.Hover = GWEN.CreateTextureCentered( 384+8, 112, 7, 7 ); -SKIN.tex.Input.UpDown.Up.Down = GWEN.CreateTextureCentered( 384+16, 112, 7, 7 ); -SKIN.tex.Input.UpDown.Up.Disabled = GWEN.CreateTextureCentered( 384+24, 112, 7, 7 ); +SKIN.tex.Input.UpDown.Up.Normal = GWEN.CreateTextureCentered( 384, 112, 7, 7 ) +SKIN.tex.Input.UpDown.Up.Hover = GWEN.CreateTextureCentered( 384+8, 112, 7, 7 ) +SKIN.tex.Input.UpDown.Up.Down = GWEN.CreateTextureCentered( 384+16, 112, 7, 7 ) +SKIN.tex.Input.UpDown.Up.Disabled = GWEN.CreateTextureCentered( 384+24, 112, 7, 7 ) SKIN.tex.Input.UpDown.Down = {} -SKIN.tex.Input.UpDown.Down.Normal = GWEN.CreateTextureCentered( 384, 120, 7, 7 ); -SKIN.tex.Input.UpDown.Down.Hover = GWEN.CreateTextureCentered( 384+8, 120, 7, 7 ); -SKIN.tex.Input.UpDown.Down.Down = GWEN.CreateTextureCentered( 384+16, 120, 7, 7 ); -SKIN.tex.Input.UpDown.Down.Disabled = GWEN.CreateTextureCentered( 384+24, 120, 7, 7 ); +SKIN.tex.Input.UpDown.Down.Normal = GWEN.CreateTextureCentered( 384, 120, 7, 7 ) +SKIN.tex.Input.UpDown.Down.Hover = GWEN.CreateTextureCentered( 384+8, 120, 7, 7 ) +SKIN.tex.Input.UpDown.Down.Down = GWEN.CreateTextureCentered( 384+16, 120, 7, 7 ) +SKIN.tex.Input.UpDown.Down.Disabled = GWEN.CreateTextureCentered( 384+24, 120, 7, 7 ) SKIN.tex.Input.Slider = {} SKIN.tex.Input.Slider.H = {} -SKIN.tex.Input.Slider.H.Normal = GWEN.CreateTextureNormal( 416, 32, 15, 15 ); -SKIN.tex.Input.Slider.H.Hover = GWEN.CreateTextureNormal( 416, 32+16, 15, 15 ); -SKIN.tex.Input.Slider.H.Down = GWEN.CreateTextureNormal( 416, 32+32, 15, 15 ); -SKIN.tex.Input.Slider.H.Disabled = GWEN.CreateTextureNormal( 416, 32+48, 15, 15 ); +SKIN.tex.Input.Slider.H.Normal = GWEN.CreateTextureNormal( 416, 32, 15, 15 ) +SKIN.tex.Input.Slider.H.Hover = GWEN.CreateTextureNormal( 416, 32+16, 15, 15 ) +SKIN.tex.Input.Slider.H.Down = GWEN.CreateTextureNormal( 416, 32+32, 15, 15 ) +SKIN.tex.Input.Slider.H.Disabled = GWEN.CreateTextureNormal( 416, 32+48, 15, 15 ) SKIN.tex.Input.Slider.V = {} -SKIN.tex.Input.Slider.V.Normal = GWEN.CreateTextureNormal( 416+16, 32, 15, 15 ); -SKIN.tex.Input.Slider.V.Hover = GWEN.CreateTextureNormal( 416+16, 32+16, 15, 15 ); -SKIN.tex.Input.Slider.V.Down = GWEN.CreateTextureNormal( 416+16, 32+32, 15, 15 ); -SKIN.tex.Input.Slider.V.Disabled = GWEN.CreateTextureNormal( 416+16, 32+48, 15, 15 ); +SKIN.tex.Input.Slider.V.Normal = GWEN.CreateTextureNormal( 416+16, 32, 15, 15 ) +SKIN.tex.Input.Slider.V.Hover = GWEN.CreateTextureNormal( 416+16, 32+16, 15, 15 ) +SKIN.tex.Input.Slider.V.Down = GWEN.CreateTextureNormal( 416+16, 32+32, 15, 15 ) +SKIN.tex.Input.Slider.V.Disabled = GWEN.CreateTextureNormal( 416+16, 32+48, 15, 15 ) SKIN.tex.Input.ListBox = {} -SKIN.tex.Input.ListBox.Background = GWEN.CreateTextureBorder( 256, 256, 63, 127, 8, 8, 8, 8 ); -SKIN.tex.Input.ListBox.Hovered = GWEN.CreateTextureBorder( 320, 320, 31, 31, 8, 8, 8, 8 ); -SKIN.tex.Input.ListBox.EvenLine = GWEN.CreateTextureBorder( 352, 256, 31, 31, 8, 8, 8, 8 ); -SKIN.tex.Input.ListBox.OddLine = GWEN.CreateTextureBorder( 352, 288, 31, 31, 8, 8, 8, 8 ); -SKIN.tex.Input.ListBox.EvenLineSelected = GWEN.CreateTextureBorder( 320, 270, 31, 31, 8, 8, 8, 8 ); -SKIN.tex.Input.ListBox.OddLineSelected = GWEN.CreateTextureBorder( 320, 288, 31, 31, 8, 8, 8, 8 ); +SKIN.tex.Input.ListBox.Background = GWEN.CreateTextureBorder( 256, 256, 63, 127, 8, 8, 8, 8 ) +SKIN.tex.Input.ListBox.Hovered = GWEN.CreateTextureBorder( 320, 320, 31, 31, 8, 8, 8, 8 ) +SKIN.tex.Input.ListBox.EvenLine = GWEN.CreateTextureBorder( 352, 256, 31, 31, 8, 8, 8, 8 ) +SKIN.tex.Input.ListBox.OddLine = GWEN.CreateTextureBorder( 352, 288, 31, 31, 8, 8, 8, 8 ) +SKIN.tex.Input.ListBox.EvenLineSelected = GWEN.CreateTextureBorder( 320, 256, 31, 31, 8, 8, 8, 8 ) +SKIN.tex.Input.ListBox.OddLineSelected = GWEN.CreateTextureBorder( 320, 288, 31, 31, 8, 8, 8, 8 ) SKIN.tex.ProgressBar = {} -SKIN.tex.ProgressBar.Back = GWEN.CreateTextureBorder( 384, 0, 31, 31, 8, 8, 8, 8 ); -SKIN.tex.ProgressBar.Front = GWEN.CreateTextureBorder( 384+32, 0, 31, 31, 8, 8, 8, 8 ); - +SKIN.tex.ProgressBar.Back = GWEN.CreateTextureBorder( 384, 0, 31, 31, 8, 8, 8, 8 ) +SKIN.tex.ProgressBar.Front = GWEN.CreateTextureBorder( 384+32, 0, 31, 31, 8, 8, 8, 8 ) SKIN.tex.CategoryList = {} -SKIN.tex.CategoryList.Outer = GWEN.CreateTextureBorder( 256, 384, 63, 63, 8, 8, 8, 8 ); -SKIN.tex.CategoryList.Inner = GWEN.CreateTextureBorder( 256 + 64, 384, 63, 63, 8, 21, 8, 8 ); -SKIN.tex.CategoryList.Header = GWEN.CreateTextureBorder( 320, 352, 63, 31, 8, 8, 8, 8 ); +SKIN.tex.CategoryList.Outer = GWEN.CreateTextureBorder( 256, 384, 63, 63, 8, 8, 8, 8 ) +SKIN.tex.CategoryList.Inner = GWEN.CreateTextureBorder( 320, 384, 63, 63, 8, 21, 8, 8 ) +SKIN.tex.CategoryList.Header = GWEN.CreateTextureBorder( 320, 352, 63, 31, 8, 8, 8, 8 ) -SKIN.tex.Tooltip = GWEN.CreateTextureBorder( 384, 64, 31, 31, 8, 8, 8, 8 ); +SKIN.tex.Tooltip = GWEN.CreateTextureBorder( 384, 64, 31, 31, 8, 8, 8, 8 ) SKIN.Colours = {} SKIN.Colours.Window = {} -SKIN.Colours.Window.TitleActive = GWEN.TextureColor( 4 + 8 * 0, 508 ); -SKIN.Colours.Window.TitleInactive = GWEN.TextureColor( 4 + 8 * 1, 508 ); +SKIN.Colours.Window.TitleActive = GWEN.TextureColor( 4 + 8 * 0, 508 ) +SKIN.Colours.Window.TitleInactive = GWEN.TextureColor( 4 + 8 * 1, 508 ) SKIN.Colours.Button = {} -SKIN.Colours.Button.Normal = GWEN.TextureColor( 4 + 8 * 2, 508 ); -SKIN.Colours.Button.Hover = GWEN.TextureColor( 4 + 8 * 3, 508 ); -SKIN.Colours.Button.Down = GWEN.TextureColor( 4 + 8 * 2, 500 ); -SKIN.Colours.Button.Disabled = GWEN.TextureColor( 4 + 8 * 3, 500 ); +SKIN.Colours.Button.Normal = GWEN.TextureColor( 4 + 8 * 2, 508 ) +SKIN.Colours.Button.Hover = GWEN.TextureColor( 4 + 8 * 3, 508 ) +SKIN.Colours.Button.Down = GWEN.TextureColor( 4 + 8 * 2, 500 ) +SKIN.Colours.Button.Disabled = GWEN.TextureColor( 4 + 8 * 3, 500 ) SKIN.Colours.Tab = {} SKIN.Colours.Tab.Active = {} -SKIN.Colours.Tab.Active.Normal = GWEN.TextureColor( 4 + 8 * 4, 508 ); -SKIN.Colours.Tab.Active.Hover = GWEN.TextureColor( 4 + 8 * 5, 508 ); -SKIN.Colours.Tab.Active.Down = GWEN.TextureColor( 4 + 8 * 4, 500 ); -SKIN.Colours.Tab.Active.Disabled = GWEN.TextureColor( 4 + 8 * 5, 500 ); +SKIN.Colours.Tab.Active.Normal = GWEN.TextureColor( 4 + 8 * 4, 508 ) +SKIN.Colours.Tab.Active.Hover = GWEN.TextureColor( 4 + 8 * 5, 508 ) +SKIN.Colours.Tab.Active.Down = GWEN.TextureColor( 4 + 8 * 4, 500 ) +SKIN.Colours.Tab.Active.Disabled = GWEN.TextureColor( 4 + 8 * 5, 500 ) SKIN.Colours.Tab.Inactive = {} -SKIN.Colours.Tab.Inactive.Normal = GWEN.TextureColor( 4 + 8 * 6, 508 ); -SKIN.Colours.Tab.Inactive.Hover = GWEN.TextureColor( 4 + 8 * 7, 508 ); -SKIN.Colours.Tab.Inactive.Down = GWEN.TextureColor( 4 + 8 * 6, 500 ); -SKIN.Colours.Tab.Inactive.Disabled = GWEN.TextureColor( 4 + 8 * 7, 500 ); +SKIN.Colours.Tab.Inactive.Normal = GWEN.TextureColor( 4 + 8 * 6, 508 ) +SKIN.Colours.Tab.Inactive.Hover = GWEN.TextureColor( 4 + 8 * 7, 508 ) +SKIN.Colours.Tab.Inactive.Down = GWEN.TextureColor( 4 + 8 * 6, 500 ) +SKIN.Colours.Tab.Inactive.Disabled = GWEN.TextureColor( 4 + 8 * 7, 500 ) SKIN.Colours.Label = {} -SKIN.Colours.Label.Default = GWEN.TextureColor( 4 + 8 * 9, 508 ); -SKIN.Colours.Label.Bright = GWEN.TextureColor( 4 + 8 * 9, 508 ); -SKIN.Colours.Label.Dark = GWEN.TextureColor( 4 + 8 * 8, 500 ); -SKIN.Colours.Label.Highlight = GWEN.TextureColor( 4 + 8 * 9, 500 ); +SKIN.Colours.Label.Default = GWEN.TextureColor( 4 + 8 * 8, 508 ) +SKIN.Colours.Label.Bright = GWEN.TextureColor( 4 + 8 * 9, 508 ) +SKIN.Colours.Label.Dark = GWEN.TextureColor( 4 + 8 * 8, 500 ) +SKIN.Colours.Label.Highlight = GWEN.TextureColor( 4 + 8 * 9, 500 ) SKIN.Colours.Tree = {} -SKIN.Colours.Tree.Lines = GWEN.TextureColor( 4 + 8 * 10, 508 ); ---- !!! -SKIN.Colours.Tree.Normal = GWEN.TextureColor( 4 + 8 * 11, 508 ); -SKIN.Colours.Tree.Hover = GWEN.TextureColor( 4 + 8 * 10, 500 ); -SKIN.Colours.Tree.Selected = GWEN.TextureColor( 4 + 8 * 11, 500 ); +SKIN.Colours.Tree.Lines = GWEN.TextureColor( 4 + 8 * 10, 508 ) ---- !!! +SKIN.Colours.Tree.Normal = GWEN.TextureColor( 4 + 8 * 11, 508 ) +SKIN.Colours.Tree.Hover = GWEN.TextureColor( 4 + 8 * 10, 500 ) +SKIN.Colours.Tree.Selected = GWEN.TextureColor( 4 + 8 * 11, 500 ) SKIN.Colours.Properties = {} -SKIN.Colours.Properties.Line_Normal = GWEN.TextureColor( 4 + 8 * 12, 508 ); -SKIN.Colours.Properties.Line_Selected = GWEN.TextureColor( 4 + 8 * 13, 508 ); -SKIN.Colours.Properties.Line_Hover = GWEN.TextureColor( 4 + 8 * 12, 500 ); -SKIN.Colours.Properties.Title = GWEN.TextureColor( 4 + 8 * 13, 500 ); -SKIN.Colours.Properties.Column_Normal = GWEN.TextureColor( 4 + 8 * 14, 508 ); -SKIN.Colours.Properties.Column_Selected = GWEN.TextureColor( 4 + 8 * 15, 508 ); -SKIN.Colours.Properties.Column_Hover = GWEN.TextureColor( 4 + 8 * 14, 500 ); -SKIN.Colours.Properties.Border = GWEN.TextureColor( 4 + 8 * 15, 500 ); -SKIN.Colours.Properties.Label_Normal = GWEN.TextureColor( 4 + 8 * 16, 508 ); -SKIN.Colours.Properties.Label_Selected = GWEN.TextureColor( 4 + 8 * 17, 508 ); -SKIN.Colours.Properties.Label_Hover = GWEN.TextureColor( 4 + 8 * 16, 500 ); +SKIN.Colours.Properties.Line_Normal = GWEN.TextureColor( 4 + 8 * 12, 508 ) +SKIN.Colours.Properties.Line_Selected = GWEN.TextureColor( 4 + 8 * 13, 508 ) +SKIN.Colours.Properties.Line_Hover = GWEN.TextureColor( 4 + 8 * 12, 500 ) +SKIN.Colours.Properties.Title = GWEN.TextureColor( 4 + 8 * 13, 500 ) +SKIN.Colours.Properties.Column_Normal = GWEN.TextureColor( 4 + 8 * 14, 508 ) +SKIN.Colours.Properties.Column_Selected = GWEN.TextureColor( 4 + 8 * 15, 508 ) +SKIN.Colours.Properties.Column_Hover = GWEN.TextureColor( 4 + 8 * 14, 500 ) +SKIN.Colours.Properties.Border = GWEN.TextureColor( 4 + 8 * 15, 500 ) +SKIN.Colours.Properties.Label_Normal = GWEN.TextureColor( 4 + 8 * 16, 508 ) +SKIN.Colours.Properties.Label_Selected = GWEN.TextureColor( 4 + 8 * 17, 508 ) +SKIN.Colours.Properties.Label_Hover = GWEN.TextureColor( 4 + 8 * 16, 500 ) SKIN.Colours.Category = {} -SKIN.Colours.Category.Header = GWEN.TextureColor( 4 + 8 * 18, 500 ); -SKIN.Colours.Category.Header_Closed = GWEN.TextureColor( 4 + 8 * 19, 500 ); +SKIN.Colours.Category.Header = GWEN.TextureColor( 4 + 8 * 18, 500 ) +SKIN.Colours.Category.Header_Closed = GWEN.TextureColor( 4 + 8 * 19, 500 ) SKIN.Colours.Category.Line = {} -SKIN.Colours.Category.Line.Text = GWEN.TextureColor( 4 + 8 * 20, 508 ); -SKIN.Colours.Category.Line.Text_Hover = GWEN.TextureColor( 4 + 8 * 21, 508 ); -SKIN.Colours.Category.Line.Text_Selected = GWEN.TextureColor( 4 + 8 * 20, 500 ); -SKIN.Colours.Category.Line.Button = GWEN.TextureColor( 4 + 8 * 21, 500 ); -SKIN.Colours.Category.Line.Button_Hover = GWEN.TextureColor( 4 + 8 * 22, 508 ); -SKIN.Colours.Category.Line.Button_Selected = GWEN.TextureColor( 4 + 8 * 23, 508 ); +SKIN.Colours.Category.Line.Text = GWEN.TextureColor( 4 + 8 * 20, 508 ) +SKIN.Colours.Category.Line.Text_Hover = GWEN.TextureColor( 4 + 8 * 21, 508 ) +SKIN.Colours.Category.Line.Text_Selected = GWEN.TextureColor( 4 + 8 * 20, 500 ) +SKIN.Colours.Category.Line.Button = GWEN.TextureColor( 4 + 8 * 21, 500 ) +SKIN.Colours.Category.Line.Button_Hover = GWEN.TextureColor( 4 + 8 * 22, 508 ) +SKIN.Colours.Category.Line.Button_Selected = GWEN.TextureColor( 4 + 8 * 23, 508 ) SKIN.Colours.Category.LineAlt = {} -SKIN.Colours.Category.LineAlt.Text = GWEN.TextureColor( 4 + 8 * 22, 500 ); -SKIN.Colours.Category.LineAlt.Text_Hover = GWEN.TextureColor( 4 + 8 * 23, 500 ); -SKIN.Colours.Category.LineAlt.Text_Selected = GWEN.TextureColor( 4 + 8 * 24, 508 ); -SKIN.Colours.Category.LineAlt.Button = GWEN.TextureColor( 4 + 8 * 25, 508 ); -SKIN.Colours.Category.LineAlt.Button_Hover = GWEN.TextureColor( 4 + 8 * 24, 500 ); -SKIN.Colours.Category.LineAlt.Button_Selected = GWEN.TextureColor( 4 + 8 * 25, 500 ); - -SKIN.Colours.TooltipText = GWEN.TextureColor( 4 + 8 * 26, 500 ); +SKIN.Colours.Category.LineAlt.Text = GWEN.TextureColor( 4 + 8 * 22, 500 ) +SKIN.Colours.Category.LineAlt.Text_Hover = GWEN.TextureColor( 4 + 8 * 23, 500 ) +SKIN.Colours.Category.LineAlt.Text_Selected = GWEN.TextureColor( 4 + 8 * 24, 508 ) +SKIN.Colours.Category.LineAlt.Button = GWEN.TextureColor( 4 + 8 * 25, 508 ) +SKIN.Colours.Category.LineAlt.Button_Hover = GWEN.TextureColor( 4 + 8 * 24, 500 ) +SKIN.Colours.Category.LineAlt.Button_Selected = GWEN.TextureColor( 4 + 8 * 25, 500 ) +SKIN.Colours.TooltipText = GWEN.TextureColor( 4 + 8 * 26, 500 ) --[[--------------------------------------------------------- Panel @@ -326,7 +320,7 @@ SKIN.Colours.TooltipText = GWEN.TextureColor( 4 + 8 * 26, 500 ); function SKIN:PaintPanel( panel, w, h ) if ( !panel.m_bBackground ) then return end - self.tex.Panels.Normal( 0, 0, w, h, panel.m_bgColor ); + self.tex.Panels.Normal( 0, 0, w, h, panel.m_bgColor ) end @@ -335,7 +329,7 @@ end -----------------------------------------------------------]] function SKIN:PaintShadow( panel, w, h ) - SKIN.tex.Shadow( 0, 0, w, h ); + SKIN.tex.Shadow( 0, 0, w, h ) end @@ -344,22 +338,21 @@ end -----------------------------------------------------------]] function SKIN:PaintFrame( panel, w, h ) - if ( panel.m_bPaintShadow ) then DisableClipping( true ) - SKIN.tex.Shadow( -4, -4, w+10, h+10 ); + SKIN.tex.Shadow( -4, -4, w+10, h+10 ) DisableClipping( false ) end if ( panel:HasHierarchicalFocus() ) then - self.tex.Window.Normal( 0, 0, w, h ); + self.tex.Window.Normal( 0, 0, w, h ) else - self.tex.Window.Inactive( 0, 0, w, h ); + self.tex.Window.Inactive( 0, 0, w, h ) end @@ -373,22 +366,21 @@ function SKIN:PaintButton( panel, w, h ) if ( !panel.m_bBackground ) then return end if ( panel.Depressed || panel:IsSelected() || panel:GetToggle() ) then - return self.tex.Button_Down( 0, 0, w, h ); + return self.tex.Button_Down( 0, 0, w, h ) end if ( panel:GetDisabled() ) then - return self.tex.Button_Dead( 0, 0, w, h ); + return self.tex.Button_Dead( 0, 0, w, h ) end if ( panel.Hovered ) then - return self.tex.Button_Hovered( 0, 0, w, h ); + return self.tex.Button_Hovered( 0, 0, w, h ) end - self.tex.Button( 0, 0, w, h ); + self.tex.Button( 0, 0, w, h ) end - --[[--------------------------------------------------------- Tree -----------------------------------------------------------]] @@ -396,11 +388,10 @@ function SKIN:PaintTree( panel, w, h ) if ( !panel.m_bBackground ) then return end - self.tex.Tree( 0, 0, w, h, panel.m_bgColor ); + self.tex.Tree( 0, 0, w, h, panel.m_bgColor ) end - --[[--------------------------------------------------------- CheckBox -----------------------------------------------------------]] @@ -456,15 +447,23 @@ function SKIN:PaintTextEntry( panel, w, h ) end - panel:DrawTextEntryText( panel.m_colText, panel.m_colHighlight, panel.m_colCursor ) + -- Hack on a hack, but this produces the most close appearance to what it will actually look if text was actually there + if ( panel.GetPlaceholderText && panel.GetPlaceholderColor && panel:GetPlaceholderText() && panel:GetPlaceholderText():Trim() != "" && panel:GetPlaceholderColor() && ( !panel:GetText() || panel:GetText() == "" ) ) then -end + local oldText = panel:GetText() -function SKIN:SchemeTextEntry( panel ) ---------------------- TODO + local str = panel:GetPlaceholderText() + if ( str:StartWith( "#" ) ) then str = str:sub( 2 ) end + str = language.GetPhrase( str ) - panel:SetTextColor( self.colTextEntryText ) - panel:SetHighlightColor( self.colTextEntryTextHighlight ) - panel:SetCursorColor( self.colTextEntryTextCursor ) + panel:SetText( str ) + panel:DrawTextEntryText( panel:GetPlaceholderColor(), panel:GetHighlightColor(), self.Colours.Label.Dark ) + panel:SetText( oldText ) + + return + end + + panel:DrawTextEntryText( self.Colours.Label.Dark, panel:GetHighlightColor(), self.Colours.Label.Dark ) end @@ -486,7 +485,8 @@ end -----------------------------------------------------------]] function SKIN:PaintMenuSpacer( panel, w, h ) - self.tex.MenuBG( 0, 0, w, h ) + surface.SetDrawColor( ColorAlpha(self.Colours.Label.Dark,100) ) + surface.DrawRect( 0, 0, w, h ) end @@ -495,12 +495,17 @@ end -----------------------------------------------------------]] function SKIN:PaintMenuOption( panel, w, h ) - if ( panel.m_bBackground && (panel.Hovered || panel.Highlight) ) then + if ( panel.m_bBackground && !panel:IsEnabled() ) then + surface.SetDrawColor( self.Colours.Label.Dark ) + surface.DrawRect( 0, 0, w, h ) + end + + if ( panel.m_bBackground && ( panel.Hovered || panel.Highlight) ) then self.tex.MenuBG_Hover( 0, 0, w, h ) end if ( panel:GetChecked() ) then - self.tex.Menu_Check( 5, h/2-7, 15, 15 ) + self.tex.Menu_Check( 5, h / 2 - 7, 15, 15 ) end end @@ -510,7 +515,7 @@ end -----------------------------------------------------------]] function SKIN:PaintMenuRightArrow( panel, w, h ) - self.tex.Menu.RightArrow( 0, 0, w, h ); + self.tex.Menu.RightArrow( 0, 0, w, h ) end @@ -523,7 +528,7 @@ function SKIN:PaintPropertySheet( panel, w, h ) local ActiveTab = panel:GetActiveTab() local Offset = 0 - if ( ActiveTab ) then Offset = ActiveTab:GetTall()-8 end + if ( ActiveTab ) then Offset = ActiveTab:GetTall() - 8 end self.tex.Tab_Control( 0, Offset, w, h-Offset ) @@ -534,7 +539,7 @@ end -----------------------------------------------------------]] function SKIN:PaintTab( panel, w, h ) - if ( panel:GetPropertySheet():GetActiveTab() == panel ) then + if ( panel:IsActive() ) then return self:PaintActiveTab( panel, w, h ) end @@ -556,18 +561,18 @@ function SKIN:PaintWindowCloseButton( panel, w, h ) if ( !panel.m_bBackground ) then return end if ( panel:GetDisabled() ) then - return self.tex.Window.Close( 0, 0, w, h, Color( 255, 255, 255, 50 ) ); + return self.tex.Window.Close( 0, 0, w, h, Color( 255, 255, 255, 50 ) ) end if ( panel.Depressed || panel:IsSelected() ) then - return self.tex.Window.Close_Down( 0, 0, w, h ); + return self.tex.Window.Close_Down( 0, 0, w, h ) end if ( panel.Hovered ) then - return self.tex.Window.Close_Hover( 0, 0, w, h ); + return self.tex.Window.Close_Hover( 0, 0, w, h ) end - self.tex.Window.Close( 0, 0, w, h ); + self.tex.Window.Close( 0, 0, w, h ) end @@ -576,18 +581,18 @@ function SKIN:PaintWindowMinimizeButton( panel, w, h ) if ( !panel.m_bBackground ) then return end if ( panel:GetDisabled() ) then - return self.tex.Window.Mini( 0, 0, w, h, Color( 255, 255, 255, 50 ) ); + return self.tex.Window.Mini( 0, 0, w, h, Color( 255, 255, 255, 50 ) ) end if ( panel.Depressed || panel:IsSelected() ) then - return self.tex.Window.Mini_Down( 0, 0, w, h ); + return self.tex.Window.Mini_Down( 0, 0, w, h ) end if ( panel.Hovered ) then - return self.tex.Window.Mini_Hover( 0, 0, w, h ); + return self.tex.Window.Mini_Hover( 0, 0, w, h ) end - self.tex.Window.Mini( 0, 0, w, h ); + self.tex.Window.Mini( 0, 0, w, h ) end @@ -596,18 +601,18 @@ function SKIN:PaintWindowMaximizeButton( panel, w, h ) if ( !panel.m_bBackground ) then return end if ( panel:GetDisabled() ) then - return self.tex.Window.Maxi( 0, 0, w, h, Color( 255, 255, 255, 50 ) ); + return self.tex.Window.Maxi( 0, 0, w, h, Color( 255, 255, 255, 50 ) ) end if ( panel.Depressed || panel:IsSelected() ) then - return self.tex.Window.Maxi_Down( 0, 0, w, h ); + return self.tex.Window.Maxi_Down( 0, 0, w, h ) end if ( panel.Hovered ) then - return self.tex.Window.Maxi_Hover( 0, 0, w, h ); + return self.tex.Window.Maxi_Hover( 0, 0, w, h ) end - self.tex.Window.Maxi( 0, 0, w, h ); + self.tex.Window.Maxi( 0, 0, w, h ) end @@ -616,7 +621,7 @@ end -----------------------------------------------------------]] function SKIN:PaintVScrollBar( panel, w, h ) - self.tex.Scroller.TrackV( 0, 0, w, h ); + self.tex.Scroller.TrackV( 0, 0, w, h ) end @@ -626,18 +631,18 @@ end function SKIN:PaintScrollBarGrip( panel, w, h ) if ( panel:GetDisabled() ) then - return self.tex.Scroller.ButtonV_Disabled( 0, 0, w, h ); + return self.tex.Scroller.ButtonV_Disabled( 0, 0, w, h ) end if ( panel.Depressed ) then - return self.tex.Scroller.ButtonV_Down( 0, 0, w, h ); + return self.tex.Scroller.ButtonV_Down( 0, 0, w, h ) end if ( panel.Hovered ) then - return self.tex.Scroller.ButtonV_Hover( 0, 0, w, h ); + return self.tex.Scroller.ButtonV_Hover( 0, 0, w, h ) end - return self.tex.Scroller.ButtonV_Normal( 0, 0, w, h ); + return self.tex.Scroller.ButtonV_Normal( 0, 0, w, h ) end @@ -649,18 +654,18 @@ function SKIN:PaintButtonDown( panel, w, h ) if ( !panel.m_bBackground ) then return end if ( panel.Depressed || panel:IsSelected() ) then - return self.tex.Scroller.DownButton_Down( 0, 0, w, h ); + return self.tex.Scroller.DownButton_Down( 0, 0, w, h ) end if ( panel:GetDisabled() ) then - return self.tex.Scroller.DownButton_Dead( 0, 0, w, h ); + return self.tex.Scroller.DownButton_Dead( 0, 0, w, h ) end if ( panel.Hovered ) then - return self.tex.Scroller.DownButton_Hover( 0, 0, w, h ); + return self.tex.Scroller.DownButton_Hover( 0, 0, w, h ) end - self.tex.Scroller.DownButton_Normal( 0, 0, w, h ); + self.tex.Scroller.DownButton_Normal( 0, 0, w, h ) end @@ -672,18 +677,18 @@ function SKIN:PaintButtonUp( panel, w, h ) if ( !panel.m_bBackground ) then return end if ( panel.Depressed || panel:IsSelected() ) then - return self.tex.Scroller.UpButton_Down( 0, 0, w, h ); + return self.tex.Scroller.UpButton_Down( 0, 0, w, h ) end if ( panel:GetDisabled() ) then - return self.tex.Scroller.UpButton_Dead( 0, 0, w, h ); + return self.tex.Scroller.UpButton_Dead( 0, 0, w, h ) end if ( panel.Hovered ) then - return self.tex.Scroller.UpButton_Hover( 0, 0, w, h ); + return self.tex.Scroller.UpButton_Hover( 0, 0, w, h ) end - self.tex.Scroller.UpButton_Normal( 0, 0, w, h ); + self.tex.Scroller.UpButton_Normal( 0, 0, w, h ) end @@ -695,18 +700,18 @@ function SKIN:PaintButtonLeft( panel, w, h ) if ( !panel.m_bBackground ) then return end if ( panel.Depressed || panel:IsSelected() ) then - return self.tex.Scroller.LeftButton_Down( 0, 0, w, h ); + return self.tex.Scroller.LeftButton_Down( 0, 0, w, h ) end if ( panel:GetDisabled() ) then - return self.tex.Scroller.LeftButton_Dead( 0, 0, w, h ); + return self.tex.Scroller.LeftButton_Dead( 0, 0, w, h ) end if ( panel.Hovered ) then - return self.tex.Scroller.LeftButton_Hover( 0, 0, w, h ); + return self.tex.Scroller.LeftButton_Hover( 0, 0, w, h ) end - self.tex.Scroller.LeftButton_Normal( 0, 0, w, h ); + self.tex.Scroller.LeftButton_Normal( 0, 0, w, h ) end @@ -718,40 +723,39 @@ function SKIN:PaintButtonRight( panel, w, h ) if ( !panel.m_bBackground ) then return end if ( panel.Depressed || panel:IsSelected() ) then - return self.tex.Scroller.RightButton_Down( 0, 0, w, h ); + return self.tex.Scroller.RightButton_Down( 0, 0, w, h ) end if ( panel:GetDisabled() ) then - return self.tex.Scroller.RightButton_Dead( 0, 0, w, h ); + return self.tex.Scroller.RightButton_Dead( 0, 0, w, h ) end if ( panel.Hovered ) then - return self.tex.Scroller.RightButton_Hover( 0, 0, w, h ); + return self.tex.Scroller.RightButton_Hover( 0, 0, w, h ) end - self.tex.Scroller.RightButton_Normal( 0, 0, w, h ); + self.tex.Scroller.RightButton_Normal( 0, 0, w, h ) end - --[[--------------------------------------------------------- ComboDownArrow -----------------------------------------------------------]] function SKIN:PaintComboDownArrow( panel, w, h ) if ( panel.ComboBox:GetDisabled() ) then - return self.tex.Input.ComboBox.Button.Disabled( 0, 0, w, h ); + return self.tex.Input.ComboBox.Button.Disabled( 0, 0, w, h ) end if ( panel.ComboBox.Depressed || panel.ComboBox:IsMenuOpen() ) then - return self.tex.Input.ComboBox.Button.Down( 0, 0, w, h ); + return self.tex.Input.ComboBox.Button.Down( 0, 0, w, h ) end if ( panel.ComboBox.Hovered ) then - return self.tex.Input.ComboBox.Button.Hover( 0, 0, w, h ); + return self.tex.Input.ComboBox.Button.Hover( 0, 0, w, h ) end - self.tex.Input.ComboBox.Button.Normal( 0, 0, w, h ); + self.tex.Input.ComboBox.Button.Normal( 0, 0, w, h ) end @@ -761,18 +765,18 @@ end function SKIN:PaintComboBox( panel, w, h ) if ( panel:GetDisabled() ) then - return self.tex.Input.ComboBox.Disabled( 0, 0, w, h ); + return self.tex.Input.ComboBox.Disabled( 0, 0, w, h ) end if ( panel.Depressed || panel:IsMenuOpen() ) then - return self.tex.Input.ComboBox.Down( 0, 0, w, h ); + return self.tex.Input.ComboBox.Down( 0, 0, w, h ) end if ( panel.Hovered ) then - return self.tex.Input.ComboBox.Hover( 0, 0, w, h ); + return self.tex.Input.ComboBox.Hover( 0, 0, w, h ) end - self.tex.Input.ComboBox.Normal( 0, 0, w, h ); + self.tex.Input.ComboBox.Normal( 0, 0, w, h ) end @@ -781,7 +785,7 @@ end -----------------------------------------------------------]] function SKIN:PaintListBox( panel, w, h ) - self.tex.Input.ListBox.Background( 0, 0, w, h ); + self.tex.Input.ListBox.Background( 0, 0, w, h ) end @@ -791,18 +795,18 @@ end function SKIN:PaintNumberUp( panel, w, h ) if ( panel:GetDisabled() ) then - return self.Input.UpDown.Up.Disabled( 0, 0, w, h ); + return self.tex.Input.UpDown.Up.Disabled( 0, 0, w, h ) end if ( panel.Depressed ) then - return self.tex.Input.UpDown.Up.Down( 0, 0, w, h ); + return self.tex.Input.UpDown.Up.Down( 0, 0, w, h ) end if ( panel.Hovered ) then - return self.tex.Input.UpDown.Up.Hover( 0, 0, w, h ); + return self.tex.Input.UpDown.Up.Hover( 0, 0, w, h ) end - self.tex.Input.UpDown.Up.Normal( 0, 0, w, h ); + self.tex.Input.UpDown.Up.Normal( 0, 0, w, h ) end @@ -812,18 +816,18 @@ end function SKIN:PaintNumberDown( panel, w, h ) if ( panel:GetDisabled() ) then - return self.tex.Input.UpDown.Down.Disabled( 0, 0, w, h ); + return self.tex.Input.UpDown.Down.Disabled( 0, 0, w, h ) end if ( panel.Depressed ) then - return self.tex.Input.UpDown.Down.Down( 0, 0, w, h ); + return self.tex.Input.UpDown.Down.Down( 0, 0, w, h ) end if ( panel.Hovered ) then - return self.tex.Input.UpDown.Down.Hover( 0, 0, w, h ); + return self.tex.Input.UpDown.Down.Hover( 0, 0, w, h ) end - self.tex.Input.UpDown.Down.Normal( 0, 0, w, h ); + self.tex.Input.UpDown.Down.Normal( 0, 0, w, h ) end @@ -835,17 +839,16 @@ function SKIN:PaintTreeNode( panel, w, h ) if ( panel.m_bLastChild ) then - surface.DrawRect( 9, 0, 1, 7 ) - surface.DrawRect( 9, 7, 9, 1 ) + surface.DrawRect( 9, 0, 1, 7 ) + surface.DrawRect( 9, 7, 9, 1 ) else - surface.DrawRect( 9, 0, 1, h ) - surface.DrawRect( 9, 7, 9, 1 ) + surface.DrawRect( 9, 0, 1, h ) + surface.DrawRect( 9, 7, 9, 1 ) end end - function SKIN:PaintTreeNodeButton( panel, w, h ) if ( !panel.m_bSelected ) then return end @@ -854,29 +857,29 @@ function SKIN:PaintTreeNodeButton( panel, w, h ) -- it just gets the cached value from inside the Label local w, _ = panel:GetTextSize() - self.tex.Selection( 38, 0, w+6, h ); + self.tex.Selection( 38, 0, w + 6, h ) end function SKIN:PaintSelection( panel, w, h ) - self.tex.Selection( 0, 0, w, h ); + self.tex.Selection( 0, 0, w, h ) end function SKIN:PaintSliderKnob( panel, w, h ) - if ( panel:GetDisabled() ) then return self.tex.Input.Slider.H.Disabled( 0, 0, w, h ); end + if ( panel:GetDisabled() ) then return self.tex.Input.Slider.H.Disabled( 0, 0, w, h ) end if ( panel.Depressed ) then - return self.tex.Input.Slider.H.Down( 0, 0, w, h ); + return self.tex.Input.Slider.H.Down( 0, 0, w, h ) end if ( panel.Hovered ) then - return self.tex.Input.Slider.H.Hover( 0, 0, w, h ); + return self.tex.Input.Slider.H.Hover( 0, 0, w, h ) end - self.tex.Input.Slider.H.Normal( 0, 0, w, h ); + self.tex.Input.Slider.H.Normal( 0, 0, w, h ) end @@ -888,7 +891,7 @@ local function PaintNotches( x, y, w, h, num ) for i=0, num do - surface.DrawRect( x + i * space, y+4, 1, 5 ) + surface.DrawRect( x + i * space, y + 4, 1, 5 ) end @@ -896,33 +899,33 @@ end function SKIN:PaintNumSlider( panel, w, h ) - surface.SetDrawColor( Color( 0, 0, 0, 100 ) ) - surface.DrawRect( 8, h/2-1, w-15, 1 ) + surface.SetDrawColor( ColorAlpha(self.Colours.Label.Dark,100) ) + surface.DrawRect( 8, h / 2 - 1, w - 15, 1 ) - PaintNotches( 8, h/2-1, w-16, 1, panel.m_iNotches ) + PaintNotches( 8, h / 2 - 1, w - 16, 1, panel.m_iNotches ) end function SKIN:PaintProgress( panel, w, h ) - self.tex.ProgressBar.Back( 0, 0, w, h ); - self.tex.ProgressBar.Front( 0, 0, w * panel:GetFraction(), h ); + self.tex.ProgressBar.Back( 0, 0, w, h ) + self.tex.ProgressBar.Front( 0, 0, w * panel:GetFraction(), h ) end function SKIN:PaintCollapsibleCategory( panel, w, h ) - if ( !panel:GetExpanded() && h < 40 ) then - return self.tex.CategoryList.Header( 0, 0, w, h ); + if ( h < 21 ) then + return self.tex.CategoryList.Header( 0, 0, w, h ) end - self.tex.CategoryList.Inner( 0, 0, w, h ); + self.tex.CategoryList.Inner( 0, 0, w, 63 ) end function SKIN:PaintCategoryList( panel, w, h ) - self.tex.CategoryList.Outer( 0, 0, w, h ); + self.tex.CategoryList.Outer( 0, 0, w, h, panel:GetBackgroundColor() ) end @@ -930,19 +933,19 @@ function SKIN:PaintCategoryButton( panel, w, h ) if ( panel.AltLine ) then - if ( panel.Depressed || panel.m_bSelected ) then surface.SetDrawColor( self.Colours.Category.LineAlt.Button_Selected ); - elseif ( panel.Hovered ) then surface.SetDrawColor( self.Colours.Category.LineAlt.Button_Hover ); - else surface.SetDrawColor( self.Colours.Category.LineAlt.Button ); end + if ( panel.Depressed || panel.m_bSelected ) then surface.SetDrawColor( self.Colours.Category.LineAlt.Button_Selected ) + elseif ( panel.Hovered ) then surface.SetDrawColor( self.Colours.Category.LineAlt.Button_Hover ) + else surface.SetDrawColor( self.Colours.Category.LineAlt.Button ) end else - if ( panel.Depressed || panel.m_bSelected ) then surface.SetDrawColor( self.Colours.Category.Line.Button_Selected ); - elseif ( panel.Hovered ) then surface.SetDrawColor( self.Colours.Category.Line.Button_Hover ); - else surface.SetDrawColor( self.Colours.Category.Line.Button ); end + if ( panel.Depressed || panel.m_bSelected ) then surface.SetDrawColor( self.Colours.Category.Line.Button_Selected ) + elseif ( panel.Hovered ) then surface.SetDrawColor( self.Colours.Category.Line.Button_Hover ) + else surface.SetDrawColor( self.Colours.Category.Line.Button ) end end - surface.DrawRect( 0, 0, w, h ); + surface.DrawRect( 0, 0, w, h ) end @@ -950,15 +953,15 @@ function SKIN:PaintListViewLine( panel, w, h ) if ( panel:IsSelected() ) then - self.tex.Input.ListBox.EvenLineSelected( 0, 0, w, h ); + self.tex.Input.ListBox.EvenLineSelected( 0, 0, w, h ) elseif ( panel.Hovered ) then - self.tex.Input.ListBox.Hovered( 0, 0, w, h ); + self.tex.Input.ListBox.Hovered( 0, 0, w, h ) elseif ( panel.m_bAlt ) then - self.tex.Input.ListBox.EvenLine( 0, 0, w, h ); + self.tex.Input.ListBox.EvenLine( 0, 0, w, h ) end @@ -966,6 +969,8 @@ end function SKIN:PaintListView( panel, w, h ) + if ( !panel.m_bBackground ) then return end + self.tex.Input.ListBox.Background( 0, 0, w, h ) end @@ -982,5 +987,4 @@ function SKIN:PaintMenuBar( panel, w, h ) end - derma.DefineSkin( "themer", "Themer Skin - User Choice", SKIN ) diff --git a/lua/themer/main.lua b/lua/themer/main.lua index ada231d..2debe10 100644 --- a/lua/themer/main.lua +++ b/lua/themer/main.lua @@ -1,5 +1,5 @@ -include'themer/iconbrowser.lua' -include'themer/spawnmenu.lua' +include("themer/iconbrowser.lua") +include("themer/spawnmenu.lua") --[[ File: themer/main.lua @@ -7,8 +7,8 @@ Info: This file loads everything and contains the main code of stuff --]] --cvars -local themer_enabled = CreateClientConVar("themer_enabled", "1", true) -local derma_skinname = CreateClientConVar("derma_skinname", "gmoddefault", true) +local themer_enabled = CreateClientConVar("themer_enabled", "1", true) +local derma_skinname = CreateClientConVar("derma_skinname", "gmoddefault", true) local themer_tweaks_uselabel = CreateClientConVar("themer_tweaks_uselabel", "1", true) local themer_options_gear = CreateClientConVar("themer_options_gear", "0", true) @@ -24,36 +24,12 @@ local themer_icon_dupes = CreateClientConVar("themer_icon_dupes", "ico local themer_icon_saves = CreateClientConVar("themer_icon_saves", "icon16/disk.png", true) --Main loading -local function ColorHack() - local DMenuOption = table.Copy(vgui.GetControlTable("DMenuOption")) - local DTextEntry = table.Copy(vgui.GetControlTable("DTextEntry")) - if themer_tweaks_uselabel:GetBool() then - DMenuOption.Init = function(self) - self:SetContentAlignment(4) - self:SetTextInset(30,0) - self:SetTextColor(self:GetSkin().Colours.Label.Dark) - self:SetChecked(false) - end - DTextEntry.GetTextColor = function(self) - return self.m_colText || self:GetSkin().Colours.Label.Dark - end - DTextEntry.GetCursorColor = function(self) - return self.m_colCursor || self:GetSkin().Colours.Label.Dark - end - - derma.DefineControl( "DMenuOption", "Menu Option Line", DMenuOption, "DButton" ) - derma.DefineControl( "DMenuOptionCVar", "", vgui.GetControlTable("DMenuOptionCVar"), "DMenuOption" ) --need to reregister for colors to apply, that's all - derma.DefineControl( "DTextEntry", "A simple TextEntry control", DTextEntry, "TextEntry" ) - end -end - hook.Add("ForceDermaSkin","Themer",function() if themer_enabled:GetBool() then return "themer" end end) concommand.Add("themer_refresh_derma",function() - include'skins/themer.lua' + include("skins/themer.lua") derma.RefreshSkins() - ColorHack() for k,v in pairs(hook.GetTable()["ForceDermaSkin"]) do if k ~= "Themer" then @@ -68,6 +44,9 @@ hook.Add("SpawnMenuOpen","Themer.IconHack",function() if v.Name == "Options" then v.Tab.Image:SetImage(themer_options_gear:GetBool() and "icon16/cog.png" or "icon16/wrench.png") end + if v.Name == "Utilities" then + v.Tab.Image:SetImage(themer_options_gear:GetBool() and "icon16/cog.png" or "icon16/page_white_wrench.png") + end end local SpawnTabs = g_SpawnMenu.CreateMenu.Items @@ -125,7 +104,6 @@ end) hook.Add("PlayerInitialSpawn","Themer.ColorTweaks",function() timer.Simple(0,function() - ColorHack() for k,v in pairs(hook.GetTable()["ForceDermaSkin"]) do if k ~= "Themer" then hook.Remove("ForceDermaSkin", k) @@ -138,12 +116,4 @@ for k,v in pairs(hook.GetTable()["ForceDermaSkin"]) do if k ~= "Themer" then hook.Remove("ForceDermaSkin", k) end -end - -if hook.GetTable()["OnGamemodeLoaded"] and hook.GetTable()["OnGamemodeLoaded"]["CreateMenuBar"] then - local oldCreateMenuBar = oldCreateMenuBar or hook.GetTable()["OnGamemodeLoaded"]["CreateMenuBar"] - hook.Add( "OnGamemodeLoaded", "CreateMenuBar", function() - ColorHack() - oldCreateMenuBar() - end) end \ No newline at end of file diff --git a/lua/themer/spawnmenu.lua b/lua/themer/spawnmenu.lua index ee08b70..1e20c1d 100644 --- a/lua/themer/spawnmenu.lua +++ b/lua/themer/spawnmenu.lua @@ -3,6 +3,7 @@ local derma_skinname = GetConVar("derma_skinname") local themer_tweaks_uselabel = GetConVar("themer_tweaks_uselabel") local themer_options_gear = GetConVar("themer_options_gear") +local themer_merge_options = GetConVar("themer_merge_options") local themer_spawnlist_icons = GetConVar("themer_spawnlist_icons") local themer_icon_spawnlists = GetConVar("themer_icon_spawnlists") @@ -133,10 +134,6 @@ All of these require reopening (not reloading) of the spawnmenu to apply changes panel:TextEntry("#spawnmenu.category.saves", "themer_icon_saves") end -local function ServerSettings(panel) - panel:Help("soon\xe2\x84\xa2") -end - local function About(panel) local title = vgui.Create("DLabel",panel) title:Dock(TOP) @@ -144,7 +141,7 @@ local function About(panel) title:SetText("Themer") title:SizeToContents() title:DockMargin(8,8,8,8) - title:SetColor(panel:GetSkin().Colours.Label.Dark) + title:SetDark() local github = panel:Button("GitHub") github:SetIcon("icon16/world_link.png") @@ -155,7 +152,6 @@ hook.Add("PopulateToolMenu","Themer.ToolMenu",function() spawnmenu.AddToolMenuOption("Theming","Theming","\1Theme Options","Theme Options","","",MakeMenu) spawnmenu.AddToolMenuOption("Theming","Configuration","Finer Tweaking","Finer Tweaking","","",Tweaks) spawnmenu.AddToolMenuOption("Theming","Configuration","Icons","Icons","","",IconSettings) - spawnmenu.AddToolMenuOption("Theming","Server","Server Settings","Server Settings","","",ServerSettings) spawnmenu.AddToolMenuOption("Theming","Misc","About","About","","",About) for k,v in pairs(spawnmenu.GetTools()) do @@ -195,12 +191,6 @@ local function ExtSettings() icons:SetName("Icons") tabs:AddSheet("Icons",icons,"icon16/pictures.png") - --Server Settings-- - local sv = vgui.Create("DForm",tabs) - ServerSettings(sv) - sv:SetName("Server Settings") - tabs:AddSheet("Server Settings",sv,"icon16/server.png") - --About-- local about = vgui.Create("DForm",tabs) About(about)