Skip to content

Commit

Permalink
cleaned up inheritance names
Browse files Browse the repository at this point in the history
  • Loading branch information
TimGoll committed Jan 30, 2025
1 parent 7be1a8f commit a8f8031
Show file tree
Hide file tree
Showing 30 changed files with 57 additions and 57 deletions.
2 changes: 1 addition & 1 deletion gamemodes/terrortown/gamemode/client/cl_help.lua
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ function HELPSCRN:ShowMainMenu()
return
end

local labelSpacer = dsettings:Add("DLabelTTT2")
local labelSpacer = dsettings:Add("TTT2:DLabel")
labelSpacer.OwnLine = true
labelSpacer:SetText("label_menu_admin_spacer")
labelSpacer:SetSize(width - 2 * self.padding - scrollSize, heightAdminSeperator)
Expand Down
2 changes: 1 addition & 1 deletion gamemodes/terrortown/gamemode/client/cl_radio.lua
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ function RADIO:ShowRadioCommands(state)

for key = 1, #commands do
local command = commands[key]
local dlabel = vgui.Create("DLabel", radioframe)
local dlabel = vgui.Create("TTT2:DLabel", radioframe)
local id = key .. ": "
local txt = id

Expand Down
6 changes: 3 additions & 3 deletions gamemodes/terrortown/gamemode/client/cl_scoring.lua
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ function CLSCORE:CreatePanel()
end

-- LEFT HAND MENU STRIP
local menuBox = vgui.Create("DPanelTTT2", frame)
local menuBox = vgui.Create("TTT2:DPanel", frame)
menuBox:SetSize(self.sizes.widthMenu, self.sizes.heightMainArea)
menuBox:DockMargin(0, self.sizes.padding, 0, self.sizes.padding)
menuBox:Dock(LEFT)
Expand All @@ -168,7 +168,7 @@ function CLSCORE:CreatePanel()
menuBoxGrid:SetSpaceY(self.sizes.padding)

-- RIGHT HAND MAIN AREA
local mainBox = vgui.Create("DPanelTTT2", frame)
local mainBox = vgui.Create("TTT2:DPanel", frame)
mainBox:SetSize(self.sizes.widthMainArea, self.sizes.heightMainArea)
mainBox:DockMargin(
self.sizes.padding,
Expand All @@ -178,7 +178,7 @@ function CLSCORE:CreatePanel()
)
mainBox:Dock(RIGHT)

local contentBox = vgui.Create("DPanelTTT2", mainBox)
local contentBox = vgui.Create("TTT2:DPanel", mainBox)
contentBox:SetSize(self.sizes.widthMainArea, self.sizes.heightMainArea)
contentBox:Dock(TOP)

Expand Down
2 changes: 1 addition & 1 deletion gamemodes/terrortown/gamemode/client/cl_tradio.lua
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ function TRADIO:Toggle(radioEnt)
self.menuFrame:SetKeyboardInputEnabled(false)
self.menuFrame.OnKeyCodePressed = util.BasicKeyHandler

local contentBox = vgui.Create("DPanelTTT2", self.menuFrame)
local contentBox = vgui.Create("TTT2:DPanel", self.menuFrame)
contentBox:SetSize(self.sizes.widthMainArea, self.sizes.heightMainArea)
contentBox:Dock(TOP)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ function PANEL:Paint(w, h)
return false
end

derma.DefineControl("DBinderPanelTTT2", "", PANEL, "DPanelTTT2")
derma.DefineControl("DBinderPanelTTT2", "", PANEL, "TTT2:DPanel")
Original file line number Diff line number Diff line change
Expand Up @@ -368,4 +368,4 @@ function PANEL:SizeToContents()
self:SetSize(w + 8, h + 4)
end

derma.DefineControl("DButtonTTT2", "A standard Button", PANEL, "DLabelTTT2")
derma.DefineControl("DButtonTTT2", "A standard Button", PANEL, "TTT2:DLabel")
Original file line number Diff line number Diff line change
Expand Up @@ -110,4 +110,4 @@ end
-- @realm client
function PANEL:UpdateColours() end

derma.DefineControl("DButtonPanelTTT2", "", PANEL, "DPanelTTT2")
derma.DefineControl("DButtonPanelTTT2", "", PANEL, "TTT2:DPanel")
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,4 @@ function PANEL:Paint(w, h)
return false
end

derma.DefineControl("DColoredBoxTTT2", "", PANEL, "DPanelTTT2")
derma.DefineControl("DColoredBoxTTT2", "", PANEL, "TTT2:DPanel")
Original file line number Diff line number Diff line change
Expand Up @@ -167,4 +167,4 @@ function PANEL:Paint(w, h)
return false
end

