Page 1 of 1

Hotfix VSay Menu v2

Posted: Thu Jun 07, 2012 6:11 am UTC
by E-Mxp
[CENTER]Hotfix VSay Menu v2 by E-Mxp.
For Unvanquished Alpha 4.

unvanquished_2012-06-07_124802_000.jpg
unvanquished_2012-06-07_124802_000.jpg
unvanquished_2012-06-07_124802_000.jpg
unvanquished_2012-06-07_124802_000.jpg
unvanquished_2012-06-07_124802_000.jpg


- Download here -
[/CENTER]


Voice commands are extremely useful, but I personally found the placeholder menu for the voice chat to have some strange decisions.
This is an attempt to fix some of the clunkyness of the placeholder menu and add some more functions.

Here is a small list of the things I find strange.

*You can not move and look around while using the voice commands (because it's made to work like the armoury menu/evolve menu.
*It disables your regular WASD and wants you to use the number keys.

MAIN FEATURES:

*Rebinded the keys to focus around the WASD keys for faster use.
*Added a special menu for the humans for buying weapons and armour and for selecting buildings.
*Added a special menu for the aliens for evolving and selecting buildings.

CHANGES FROM V1:
*Added the background back in. Without it, the text was hard to read depending on how bright the map is.
*Seperated the human and alien options to their own menu's; rebranded them Quick Menu's.
*Quickmenu's can be set though the ingame options. (default k for humans and l for aliens)
*For those who don't use the cg_alien/humanConfig settings, you might want to [exec vsay_install.cfg]. This will bind the g button to the quickmenu and automatically rebinds it whenever you change teams!
*Fixed some armour binds. (selecting Helmet will sell your light armour and reverse)

KNOWN ISSUES:
The Alien QuickMenu and Human QuickMenu settings that show up in the in-game options will always display [???] regardless of what your settings are.
I really don't know how to fix this. It actually works though.

After choosing an option, your movements will freeze for a moment (kind of like the bug in HalfLife 1, where after you quicksaved you can't jump/move for a second after loading).
This seems to be a problem with menu code as it expects you to click on something (I think), and for the menu being used for different things than that it's actually made for ^_^'.

Re: Hotfix VSay Menu v1

Posted: Fri Jun 08, 2012 4:11 pm UTC
by Ishq
Nice job :). The reason I included background menu was to make sure the text was visible. Sometimes with different map settings, the text could be hard to read. You can't move while using the menu because it is a menu. The only alternative that I thought of was to use a 1.1 style chatmenu, but I thought that was too ugly an implementation because it would override your binds and you would no longer be able to use those keys.

Also, if you want to display the letters as uppercase, you can do this:

Code: Select all


#define VSAY_ITEM( TEXT, KEY, KEY_UPPER, ACTION, X, Y, POS ) \
   itemDef \
   { \
      name "pos"##TEXT \
      style WINDOW_STYLE_EMPTY \
      rect (X+10) (Y+40+(25*POS)) 20 25 \
      type ITEM_TYPE_TEXT \
      text #KEY_UPPER##"." \
      textstyle ITEM_TEXTSTYLE_SHADOWED \
      textscale .375 \
      forecolor 1 1 1 1 \
      visible MENU_TRUE \
      decoration \
   } \
   itemDef \
   { \
      name "pos"##TEXT \
      style WINDOW_STYLE_EMPTY \
      rect (X+30) (Y+40+(25*POS)) 230 25 \
      type ITEM_TYPE_TEXT \
      text TEXT \
      textstyle ITEM_TEXTSTYLE_SHADOWED \
      textscale .5 \
      forecolor 1 1 1 1 \
      visible MENU_TRUE \
      decoration \
   } \
   onKEY KEY { ACTION }


And then you'd define each item as:

Code: Select all

VSAY_ITEM( "Stay Alive!", q, Q,  close vsay_status ; exec "vsay stayalive", 0, 0, 6 )

Re: Hotfix VSay Menu v1

Posted: Sun Jun 10, 2012 5:11 pm UTC
by E-Mxp
Awesome! Thank you!

You where right about the background so I added it back in.

Oh! And I updated it!

I don't really know what I did wrong with the ingame options though. It works, it shows up correctly but it will constantly display ???. I really don't know. :(