Results 1 to 7 of 7
  1. #1
    hamste's Avatar
    Join Date
    Nov 2011
    Gender
    male
    Posts
    32
    Reputation
    10
    Thanks
    2

    JAVA Help request... GUI related

    So I want to make a similar to nodus where it has the arrow keys to change tabs. I've tried this: (using integers)


    //Else of debug menu

    private int swag = 3

    If(checkKey(Keyboard.KEY_RIGHT))
    {
    swag = 4. //scrolls to next tab?
    }

    If(swag = 4)
    {
    Drawrect blah blah blah
    }


    //repeat for checkKey left and swag = 2








    Any help? Solutions? Or am I looking at this wrong. Please don't tell me I'm noob or to look at nodus code because I know or have done both.

    Noob out

  2. #2
    Wampwire's Avatar
    Join Date
    Jun 2013
    Gender
    male
    Location
    United Kingdom of Tea
    Posts
    227
    Reputation
    10
    Thanks
    22
    My Mood
    Devilish
    If youre still up for it, ive done it. You can use if statements to check stuff.. For example, of the top of my head...

     
    Code:
    private void pKeyLeft() {
        	x -= 1;
        	if(x == -1) {
        		x = 2;
            }
    }

    So this is the same as using if(checkKey(Keyboard.KEY_LEFT)) { method, but I use voids.
    To explain the code, I have for the left key, an integer, which when the left key is pressed, then it would do minus 1 from x. After this, I have a check, so if x is equal to -1, then set x to be 2 (where I presume 2 would be your last menu (going from 0, 1, 2) so youd skip 1 and set it to 2..).

    For the right key, its the same except youd add one to x and instead of checking whether x equals to -1, youd check it so it is equal to 3, if it is, then set x to be 0.

    Ok, litterally, the hard part is done. For the menu, create a new class, so it is easier to update it. And have a drawMenuText void.. Look up on tutorials and stuff. But if youre using GuiIngame method.. Well, then do the same. Do,
     
    Code:
    if(x == 0) {
        drawStuff();
    }
    if(x == 1) {
        drawMoreStuff();
    }
    if(x == 2) {
        onceAgainDrawStuff();
    }

    Uhm, instead of using the void pKeyLeft() {} you could just replace that with if(checkKey(Keyboard.KEY_BLAH)) {}.. Hope you get the idea

  3. #3
    LordPankake's Avatar
    Join Date
    Aug 2012
    Gender
    male
    Posts
    1,010
    Reputation
    260
    Thanks
    2,466
    My Mood
    Angry
    Isn't it amazing what a simple google search will do?
    (Attachment is the Nodus Gui code, but it's a remake.)

    Edit: "Have done both" So you've seen the real nodus source code? (sarcasm)

    Edit 2: Since Im not currently able to scan the attatchment I removed it. However you can find it by googling " minecraft nodus gui remake"
    Last edited by LordPankake; 06-27-2013 at 12:12 PM.

  4. The Following User Says Thank You to LordPankake For This Useful Post:

    crex (06-27-2013)

  5. #4
    crex's Avatar
    Join Date
    Aug 2010
    Gender
    male
    Location
    leaf village
    Posts
    11,667
    Reputation
    1365
    Thanks
    2,572
    Quote Originally Posted by LordPankake View Post

    Isn't it amazing what a simple google search will do?
    (Attachment is the Nodus Gui code, but it's a remake.)

    Edit: "Have done both" So you've seen the real nodus source code? (sarcasm)
    @LordPankake
    You forgot to scan the attachment and provide virus scans. :P

  6. #5
    LordPankake's Avatar
    Join Date
    Aug 2012
    Gender
    male
    Posts
    1,010
    Reputation
    260
    Thanks
    2,466
    My Mood
    Angry
    Quote Originally Posted by Buttermilk Biscuits View Post

    @LordPankake
    You forgot to scan the attachment and provide virus scans. :P
    Fixed. Have OP instructions on how to find it instead.

  7. The Following User Says Thank You to LordPankake For This Useful Post:

    crex (06-27-2013)

  8. #6
    Wampwire's Avatar
    Join Date
    Jun 2013
    Gender
    male
    Location
    United Kingdom of Tea
    Posts
    227
    Reputation
    10
    Thanks
    22
    My Mood
    Devilish
    Theres the source code for it if someones too lazy...

    Nodus GUI remake src.zip - Jotti's malware scan
    https://www.virustotal.com/uk/file/a...df67/analysis/

    ^_^ There chu go :P

    <b>Downloadable Files</b> Downloadable Files

  9. #7
    Hero's Avatar
    Join Date
    Feb 2011
    Gender
    male
    Location
    memes
    Posts
    40,134
    Reputation
    4764
    Thanks
    9,674
    Approved .
    [] [] [] [][]

    Editor from 06•14•2011 • 2014
    Donator since 09•16•2011
    Minion from 10•10•2011 • 01•06•2011
    Minion+ from 01•06•2012 • 08•08•2012
    Moderator from 08•08•2012 • 10•06•2012
    Global Moderator from 10•06•2012 • 12•05•2017
    Staff Administrator from 12•05•2017 • 05•01•2019
    Trusted Member since 07•13•2019
    Global Moderator since 09•11•2020




Similar Threads

  1. [Help Request] [Help request] Cheat engine says error on opening AVA.exe process :@
    By kalokoko in forum Alliance of Valiant Arms (AVA) Help
    Replies: 0
    Last Post: 08-11-2012, 01:56 PM
  2. [Help Request] [Help Request] How to make No Recoil hack in Visual Studio?
    By Tstovall in forum CrossFire Help
    Replies: 5
    Last Post: 07-20-2011, 02:55 AM
  3. [Help Request] HElp request ?
    By wakosam in forum CrossFire Help
    Replies: 2
    Last Post: 07-17-2011, 06:35 PM
  4. [Help Request] Easy Help Request.
    By KrustyKokehead in forum Vindictus Help
    Replies: 6
    Last Post: 06-01-2011, 05:58 PM
  5. [Help Request] Heya java help
    By molina174 in forum Minecraft Help
    Replies: 3
    Last Post: 05-09-2011, 09:48 PM