derma.DefineControl("DColoredTextBoxTTT2", "", PANEL, "DPanelTTT2")
derma.DefineControl("DColoredTextBoxTTT2", "", PANEL, "TTT2:DPanel")
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ AccessorFunc(PANEL, "m_bDoSort", "SortItems", FORCE_BOOL)
---
-- @ignore
function PANEL:Init()
self.DropButton = vgui.Create("DPanel", self)
self.DropButton = vgui.Create("TTT2:DPanel", self)
self.DropButton:SetMouseInputEnabled(false)
self.DropButton.ComboBox = self

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,4 +151,4 @@ function PANEL:Paint(w, h)
return false
end

derma.DefineControl("DEventBoxTTT2", "", PANEL, "DPanelTTT2")
derma.DefineControl("DEventBoxTTT2", "", PANEL, "TTT2:DPanel")
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ end
-- @return Panel The created textentry
-- @realm client
function PANEL:MakeTextEntry(data)
local left = vgui.Create("DLabelTTT2", self)
local left = vgui.Create("TTT2:DLabel", self)

left:SetText(data.label)

Expand Down Expand Up @@ -340,7 +340,7 @@ end
-- @return Panel The created slider
-- @realm client
function PANEL:MakeSlider(data)
local left = vgui.Create("DLabelTTT2", self)
local left = vgui.Create("TTT2:DLabel", self)

left:SetText(data.label)

Expand Down Expand Up @@ -426,7 +426,7 @@ end
-- @return Panel The created slider
-- @realm client
function PANEL:MakeButton(data)
local left = vgui.Create("DLabelTTT2", self)
local left = vgui.Create("TTT2:DLabel", self)

left:SetText(data.label)

Expand Down Expand Up @@ -481,7 +481,7 @@ end
-- @return Panel The created label
-- @realm client
function PANEL:MakeComboBox(data)
local left = vgui.Create("DLabelTTT2", self)
local left = vgui.Create("TTT2:DLabel", self)

left:SetText(data.label)

Expand Down Expand Up @@ -584,7 +584,7 @@ end
-- @return Panel The created label
-- @realm client
function PANEL:MakeBinder(data)
local left = vgui.Create("DLabelTTT2", self)
local left = vgui.Create("TTT2:DLabel", self)

left:SetText(data.label)

Expand Down Expand Up @@ -669,7 +669,7 @@ end
-- @return Panel The created helpbox
-- @realm client
function PANEL:MakeHelp(data)
local left = vgui.Create("DLabelTTT2", self)
local left = vgui.Create("TTT2:DLabel", self)

left:SetText(data.label)
left:SetTextParams(data.params)
Expand Down Expand Up @@ -717,8 +717,8 @@ end
-- @return Panel The created label
-- @realm client
function PANEL:MakeColorMixer(data)
local left = vgui.Create("DLabelTTT2", self)
local right = vgui.Create("DPanel", self)
local left = vgui.Create("TTT2:DLabel", self)
local right = vgui.Create("TTT2:DPanel", self)

left:SetTall(data.height or 240)
right:SetTall(data.height or 240)
Expand Down Expand Up @@ -780,7 +780,7 @@ end
-- @return Panel The created panel
-- @realm client
function PANEL:MakePanel()
local panel = vgui.Create("DPanelTTT2", self)
local panel = vgui.Create("TTT2:DPanel", self)

self:AddItem(panel)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,5 +88,5 @@ derma.DefineControl(
"DInfoItemTTT2",
"An info box that can contain an icon, a header text and a description area",
PANEL,
"DPanelTTT2"
"TTT2:DPanel"
)
Original file line number Diff line number Diff line change
Expand Up @@ -509,4 +509,4 @@ function PANEL:SetEnabled(b)
FindMetaTable("Panel").SetEnabled(self, b)
end

derma.DefineControl("DNumSliderTTT2", "", PANEL, "DPanelTTT2")
derma.DefineControl("DNumSliderTTT2", "", PANEL, "TTT2:DPanel")
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
-- @class PANEL
-- @section DPanelTTT2
-- @section TTT2:DPanel

local PANEL = {}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -238,4 +238,4 @@ function PANEL:PerformLayout()
end
end

derma.DefineControl("DPiPPanelTTT2", "A panel-in-panel panel.", PANEL, "DPanelTTT2")
derma.DefineControl("DPiPPanelTTT2", "A panel-in-panel panel.", PANEL, "TTT2:DPanel")
Original file line number Diff line number Diff line change
Expand Up @@ -266,4 +266,4 @@ function PANEL:Paint(w, h)
return true
end

