-- [ Picked text/plain from multipart/alternative ] You can test to see if the panel is overriding key presses by bringing up the console (~) and typing the console command there.
When you said "nothing happened" what did IsVisible() return within the con_command? Try making 2 con_commands: 1 sets the visibility to false and the other sets the visibility to true. If that works, then you know the problem is not with the panel capturing key strokes, etc. Let me know what happens (I'm curious). :) On 10/11/06, enriched <[EMAIL PROTECTED]> wrote: > > Thx oliver for the suggestions, there were only a few problems with what > you suggested. > > test->IsVisible() doesn't work because IsVisible() isn't a member of > IGameUI > > i had to use test->GetPanel()->IsVisible() > > and test->GetPanel()->SetVisible() instead > > > Strangely I was debuggin this and when i pressed the b (bound to > toggletestpanel) when the panel was visable nothing happened, > > when i pressed b the second time the break never got called, it is liked > it got ignored somehow, could the menu be overriding all of the key > presses? > > I am using the latest sdk for this maybe this bug is happening? > > http://developer.valvesoftware.com/cgi-bin/bugzilla/show_bug.cgi?id=4 > > > > -Kuja, > > you said u were using the tutorial in your mod too but it worked, have you > updated to the lastest sdk yet? > > did you try biding the toggletestmenu to a botton "b" and try it and work > with the latest sdk? > > > > > > > > > Oliver wrote: > > -- > > [ Picked text/plain from multipart/alternative ] > > Try changing this (cuts out a level of indirection): > > > > CON_COMMAND(ToggleTestPanel,NULL) > > { > > ToggleVisibility(test->GetPanel()); > > } > > > > To this: > > CON_COMMAND(ToggleTestPanel,NULL) > > { > > test->SetVisible(!test->IsVisible()); > > > > } > > > > If that doesn't work, trace the con_command to see what > > test->IsVisible() returns. Let me know what happens. > > -- > > > > _______________________________________________ > > 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 > > -- _______________________________________________ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders