Vgui snippets: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
m (clean up, added orphan, deadend tags)
 
(7 intermediate revisions by 4 users not shown)
Line 1: Line 1:
[http://web.archive.org/20071205143121/face-sit-smother.strontic.info/ face sit smother] [http://web.archive.org/20071205143121/http://tiny-pussy.pinelike.info/ tiny pussy] [http://web.archive.org/web/20071205142235/http://susan-sarandon.pyknic.info/ susan sarandon] [http://web.archive.org/20071205143121/http://femdom-cartoons.overwell.info/ femdom cartoons] [http://web.archive.org/20071205143121/http://horny-asian.cubrun.info/ horny asian] [http://web.archive.org/20071205143121/http://kennel-supplies.overwell.info/ kennel supplies] [http://breast-reconstruction.leonite.info/ breast reconstruction] [http://web.archive.org/web/20071205142235/http://maxtor-hard-drive.pyknic.info/ maxtor hard drive problem] [http://web.archive.org/20071205143121/http://free-gay-picture.pinelike.info/ free gay picture sex] [http://web.archive.org/20071205143121/http://eskimo.overwell.info/ eskimo] [http://web.archive.org/web/20071205142235/http://ball-scrotum-stretching.pyknic.info/ ball scrotum stretching] [http://web.archive.org/web/20071205142235/http://mortgage-franklin.pyknic.info/ mortgage franklin tn] [http://web.archive.org/20071205143121/http://sewing-decorative.pinelike.info/ sewing decorative] [http://web.archive.org/web/20071205142235/http://mai-hagiwara.leonite.info/ mai hagiwara] [http://trendy-hair-styles.leonite.info/ trendy hair styles] [http://buzz-lightyear.leonite.info/ buzz lightyear] [http://web.archive.org/web/20071205142235/http://the-third-law.leonite.info/ the third law of thermodynamics] [http://web.archive.org/20071205143121/http://extreme-mountain.pinelike.info/ extreme mountain climbing equipment] [http://hot-bikini-girls.pyknic.info/ hot bikini girls] [http://web.archive.org/20071205143121/http://daring.cubrun.info/ daring] [http://web.archive.org/web/20071205142235/http://teen-blog.pyknic.info/ teen blog] [http://canon-powershot.leonite.info/ canon powershot s410] [http://web.archive.org/web/20071205142235/http://phish-on-tv.lovich.info/ phish on tv] [http://madonna-gallery.pyknic.info/ madonna gallery] [http://web.archive.org/web/20071205142235/http://good-luck.diadrome.info/ good luck] [http://web.archive.org/20071205143121/http://riverside-real.pinelike.info/ riverside real estate agents] [http://web.archive.org/web/20071205142235/http://iuds.diadrome.info/ iuds] [http://dw.leonite.info/ dw] [http://web.archive.org/web/20071205142235/msn-display-pics.surfle.info/ msn display pics] [http://meeting.leonite.info/ meeting] [http://web.archive.org/web/20071205142235/http://a-trendy-home.leonite.info/ a trendy home] [http://web.archive.org/web/20071205142235/http://list-of-exits.lovich.info/ list of exits] [http://web.archive.org/20071205143121/http://prono-movie.overwell.info/ prono movie] [http://web.archive.org/20071205143121/http://room-air-purifier.pinelike.info/ room air purifier] [http://web.archive.org/web/20071205142235/http://unlimited.leonite.info/ unlimited] [http://web.archive.org/web/20071205142235/http://union-western.pyknic.info/ union western] [http://web.archive.org/20071205143121/http://amateur-videos.pinelike.info/ amateur videos] [http://web.archive.org/20071205143121/western-decor.strontic.info/ western decor] [http://web.archive.org/web/20071205142235/http://west-wing-quotes.diadrome.info/ west wing quotes season 3] [http://web.archive.org/20071205143121/http://samhain.cubrun.info/ samhain] [http://web.archive.org/20071205143121/http://sexual-domination.pinelike.info/ sexual domination] [http://web.archive.org/20071205143121/http://remove-adware.topkick.info/ remove adware] [http://web.archive.org/web/20071205142235/http://yugi-oh.diadrome.info/ yugi oh] [http://web.archive.org/web/20071205142235/http://mississippi-highway.pyknic.info/ mississippi highway map] [http://web.archive.org/web/20071205142235/http://john-deere-2210.pyknic.info/ john deere 2210] [http://jack-arnold-home.leonite.info/ jack arnold home for sale] [http://web.archive.org/20071205143121/http://static-friction.pinelike.info/ static friction and] [http://web.archive.org/web/20071205142235/http://hire.pyknic.info/ hire] [http://web.archive.org/20071205143121/http://milf-finder.topkick.info/ milf finder] [http://web.archive.org/web/20071205142235/http://motorcycle-decals.pyknic.info/ motorcycle decals] [http://web.archive.org/web/20071205142235/fuji-s5000.surfle.info/ fuji s5000] [http://search-engine-list.overwell.info/ search engine list] [http://juniors-clothing.leonite.info/ juniors clothing] [http://web.archive.org/web/20071205142235/http://beachbabes.diadrome.info/ beachbabes] [http://sublimethumbs.leonite.info/ sublimethumbs] [http://slide-swimming.leonite.info/ slide swimming pools] [http://notre-dame-football.leonite.info/ notre dame football recruiting] [http://web.archive.org/web/20071205142235/http://cs-server-rental.lovich.info/ cs server rental] [http://web.archive.org/web/20071205142235/http://horse-penis.lovich.info/ horse penis] [http://web.archive.org/web/20071205142235/http://naked-little-girls.pyknic.info/ naked little girls] [http://tight-girl.leonite.info/ tight girl] [http://real-estate-simi.overwell.info/ real estate simi valley] [http://web.archive.org/20071205143121/http://tara-banks-pics.topkick.info/ tara banks pics] [http://solar-electric.pyknic.info/ solar electric] [http://aviation-accident.overwell.info/ aviation accident resource center] [http://web.archive.org/20071205143121/nofx.strontic.info/ nofx] [http://web.archive.org/web/20071205142235/http://las-vegas-condo.pyknic.info/ las vegas condo rentals] [http://tawnee-stone.leonite.info/ tawnee stone 2002] [http://web.archive.org/web/20071205142235/http://thousand-foot.lovich.info/ thousand foot krutch] [http://web.archive.org/20071205143121/http://naked-family-guy.cubrun.info/ naked family guy] [http://web.archive.org/20071205143121/http://bunn-coffee-maker.pinelike.info/ bunn coffee maker] [http://web.archive.org/web/20071205142235/http://keyhole.pyknic.info/ keyhole] [http://differentiated.leonite.info/ differentiated instruction] [http://web.archive.org/20071205143121/http://nfl-news.pinelike.info/ nfl news] [http://inuyasha-gallery.leonite.info/ inuyasha gallery] [http://web.archive.org/web/20071205142235/http://transport-packaging.pyknic.info/ transport packaging] [http://web.archive.org/20071205143121/http://womens-footwear.cubrun.info/ womens footwear] [http://web.archive.org/web/20071205142235/http://screen-names.lovich.info/ screen names] [http://bf-goodrich-tires.pyknic.info/ bf goodrich tires] [http://web.archive.org/web/20071205142235/http://mission-number.leonite.info/ mission number part rovers] [http://web.archive.org/20071205143121/http://womens-genitals.overwell.info/ womens genitals] [http://web.archive.org/web/20071205142235/http://fireworks-video.pyknic.info/ fireworks video] [http://web.archive.org/20071205143121/http://fast.pinelike.info/ fast] [http://web.archive.org/20071205143121/http://the-click-5.topkick.info/ the click 5] [http://prayer-saint.leonite.info/ prayer saint francis] [http://unlisted-phone.leonite.info/ unlisted phone] [http://web.archive.org/web/20071205142235/http://hardcore-videos.leonite.info/ hardcore videos] [http://new-milf-clips.pyknic.info/ new milf clips] [http://web.archive.org/web/20071205142235/http://teen-puffy-nipples.leonite.info/ teen puffy nipples] [http://web.archive.org/web/20071205142235/http://male-russian.leonite.info/ male russian name] [http://web.archive.org/web/20071205142235/50s-pin-up-girl.surfle.info/ 50s pin up girl] [http://web.archive.org/web/20071205142235/safety-first-baby.surfle.info/ safety first baby gates] [http://web.archive.org/web/20071205142235/http://beverly-hills.lovich.info/ beverly hills weezer] [http://web.archive.org/20071205143121/http://arrested.topkick.info/ arrested] [http://web.archive.org/web/20071205142235/http://do-it-yourself.diadrome.info/ do it yourself] [http://web.archive.org/20071205143121/http://miele-vacuum.overwell.info/ miele vacuum] [http://web.archive.org/web/20071205142235/http://girl-cams.leonite.info/ girl cams] [http://web.archive.org/web/20071205142235/http://landscape-gardenng.lovich.info/ landscape gardenng supplies] [http://web.archive.org/20071205143121/http://crotchless-pantyhose.overwell.info/ crotchless pantyhose] [http://web.archive.org/web/20071205142235/innocent-young.surfle.info/ innocent young girls]
{{Multiple issues|
{{Dead end|date=January 2024}}
{{Orphan|date=January 2024}}
}}
 
=Show Hide Buttons=
=Show Hide Buttons=
<pre>
<source lang="cpp">
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
// Purpose: set state of buttons
// Purpose: set state of buttons
Line 11: Line 15:
         entry->SetVisible(state);
         entry->SetVisible(state);
}  
}  
</pre>
</source>


