-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
190 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
58 changes: 58 additions & 0 deletions
58
gamemodes/terrortown/gamemode/client/cl_vskin/vgui/dinfoicon_ttt2.lua
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
--- | ||
-- @class PANEL | ||
-- @section DCardTTT2 | ||
|
||
local PANEL = {} | ||
|
||
--- | ||
-- @ignore | ||
function PANEL:Init() | ||
self:SetContentAlignment(5) | ||
|
||
self:SetTall(22) | ||
self:SetMouseInputEnabled(true) | ||
self:SetKeyboardInputEnabled(true) | ||
|
||
self.data = { | ||
title = "", | ||
icon = nil | ||
} | ||
end | ||
|
||
--- | ||
-- @param string text | ||
-- @realm client | ||
function PANEL:SetText(text) | ||
self.data.text = text | ||
end | ||
|
||
--- | ||
-- @return string | ||
-- @realm client | ||
function PANEL:GetText() | ||
return self.data.text | ||
end | ||
|
||
--- | ||
-- @param Material icon | ||
-- @realm client | ||
function PANEL:SetIcon(icon) | ||
self.data.icon = icon | ||
end | ||
|
||
--- | ||
-- @return Matieral | ||
-- @realm client | ||
function PANEL:GetIcon() | ||
return self.data.icon | ||
end | ||
|
||
--- | ||
-- @ignore | ||
function PANEL:Paint(w, h) | ||
derma.SkinHook("Paint", "InfoItemTTT2", self, w, h) | ||
|
||
return false | ||
end | ||
|
||
derma.DefineControl("DInfoItemTTT2", "A special info box used for body search info", PANEL, "DPanelTTT2") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters