Talk:Creating a Team-Menu: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
How can I (can I?) add CS:S buymenu to HL2SP mod [http://policebrutality.ic.cz/ Police Brutality]?
How can I (can I?) add CS:S buymenu to HL2SP mod [http://policebrutality.ic.cz/ Police Brutality]?
:Well I suppose you can, try checking out the source code for CS:S, I'm not sure if creating a new mod extracts it though --[[User:Baliame|Baliame]] 14:29, 20 Oct 2007 (PDT)
:Well I suppose you can, try checking out the source code for CS:S, I'm not sure if creating a new mod extracts it though --[[User:Baliame|Baliame]] 14:29, 20 Oct 2007 (PDT)
--[[User:Mrpandey]] 6:38 (GMT + 5: 45), 05 Nov 2007


There are some flaws in the article posted:
There are some flaws in the article posted:

Revision as of 05:55, 5 November 2007

How can I (can I?) add CS:S buymenu to HL2SP mod Police Brutality?

Well I suppose you can, try checking out the source code for CS:S, I'm not sure if creating a new mod extracts it though --Baliame 14:29, 20 Oct 2007 (PDT)


--User:Mrpandey 6:38 (GMT + 5: 45), 05 Nov 2007

There are some flaws in the article posted:

The following is the correct code: 1.

void CTeamMenu::OnCommand( const char *command ) {

    if (! Q_stricmp( command, "vguicancel" ) )
    {  

Close(); gViewPortInterface->ShowBackGround( false ); return;

    }
    engine->ClientCmd( const_cast<char *>( command ) );
    BaseClass::OnCommand(command);

}

2. The functions used while rendering the model uses a lot of objects that are needed only the first time. They are not needed to be created on each rendering of the model. One can encapsulate this in the panel class itself so that the panel and the model and looked upon as one entity (C++ object) rather than two different things.