icculus.org
[svn]
-
[hg]
-
[git]
-
[bugzilla]
-
[ssl]
-
[mail]
News archive: (submit news)
2002.02.23 ~12 Q3TA Customizable Popup Menu
http://www.linux.ucla.edu/~phaethon/q3vchat/q3vchat.html
This is a hack I had envisioned since maybe September or October of 2001.
I couldn't establish a solid goal for the final form until I played a lot of
Tribes 2, and thus took much inspiration from the Tribes 2 vchat menus.
I actually scribbled most of the solidification/finalizing notes while waiting
for my car to be repaired. =)
This hack was inspired by my WFA peri HUD; the basic idea of the popup menu is
to throw all the parts of the popup menu onto the screen, but render most of
them invisible most of the time, selectively setting certain pieces visible.
This creates the illusion of several menus appearing at different times in
the same spot on screen.
Unfortunately, implementing the idea in this exact manner exceeded the memory
capacity of the menu system.
Fortunately, though, I found a workaround. Instead of creating all possible
pieces of menus, I instead use a single set of Editfields arranged in a
column. Since the HUD cannot obtain mouse focus, the Editfields are safely
read-only (to an extent). The Editfields can also be set to display the
contents of a cvar. The Editfields are given a patterned cvar name.
A description of the menu layout is provided in a plaintext file. Using this
file, a perl script automagically generates the ridiculous number of cfgs to
help create the desired effect. The collection of cfgs work together to set
the values of each of the Editfield-associated cvars and the bindings of keys
at appropriate times and depths of the menu. The resulting effect is a
popup menu that is traversed by keystroke sequences, much like the vchat ('v')
menu in Tribes 2.
[ email newsmaster | get news rdf ]