Talk:VGUI: Making GameUI Panels: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
(Replaced content with "===This page is now redirected=== I've set this page to redirect to a new one because it does not work right and its very confusing for most and are getting compilier errors ...")
Line 1: Line 1:
You should bold the part about Including the testpanel.h file in the vgui_int.cpp. I missed it on my first pass of the text tutorial.
===This page is now redirected===
-Simkin
I've set this page to redirect to a new one because it does not work right and its very confusing for most and are getting compilier errors and the fact that there is already a tutorial on it. --[[User:Motherfat|Motherfat]] 13:33, 10 February 2012 (PST)
 
:Jump right in and do so. This is a wiki. &mdash;'''[[User:Maven|Maven]]''' <sup>([[User talk:Maven|talk]])</sup> 10:33, 7 Oct 2005 (PDT)
 
How do you give the panel focus? When I show my panel it ends up behind another panel. --[[User:.freelancer|.freelancer]] 15:40, 30 Nov 2005 (PST)
 
call its <code>RequestFocus()</code>&mdash;'''[[User:Ts2do|ts2do]]'''&nbsp;<sup>([[User talk:Ts2do|Talk]]&nbsp;|&nbsp;[mailto:tsdodo@gmail.com @])</sup> 20:11, 30 Nov 2005 (PST)
 
:Doesn't work, it's still not recieving focus.. --[[User:.freelancer|.freelancer]] 07:45, 1 Dec 2005 (PST)
:I could still use some help here.. --[[User:.freelancer|.freelancer]] 03:25, 3 Dec 2005 (PST)
 
::Only a very few of us have ever messed with VGUI panels at all. When you figure it out, you get to be the VDC expert on them. <grin> &mdash;'''[[User:Maven|Maven]]''' <sup>([[User talk:Maven|talk]])</sup> 18:04, 3 Dec 2005 (PST)
 
Use <code>MoveToFront()</code> in <code>OnTick()</code>. This way it always stays on top of other panels. --[[User:Jerry|Jerry (MrU on VERC)]] 02:35, 6 Dec 2005 (PST)
 
I've attempted this approach before...it's no good because it would go over the quit dialog when it pops up&mdash;'''[[User:Ts2do|ts2do]]'''&nbsp;<sup>([[User talk:Ts2do|Talk]]&nbsp;|&nbsp;[mailto:tsdodo@gmail.com @])</sup> 05:55, 6 Dec 2005 (PST)
 
It's just an example for displaying a screen all the time. If you only want it to move to the front in the beginning than you can just drop <code>MoveToFront()</code> in <code>Init()</code>. I use it for displaying a dialog which you have to close before moving onto something else. --[[User:Jerry|Jerry (MrU on VERC)]] 06:01, 6 Dec 2005 (PST)
 
well if the frame makes it impossible to click quit in the gamemenu, that's fine&mdash;'''[[User:Ts2do|ts2do]]'''&nbsp;<sup>([[User talk:Ts2do|Talk]]&nbsp;|&nbsp;[mailto:tsdodo@gmail.com @])</sup> 19:10, 6 Dec 2005 (PST)
 
See [[VGUI_Documentation#Windows_.26_Popups]]
 
Added the bold to the vgui_int.ccp header includes bit and clarified the wording so it's not missed (I missed it too the first time). --[[User:schenkman|schenkman]] 17:55, 30 Oct 2006 (PST)
 
I just wonder how you changed the color/appearance of the <b>standard</b> panels like the console panel!? How did you change their color(s) and added own images? Thx a lot! [[User:Archer|Archer]] 07:29, 26 Nov 2007 (PST)
 
Where in the code do you set the show/hide toggle? [[User:elr9y|elr9y]] 21:39, 12 Nov 2009
 
=Errors=
This tutorial is not working, i followed it 100% precisely but it does not work. Even the testpanel.cpp doesn't and i didn't modify that one!
Here's all my errors:
 
:\vgui_helpers.h(75) : error C2011: 'IGameUI' : 'class' type redefinition
:\vgui_helpers.h(20) : see declaration of 'IGameUI'
:\testpanel.h(15) : error C2504: 'IGameUI' : base class undefined
:.\vgui_int.cpp(169) : error C2027: use of undefined type 'IGameUI'
:\vgui_helpers.h(20) : see declaration of 'IGameUI'
:.\vgui_int.cpp(169) : error C2227: left of '->Create' must point to class/struct/union/generic type
:.\vgui_int.cpp(201) : error C2027: use of undefined type 'IGameUI'
:\vgui_helpers.h(20) : see declaration of 'IGameUI'
:.\vgui_int.cpp(201) : error C2227: left of '->Destroy' must point to class/struct/union/generic type testpanel.cpp
:\vgui_helpers.h(75) : error C2011: 'IGameUI' : 'class' type redefinition
:\vgui_helpers.h(20) : see declaration of 'IGameUI'
:\testpanel.h(15) : error C2504: 'IGameUI' : base class undefined
:.\testpanel.cpp(8) : error C2027: use of undefined type 'IGameUI'
:\vgui_helpers.h(20) : see declaration of 'IGameUI'
:.\testpanel.cpp(8) : error C2227: left of '->GetPanel' must point to class/struct/union/generic type
:.\testpanel.cpp(8) : error C2227: left of '->SetVisible' must point to class/struct/union/generic type
:.\testpanel.cpp(8) : error C2027: use of undefined type 'IGameUI'
:\vgui_helpers.h(20) : see declaration of 'IGameUI'
:.\testpanel.cpp(8) : error C2227: left of '->GetPanel' must point to class/struct/union/generic type
:.\testpanel.cpp(8) : error C2227: left of '->IsVisible' must point to class/struct/union/generic type
 
Can anyone help, please? --[[User:Craziestdan|Craziestdan]] 11:49, 24 Sep 2008 (PDT)
 
 
== Added some stuff ==
I added a link to my user page where I give a few lines of code to show/hide high-level panels. Might be useful for newcomers.  
--[[User:Psycommando|psycommando]] 01:03, 31 March 2010 (UTC)

Revision as of 14:33, 10 February 2012

This page is now redirected

I've set this page to redirect to a new one because it does not work right and its very confusing for most and are getting compilier errors and the fact that there is already a tutorial on it. --Motherfat 13:33, 10 February 2012 (PST)