Pop Up Menu
<div class="IPBDescription">I need to know how to make Pop Up Menus.</div> Few days ago I downloaded HLamp and installed it. Now I'm just wondering if it would work on NS too. Only real problem must be the NS Pop up menu which most likely is not like commandmenu in hl, cs, tfc... I tried to make buttons by editing the ui.txt (instead of commandmenu.txt) and managed to put a button in Admin category where there is one free slot (node24 = 0/0/#Winamp/0). I only don't know how to continue(making the button work, ie. running commands). Is there some place these # things are stored and defined? As you can see I really know nothing about coding and such but my main purpose is to make HL work in NS as it works in all other HL mods I know. I appreciate answering. <!--emo&::skulk::--><img src='http://www.unknownworlds.com/forums/html/emoticons/skulk.gif' border='0' style='vertical-align:middle' alt='skulk.gif'><!--endemo-->
Comments
<ul>
<li>node1 = 4/#MenuComms/0
<li>node2 = 4/2/#MenuTalk/0
<li>node3 = 4/2/4/#MenuFollowMe/7
<li>node4 = 4/2/2/#MenuCovering/8
<li>node5 = 4/2/0/#MenuTaunt/9
<li>node6 = 4/6/#MenuYell/0
<li>node7 = 4/6/0/#MenuNeedHealth/10
<li>node8 = 4/6/6/#MenuNeedAmmo/11
<li>node9 = 4/6/4/#MenuInPosition/12
<li>node10 = 4/4/#MenuSay/0
<li>node11 = 4/4/2/#MenuMoveOut/14
<li>node12 = 4/4/4/#MenuEnemySpotted/13
<li>node13 = 4/4/6/#MenuAllClear/15
<li>node14 = 6/#MenuWeapon/0
<li>node15 = 6/4/#MenuReloadWeapon/2
<li>node16 = 6/0/#MenuDropWeapon/3
<li>node17 = 6/6/#MenuNextWeapon/1
<li>node18 = 2/#MenuOrders/0
<li>node19 = 2/0/#MenuNeedOrder/80
<li>node20 = 2/4/#MenuAck/81
<li>node21 = 0/#MenuAdmin/0
<li>node22 = 0/6/#MenuReadyRoom/5
<li>node23 = 0/2/#MenuVoteCommanderDown/6
</ul>
Next, in titles.txt:
<!--c1--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>CODE</b> </td></tr><tr><td id='CODE'><!--ec1-->
MenuFollowMe
{
"Follow me"
}
<!--c2--></td></tr></table><span class='postcolor'><!--ec2-->
I'm only including the one snippet of titles.txt for a reason.
See that first line? <span style='color:white'>MenuFollowMe</span>? Now, see that line from UI.txt, <span style='color:white'>node3 = 4/2/4/#MenuFollowMe/7</span>
That should show how to actually put a name and label on a new 'node' of the tree-menu.
Now, how to design one? That's harder. I'll break that line apart bit by bit to explain how it works, since it's a lot there, but each part is rather simple.
<ul>
<li><span style='color:white'>node3 =</span> This part is a sequential node, each node must have a unique, sequential number. You can't skip node5, for instance, if you have a node6.
<li><span style='color:white'>4/2/4/</span> This says where the button ends up located. Just experiment, you'll figure it out. The more numbers, the deeper in the structure the selection is buried, so keep that in mind.
<li><span style='color:white'>#MenuFollowMe</span> This part, the #, says that the next bit until the next / is the name to look up in <span style='color:white'>titles.txt</span> to label this node.
<li><span style='color:white'>/7</span> And this number is the impulse to trigger. This is all that can be triggered that I know of currently, is impulses. Extreme manipulation and trickery might allow for something else, but the menu system was designed only to trigger 'impulse' commands.
</ul>
And I hope that clarifies how the popup menu works. :-) If not, question away!
It does'nt. I just threw the TFC one in my NS dir and then edited it so only the HLAmp stuff was in it.
bind "v" "+commandmenu"