Results 1 to 6 of 6
  1. #1
    Wampwire's Avatar
    Join Date
    Jun 2013
    Gender
    male
    Location
    United Kingdom of Tea
    Posts
    227
    Reputation
    10
    Thanks
    22
    My Mood
    Devilish

    Display Username

    Alright so this is a quick short tutorial for you lot.
    So, this is just a simple code to show your username on the Main Menu, a bit like this.

     


    Ok, to get started, open up your custom MainMenu. If you're lazy and cant be bothered to create hooks for guis, go ahead and open up GuiMainMenu. Its pretty much the same thing.

    Next scroll down to where the "Copyright blah blah stuff. Do not distribute!" is. Then underneath the drawstring of the var10 (which is the Copyright thing), initialize a String called whatever. This string will get the username from Session class.
    After, we just have to draw the string.
    So overall, your code should look a little bit like this...

    Code:
            String user = Session.username;
            String var89 = "Username: " + user;
            this.drawString(this.fontRenderer, var89, this.width / 2 + 10, this.height / 2 - 5, 0xffffff);

    Of-course you can just do this.fontRenderer, "Username: " + user,... but its just more convenient for me like this.

  2. #2
    LordPankake's Avatar
    Join Date
    Aug 2012
    Gender
    male
    Posts
    1,010
    Reputation
    260
    Thanks
    2,466
    My Mood
    Angry
    Main menu you got there looks nice Maybe if you aligned the buttons differently and added other information (Sort of like Xenon's menu)

  3. #3
    Wampwire's Avatar
    Join Date
    Jun 2013
    Gender
    male
    Location
    United Kingdom of Tea
    Posts
    227
    Reputation
    10
    Thanks
    22
    My Mood
    Devilish
    @LordPankake Thanks, tho im quite crappy at gui stuff.. It took me a good few minutes to align each of the buttons up And yeah I like Xenons main menu, but i wont just copy the looks of it Id like to make something more unique-ish.. Maybe ill redo the whole client and create maybe a new main menu or stuff, but for now Im sticking with what ive got and what I made.

     


    Well, here's a little bit of what I added a while ago... I honestly have no idea what else to add.. Any ideas? Uhm, it uses the getMinecraftVersion() string and the org.lwjgl.Sys.getVersion(); for the versions so no need to manually change the strings.. Ah im bored... I talk shit when Im bored..
    + I have no idea what colours i should use.. so.. its just hanging there atm..
    Last edited by Wampwire; 06-28-2013 at 02:10 PM.

  4. #4
    _Proxies's Avatar
    Join Date
    Jun 2013
    Gender
    male
    Posts
    20
    Reputation
    10
    Thanks
    3
    Gotta say, your one of the people on this forum who aren't idiots. Nice main menu, clean. If you going to add news I would suggest making it read the news from a web based text folder

  5. The Following User Says Thank You to _Proxies For This Useful Post:

    LordPankake (06-28-2013)

  6. #5
    Wampwire's Avatar
    Join Date
    Jun 2013
    Gender
    male
    Location
    United Kingdom of Tea
    Posts
    227
    Reputation
    10
    Thanks
    22
    My Mood
    Devilish
    Yeah, then just upload a file to my website and make it get the text file from the url. I was thinking about it, but I cant be bothered to create a whole website for something.. I aint bothered to maintain it and stuff.. So might aswell just add a txt file along with all class files and use something like bufferedReader.. \(.-.)/ no idea..

  7. #6
    Caezer99's Avatar
    Join Date
    Dec 2011
    Gender
    male
    Location
    127.0.0.1
    Posts
    577
    Reputation
    10
    Thanks
    1,243
    Nice tutorial, you deserve a thanks.


    Mess with the best, die like the rest.


Similar Threads

  1. Displayed Ammo Address
    By Stranger00 in forum WarRock - International Hacks
    Replies: 2
    Last Post: 07-31-2007, 02:55 AM
  2. [WARNING]Do never post ur real username
    By System79 in forum WarRock - International Hacks
    Replies: 20
    Last Post: 06-07-2007, 06:19 AM
  3. Hacking Warrock Usernames
    By Methadone727 in forum WarRock - International Hacks
    Replies: 8
    Last Post: 05-30-2007, 03:15 PM
  4. Username needs filled out???
    By Dr. Doom89 in forum General
    Replies: 1
    Last Post: 02-28-2007, 10:16 PM
  5. Cool Display
    By Dave84311 in forum General
    Replies: 5
    Last Post: 02-20-2006, 12:24 AM

Tags for this Thread