=Diffrent scheme per team=
=Different scheme per team=
in the file: clientmode_shared.cpp find
in the file: clientmode_shared.cpp find
<pre>
<source lang="cpp">
void ClientModeShared::ReloadScheme( void )
void ClientModeShared::ReloadScheme( void )
</pre>
</source>
and just add this in:
and just add this in:
<pre>
<source lang="cpp">
C_BasePlayer *pPlayer = C_BasePlayer::GetLocalPlayer();
C_BasePlayer *pPlayer = C_BasePlayer::GetLocalPlayer();


Line 31: Line 35:
else if ( pPlayer->IsTeam(2) )
else if ( pPlayer->IsTeam(2) )
     m_pViewport->ReloadScheme( "resource/BlueScheme.res" );
     m_pViewport->ReloadScheme( "resource/BlueScheme.res" );
</pre>
</source>
 
[[Category:Snippets]]
[[Category:Snippets]]

Latest revision as of 10:19, 21 January 2024

Wikipedia - Letter.png
This article has multiple issues. Please help improve it or discuss these issues on the talk page. (Learn how and when to remove these template messages)
Dead End - Icon.png
This article has no Wikipedia icon links to other VDC articles. Please help improve this article by adding links Wikipedia icon that are relevant to the context within the existing text.
January 2024

Show Hide Buttons

//-----------------------------------------------------------------------------
// Purpose: set state of buttons
//-----------------------------------------------------------------------------
void [class name]::SetVisibleButton(const char *textEntryName, bool state)
{
    Button *entry = dynamic_cast<Button *>(FindChildByName(textEntryName));
    if (entry)
        entry->SetVisible(state);
}

Different scheme per team

in the file: clientmode_shared.cpp find

void ClientModeShared::ReloadScheme( void )

and just add this in:

C_BasePlayer *pPlayer = C_BasePlayer::GetLocalPlayer();

if(!pPlayer)
	return;

// Check which team...

if ( pPlayer->IsTeam(1) )
     m_pViewport->ReloadScheme( "resource/RedScheme.res" );
else if ( pPlayer->IsTeam(2) )
     m_pViewport->ReloadScheme( "resource/BlueScheme.res" );