Pop Up Menu

persoperso Join Date: 2003-02-19 Member: 13740Members, WC 2013 - Supporter
<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

  • DOOManiacDOOManiac Worst. Critic. Ever. Join Date: 2002-04-17 Member: 462Members, NS1 Playtester
    check out ui.txt. it seems to be where the NS piemenu stuff is, though I dunno if it can be modifed or what, so make a backup.
  • persoperso Join Date: 2003-02-19 Member: 13740Members, WC 2013 - Supporter
    I know that, I just dunno how attach command(s) to to that button. I got it where i wanted in pop up menu but when i press it, it (ofcourse) does nothing. <!--emo&;)--><img src='http://www.unknownworlds.com/forums/html/emoticons/wink.gif' border='0' style='vertical-align:middle' alt='wink.gif'><!--endemo-->
  • DOOManiacDOOManiac Worst. Critic. Ever. Join Date: 2002-04-17 Member: 462Members, NS1 Playtester
  • RhoadsToNowhereRhoadsToNowhere i r 8 Join Date: 2002-01-24 Member: 33Members
    edited February 2003
    I wouldn't be surprised if everything in the pie menu was controlled through the .dll code, which only Flayra has access to. It might be a neat accessory in the future to be able to customize your own pie menu, but if you know enough about customization to do something like this, you might be just as well off writing binds. (I don't know if HLAMP uses binds or not, please correct me if I'm mistaken.)
  • Teufel_EldritchTeufel_Eldritch Join Date: 2002-01-28 Member: 124Members
    Why use the pop-up menu for HLAmp? I use the command menu instead. Granted I dont use it for anything else but still.....
  • persoperso Join Date: 2003-02-19 Member: 13740Members, WC 2013 - Supporter
    I thought ns DIDN'T HAVE command menu. <!--emo&::asrifle::--><img src='http://www.unknownworlds.com/forums/html/emoticons/asrifle.gif' border='0' style='vertical-align:middle' alt='asrifle.gif'><!--endemo-->
  • WolfWingsWolfWings NS_Nancy Resurrectionist Join Date: 2002-11-02 Member: 4416Members
    edited February 2003
    First, in UI.txt:
    <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!
  • Teufel_EldritchTeufel_Eldritch Join Date: 2002-01-28 Member: 124Members
    <!--QuoteBegin--Dragoni+Feb 20 2003, 11:11 AM--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (Dragoni @ Feb 20 2003, 11:11 AM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> I thought ns DIDN'T HAVE command menu. <!--emo&::asrifle::--><img src='http://www.unknownworlds.com/forums/html/emoticons/asrifle.gif' border='0' style='vertical-align:middle' alt='asrifle.gif'><!--endemo--> <!--QuoteEnd--> </td></tr></table><span class='postcolor'> <!--QuoteEEnd-->
    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.
  • Teufel_EldritchTeufel_Eldritch Join Date: 2002-01-28 Member: 124Members
    Here is the command menu I use. Be sure to bind a key to it.

    bind "v" "+commandmenu"
Sign In or Register to comment.