I honestly don't know if that is possible or not. There are three things you could try:
Thing 1) Use a ImagePanel Control and call setSize for that one (\hlsdk\multiplayer\utils\vguiVGUI_ImagePanel.h) Thing 2) Use the CImageLabel class (it has a constructor that allows to supply a width and height) Declared in hlsdk\multiplayer\cl_dll\vgui_TeamFortressViewport.h Implemented in \hlsdk\multiplayer\cl_dll\vgui_CustomObjects.cpp Thing 3) Let's say myPanel is the panel for which you already use the setImage function, then modify your code to s.th. like this: (This is similar to what the CImageLabel constructor that takes width and height does). myPanel->setSize(wantx,wanty); myPanel->setContentFitted(true); myPanel->SetImage(pmyTGAimage); (if you are doing this when the panel is already visible, you might also want to call myPanel->paint() afterwards). ----- Original Message ----- From: "Drak" <[EMAIL PROTECTED]> To: "'Discussion of Half-Life Programming'" <[email protected]> Sent: Monday, April 07, 2008 5:16 AM Subject: Re: [hlcoders] VGUI Hud (HL 1 SDK) > Thank you so much, it's working now. The last thing now, is I can't figure > out how to scale/re-size the image loaded. Other than that, it's working > just fine. :) > > Things like.. > > m_pFightTimer->setSize( 50, 50 ); > > Don't seem to do anything. > > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Dominik > Tugend > Sent: Sunday, April 06, 2008 8:20 PM > To: Discussion of Half-Life Programming > Subject: Re: [hlcoders] VGUI Hud (HL 1 SDK) > > Several VGUI elements have a setImage function i.e. VGUI_ImagePanel (which > also accepts a image in the constructor). > Don'f forget to delete the image after you don't use it anymore (i.e. in > the > > destructor). > Use Visual Studio's Search in Files function (ctrl + shif + f) to find > other > > functions in the hlsdk. > > I think for examples you could look i.e. into those: > hlsdk\multiplayer\game_shared\voice_status.cpp > > hlsdk\multiplayer\game_shared\voice_status.h > > > > and > > CHealthPanel in > > hlsdk\multiplayer\cl_dll\vgui_TeamFortressViewport.h > > > > The cl_dll also has a special CImageLabel class which is used in this > tutorial: > > http://articles.thewavelength.net/300/ > > > > (don't forget you can set panel backgrounds to be transparent) > > > ----- Original Message ----- > From: "Drak" <[EMAIL PROTECTED]> > To: "'Discussion of Half-Life Programming'" > <[email protected]> > Sent: Sunday, April 06, 2008 11:25 PM > Subject: Re: [hlcoders] VGUI Hud (HL 1 SDK) > > >> Thanks. I'm actually using VGUI now, since it seemed to work just fine. >> But one last thing would be, loading .tga's. Looking through the >> examples/vgui sources. It seems it's possible. >> But I'm still confused on how to place it and such. I assume what I have >> below loads it. (Returns successfully) >> >> BitmapTGA *pTGA; >> pTGA = vgui_LoadTGA("resource/icon_vac.tga"); >> if( pTGA != NULL ) >> { >> // Place it on the screen? >> } >> >> How would I go about placing it on the screen? >> Thanks again. >> >> -----Original Message----- >> From: [EMAIL PROTECTED] >> [mailto:[EMAIL PROTECTED] On Behalf Of Dominik >> Tugend >> Sent: Sunday, April 06, 2008 6:22 AM >> To: Discussion of Half-Life Programming >> Subject: Re: [hlcoders] VGUI Hud (HL 1 SDK) >> >> I am very sorry for not rading your text properly enough, you ment >> without >> VGUI : ( >> >> May be you can find s.th. usefull here: >> >> http://articles.thewavelength.net/section/7/ >> http://articles.thewavelength.net/326/ >> http://articles.thewavelength.net/537/ >> >> ----- Original Message ----- >> From: "Drak" <[EMAIL PROTECTED]> >> To: <[email protected]> >> Sent: Sunday, April 06, 2008 6:53 AM >> Subject: [hlcoders] VGUI Hud (HL 1 SDK) >> >> >>> I'm trying to make a VGUI "overlay" on the HUD. >>> >>> Example: http://img246.imageshack.us/img246/9138/c4a10000xh6.jpg >>> >>> >>> >>> I want to have a small VGUI box where the text is located on that >>> picture, >>> is this even possible? >>> >>> I'm only wanting it to show simple text. (Date, Time, Month). >>> >>> Is there some method other than using VGUI to accomplish this? >>> (TRI-API?) >>> >>> I don't know too much about the HL1 SDK VGUI stuff. As opposed to Source >>> VGUI. >>> >>> _______________________________________________ >>> To unsubscribe, edit your list preferences, or view the list archives, >>> please visit: >>> http://list.valvesoftware.com/mailman/listinfo/hlcoders >>> >> >> >> _______________________________________________ >> To unsubscribe, edit your list preferences, or view the list archives, >> please visit: >> http://list.valvesoftware.com/mailman/listinfo/hlcoders >> >> >> __________ NOD32 3005 (20080406) Information __________ >> >> This message was checked by NOD32 antivirus system. >> http://www.eset.com >> >> >> >> _______________________________________________ >> To unsubscribe, edit your list preferences, or view the list archives, >> please visit: >> http://list.valvesoftware.com/mailman/listinfo/hlcoders >> > > > _______________________________________________ > To unsubscribe, edit your list preferences, or view the list archives, > please visit: > http://list.valvesoftware.com/mailman/listinfo/hlcoders > > > __________ NOD32 3005 (20080406) Information __________ > > This message was checked by NOD32 antivirus system. > http://www.eset.com > > > > _______________________________________________ > To unsubscribe, edit your list preferences, or view the list archives, > please visit: > http://list.valvesoftware.com/mailman/listinfo/hlcoders > _______________________________________________ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders

