MCPcopy Create free account
hub / github.com/alliedmodders/sourcemod / CanDrawItem

Method CanDrawItem

core/MenuStyle_Valve.cpp:245–276  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

243}
244
245bool CValveMenuDisplay::CanDrawItem(unsigned int drawFlags)
246{
247 /**
248 * ITEMDRAW_RAWLINE - We can't draw random text, and this doesn't add a slot,
249 * so it's completely safe to ignore it.
250 * -----------------------------------------
251 */
252 if (drawFlags & ITEMDRAW_RAWLINE)
253 {
254 return false;
255 }
256
257 /**
258 * Special cases, explained in DrawItem()
259 */
260 if ((drawFlags & ITEMDRAW_NOTEXT)
261 || (drawFlags & ITEMDRAW_SPACER))
262 {
263 return true;
264 }
265
266 /**
267 * We can't draw disabled text. We could bump the position, but we
268 * want DirectDraw() to find some actual items to display.
269 */
270 if (drawFlags & ITEMDRAW_DISABLED)
271 {
272 return false;
273 }
274
275 return true;
276}
277
278unsigned int CValveMenuDisplay::DrawItem(const ItemDrawInfo &item)
279{

Callers 3

IsSlotItemFunction · 0.45
RenderMenuMethod · 0.45
CanPanelDrawFlagsFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected