Garry's Mod Wiki

Panel:DrawTextEntryText

Panel:DrawTextEntryText( table textCol, table highlightCol, table cursorCol )

Description

Used to draw the text in a DTextEntry within a derma skin. This should be called within the SKIN:PaintTextEntry skin hook.

Arguments

1 table textCol
The colour of the main text.
2 table highlightCol
The colour of the selection highlight (when selecting text).
3 table cursorCol
The colour of the text cursor (or caret).

Example

The paint function used in the default derma skin.

function SKIN:PaintTextEntry( panel, w, h ) if ( panel.m_bBackground ) then if ( panel:GetDisabled() ) then self.tex.TextBox_Disabled( 0, 0, w, h ) elseif ( panel:HasFocus() ) then self.tex.TextBox_Focus( 0, 0, w, h ) else self.tex.TextBox( 0, 0, w, h ) end end panel:DrawTextEntryText( panel.m_colText, panel.m_colHighlight, panel.m_colCursor ) end

Page Links


Special Pages


Wikis

?

Render Time: 37ms

DB GetPage 3
Generate Html 11
SaveChanges (1) 9
Render Body 0
Render Sidebar 11