derma.DefineControl("DPlayerGraphTTT2", "", PANEL, "DPanelTTT2")
derma.DefineControl("DPlayerGraphTTT2", "", PANEL, "TTT2:DPanel")
Original file line number Diff line number Diff line change
Expand Up @@ -314,5 +314,5 @@ derma.DefineControl(
"DProfilePanelTTT2",
"A special box with a 3D model or model",
PANEL,
"DLabelTTT2"
"TTT2:DLabel"
)
Original file line number Diff line number Diff line change
Expand Up @@ -157,4 +157,4 @@ function PANEL:Clear()
return self.pnlCanvas:Clear()
end

derma.DefineControl("DScrollPanelTTT2", "", PANEL, "DPanelTTT2")
derma.DefineControl("DScrollPanelTTT2", "", PANEL, "TTT2:DPanel")
Original file line number Diff line number Diff line change
Expand Up @@ -164,4 +164,4 @@ function PANEL:Clear()
return self.textEntry:Clear()
end

derma.DefineControl("DSearchBarTTT2", "", PANEL, "DPanelTTT2")
derma.DefineControl("DSearchBarTTT2", "", PANEL, "TTT2:DPanel")
Original file line number Diff line number Diff line change
Expand Up @@ -204,12 +204,12 @@ function PANEL:SelectFirst(index)
-- If a non-zero index was specified, we don't want to present the unpopulated message, because we're doing a search.
-- In that case, we want to display a message that there were no results.
if index ~= 0 then
local msgLabel = vgui.Create("DLabelTTT2", self.contentArea)
local msgLabel = vgui.Create("TTT2:DLabel", self.contentArea)
msgLabel:SetText("label_menu_search_no_items")
msgLabel:SetFont("DermaTTT2Title")
msgLabel:Dock(FILL)

local dummyPnl = vgui.Create("DPanel", self.contentArea)
local dummyPnl = vgui.Create("TTT2:DPanel", self.contentArea)
dummyPnl:Dock(LEFT)

return
Expand All @@ -221,7 +221,7 @@ function PANEL:SelectFirst(index)
end

-- no content, fill the content area appropriately
local labelNoContent = vgui.Create("DLabelTTT2", self.contentArea)
local labelNoContent = vgui.Create("TTT2:DLabel", self.contentArea)
local widthContent = self.contentArea:GetSize()

labelNoContent:SetText("label_menu_not_populated")
Expand Down Expand Up @@ -314,4 +314,4 @@ function PANEL:Clear()
return tobool(cleared and self.navAreaScroll:Clear())
end

derma.DefineControl("DSubmenuListTTT2", "", PANEL, "DPanelTTT2")
derma.DefineControl("DSubmenuListTTT2", "", PANEL, "TTT2:DPanel")
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ end
function PANEL:SetEnabled(b)
self.TextArea:SetEnabled(b)

FindMetaTable("DPanelTTT2").SetEnabled(self, b)
FindMetaTable("TTT2:DPanel").SetEnabled(self, b)
end

derma.DefineControl("DTextEntryTTT2", "", PANEL, "DPanelTTT2")
derma.DefineControl("DTextEntryTTT2", "", PANEL, "TTT2:DPanel")
Original file line number Diff line number Diff line change
Expand Up @@ -163,4 +163,4 @@ function PANEL:GetFont()
return self.targetPanel:GetTooltipFont() or "Default"
end

derma.DefineControl("DTooltipTTT2", "", PANEL, "DLabel")
derma.DefineControl("DTooltipTTT2", "", PANEL, "TTT2:DLabel")
Original file line number Diff line number Diff line change
Expand Up @@ -330,5 +330,5 @@ derma.DefineControl(
"DWeaponPreviewTTT2",
"A box that renders a player with an equipped weapon",
PANEL,
"DLabelTTT2"
"TTT2:DLabel"
)
4 changes: 2 additions & 2 deletions lua/terrortown/menus/gamemode/guide/equipment.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ CLGAMEMODESUBMENU.priority = 98
CLGAMEMODESUBMENU.title = "submenu_guide_equipment_title"

function CLGAMEMODESUBMENU:Populate(parent)
local line1 = vgui.Create("DLabel", parent)
local line1 = vgui.Create("TTT2:DLabel", parent)
line1:SetPos(40, 40)
line1:SetFont("DermaLarge")
line1:SetText(LANG.TryTranslation("guide_nothing_title"))
line1:SizeToContents()

local line2 = vgui.Create("DLabel", parent)
local line2 = vgui.Create("TTT2:DLabel", parent)
line2:SetPos(40, 40)
line2:MoveBelow(line1, 10)
line2:SetFont("Trebuchet24")
Expand Down
4 changes: 2 additions & 2 deletions lua/terrortown/menus/gamemode/guide/gameplay.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ CLGAMEMODESUBMENU.priority = 100
CLGAMEMODESUBMENU.title = "submenu_guide_gameplay_title"

function CLGAMEMODESUBMENU:Populate(parent)
local line1 = vgui.Create("DLabel", parent)
local line1 = vgui.Create("TTT2:DLabel", parent)
line1:SetPos(40, 40)
line1:SetFont("DermaLarge")
line1:SetText(LANG.TryTranslation("guide_nothing_title"))
line1:SizeToContents()

local line2 = vgui.Create("DLabel", parent)
local line2 = vgui.Create("TTT2:DLabel", parent)
line2:SetPos(40, 40)
line2:MoveBelow(line1, 10)
line2:SetFont("Trebuchet24")
Expand Down
4 changes: 2 additions & 2 deletions lua/terrortown/menus/gamemode/guide/roles.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ CLGAMEMODESUBMENU.priority = 99
CLGAMEMODESUBMENU.title = "submenu_guide_roles_title"

function CLGAMEMODESUBMENU:Populate(parent)
local line1 = vgui.Create("DLabel", parent)
local line1 = vgui.Create("TTT2:DLabel", parent)
line1:SetPos(40, 40)
line1:SetFont("DermaLarge")
line1:SetText(LANG.TryTranslation("guide_nothing_title"))
line1:SizeToContents()

local line2 = vgui.Create("DLabel", parent)
local line2 = vgui.Create("TTT2:DLabel", parent)
line2:SetPos(40, 40)
line2:MoveBelow(line1, 10)
line2:SetFont("Trebuchet24")
Expand Down
6 changes: 3 additions & 3 deletions lua/terrortown/menus/gamemode/roles/roleinspect.lua
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ local function PopulateSubrolesStage(stage, form, stageData)

local recBaseroleData = stageData.roles[baserole]
if not recBaseroleData then
local lbl = vgui.Create("DLabelTTT2", baseroleForm)
local lbl = vgui.Create("TTT2:DLabel", baseroleForm)
lbl:Dock(TOP)
lbl:SetText("label_inspect_no_subroles")
continue
Expand Down Expand Up @@ -524,10 +524,10 @@ function CLGAMEMODESUBMENU:Populate(parent)
if #roleinspectTable == 0 then
-- empty table, put in an appropriate message

local labelHolder = vgui.Create("DPanelTTT2", parent)
local labelHolder = vgui.Create("TTT2:DPanel", parent)
labelHolder:Dock(TOP)
labelHolder:DockMargin(20, 20, 20, 20)
local labelNoContent = vgui.Create("DLabelTTT2", labelHolder)
local labelNoContent = vgui.Create("TTT2:DLabel", labelHolder)
labelNoContent:SetText("label_roleinspect_no_data")
labelNoContent:SetFont("DermaTTT2Title")
labelNoContent:Dock(FILL)
Expand Down
6 changes: 3 additions & 3 deletions lua/terrortown/menus/score/events.lua
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,14 @@ function CLSCOREMENU:Populate(parent)
frameBoxes:Dock(FILL)

-- SWITCHER BETWEEN ROUND BEGIN AND ROUND END
local buttonBox = frameBoxes:Add("DPanelTTT2")
local buttonBox = frameBoxes:Add("TTT2:DPanel")
buttonBox:SetSize(sizes.widthMainArea, sizes.heightTopButtonPanel + 2 * sizes.padding)
buttonBox:DockPadding(0, sizes.padding, 0, sizes.padding)

local buttonBoxRow = vgui.Create("DIconLayout", buttonBox)
buttonBoxRow:Dock(FILL)

local buttonBoxRowLabel = buttonBoxRow:Add("DLabelTTT2")
local buttonBoxRowLabel = buttonBoxRow:Add("TTT2:DLabel")
buttonBoxRowLabel:SetSize(sizes.widthTopLabel, sizes.heightTopButtonPanel)
buttonBoxRowLabel:SetText("label_show_events")
buttonBoxRowLabel.Paint = function(slf, w, h)
Expand All @@ -57,7 +57,7 @@ function CLSCOREMENU:Populate(parent)
return true
end

local buttonBoxRowPanel = buttonBoxRow:Add("DPanelTTT2")
local buttonBoxRowPanel = buttonBoxRow:Add("TTT2:DPanel")
buttonBoxRowPanel:SetSize(2 * sizes.widthTopButton + sizes.padding, sizes.heightTopButtonPanel)

local buttonBoxRowButton1 = vgui.Create("DButtonTTT2", buttonBoxRowPanel)
Expand Down
Loading

0 comments on commit a8f8031

Please sign in to comment.