Thread: Centering name?

Results 1 to 14 of 14
  1. #1
    BurgerLoverMx's Avatar
    Join Date
    Jan 2014
    Gender
    male
    Location
    Québec
    Posts
    411
    Reputation
    23
    Thanks
    843
    My Mood
    Relaxed

    Centering name?

    How would I center the name text?
    Been looking around the client on how stuff like the name changer do it but I don't really understand it.
    This is done using prod client, in characterdetailsview

    Last edited by BurgerLoverMx; 11-02-2016 at 06:17 PM.

  2. #2
    Riigged's Avatar
    Join Date
    Jan 2013
    Gender
    male
    Location
    no
    Posts
    3,846
    Reputation
    401
    Thanks
    10,254
    My Mood
    Devilish
    same way you moved it to that spot its currently in, change the X coord to be a tad bit more to the right lol


    also, should have experimented with moving the inventory and tab holders first, thats gonna be troubling to you if you havent already, same with removing the bar (well, its actually just removing an addChild or commenting it out) and making the player centered after removing that (since the right side of screen will be bigger after bar is removed) if thats what you were planning on doing

     








  3. #3
    BurgerLoverMx's Avatar
    Join Date
    Jan 2014
    Gender
    male
    Location
    Québec
    Posts
    411
    Reputation
    23
    Thanks
    843
    My Mood
    Relaxed
    Quote Originally Posted by Riigged View Post
    same way you moved it to that spot its currently in, change the X coord to be a tad bit more to the right lol


    also, should have experimented with moving the inventory and tab holders first, thats gonna be troubling to you if you havent already, same with removing the bar (well, its actually just removing an addChild or commenting it out) and making the player centered after removing that (since the right side of screen will be bigger after bar is removed) if thats what you were planning on doing
    Yeh what I'm planning to do (not exactly but yeh)

    And changing that will only work if im using that name, while using another name it wont work properly, while the name changer always keeps the name centered.

  4. #4
    Riigged's Avatar
    Join Date
    Jan 2013
    Gender
    male
    Location
    no
    Posts
    3,846
    Reputation
    401
    Thanks
    10,254
    My Mood
    Devilish
    Quote Originally Posted by BurgerLoverMx View Post
    Yeh what I'm planning to do (not exactly but yeh)

    And changing that will only work if im using that name, while using another name it wont work properly, while the name changer always keeps the name centered.
    check out the name changer then

    its a small rectangle/square with a transparent background (im assuming) so its placed in the centered of the rectangle/square

    can try making it the middle of the screen, dont know the exact way it would be though.

    - - - Updated - - -

    Quote Originally Posted by BurgerLoverMx View Post
    Yeh what I'm planning to do (not exactly but yeh)

    And changing that will only work if im using that name, while using another name it wont work properly, while the name changer always keeps the name centered.
    check out the name changer then

    its a small rectangle/square with a transparent background (im assuming) so its placed in the centered of the rectangle/square

    can try making it the middle of the screen, dont know the exact way it would be though.

     








  5. #5
    Extain's Avatar
    Join Date
    Feb 2015
    Gender
    male
    Posts
    139
    Reputation
    10
    Thanks
    13
    Quote Originally Posted by BurgerLoverMx View Post
    Yeh what I'm planning to do (not exactly but yeh)

    And changing that will only work if im using that name, while using another name it wont work properly, while the name changer always keeps the name centered.
    you can get the width of the text and scale it accordingly
    Last edited by Extain; 11-02-2016 at 07:47 PM. Reason: kept 404'ing me so it posted it more than once

  6. #6
    Riigged's Avatar
    Join Date
    Jan 2013
    Gender
    male
    Location
    no
    Posts
    3,846
    Reputation
    401
    Thanks
    10,254
    My Mood
    Devilish
    Quote Originally Posted by Extain View Post
    you can get the width of the text and scale it accordingly
    I completely forgot about that, that is actually how I center my text that says "Special Deals" on my Packages screen.
    Code:
    this.TitleText.x = ((800 / 2) - (this.TitleText.width / 2));
    Last edited by Riigged; 11-02-2016 at 07:48 PM.

     








  7. #7
    BurgerLoverMx's Avatar
    Join Date
    Jan 2014
    Gender
    male
    Location
    Québec
    Posts
    411
    Reputation
    23
    Thanks
    843
    My Mood
    Relaxed
    Quote Originally Posted by Extain View Post
    you can get the width of the text and scale it accordingly
    Thats what I actually tried doing at first lol. Is there a way to make it calculate charecters instead? I tried making an if (_arg_1.length > 6) {
    blah blah blah
    }
    But it never worked properly :/

  8. #8
    Riigged's Avatar
    Join Date
    Jan 2013
    Gender
    male
    Location
    no
    Posts
    3,846
    Reputation
    401
    Thanks
    10,254
    My Mood
    Devilish
    Quote Originally Posted by BurgerLoverMx View Post
    Thats what I actually tried doing at first lol. Is there a way to make it calculate charecters instead? I tried making an if (_arg_1.length > 6) {
    blah blah blah
    }
    But it never worked properly :/
    Look above what I posted, just change TitleText to whatever the variable name for the username is and all should work fine.
    Last edited by Ahlwong; 11-11-2016 at 12:39 PM.

     








  9. #9
    Chairlegz's Avatar
    Join Date
    May 2015
    Gender
    male
    Posts
    5
    Reputation
    10
    Thanks
    0
    Quote Originally Posted by Riigged View Post
    Look above what I posted, just change TitleText to whatever the variable name for the username is and all should work fine.

    - - - Updated - - -


    Look above what I posted, just change TitleText to whatever the variable name for the username is and all should work fine.

    - - - Updated - - -


    Look above what I posted, just change TitleText to whatever the variable name for the username is and all should work fine.

    - - - Updated - - -


    Look above what I posted, just change TitleText to whatever the variable name for the username is and all should work fine.

    - - - Updated - - -


    Look above what I posted, just change TitleText to whatever the variable name for the username is and all should work fine.

    - - - Updated - - -


    Look above what I posted, just change TitleText to whatever the variable name for the username is and all should work fine.

    - - - Updated - - -


    Look above what I posted, just change TitleText to whatever the variable name for the username is and all should work fine.

    - - - Updated - - -


    Look above what I posted, just change TitleText to whatever the variable name for the username is and all should work fine.
    Look above what I posted, just change TitleText to whatever the variable name for the username is and all should work fine.

    - - - Updated - - -

    Quote Originally Posted by Riigged View Post
    Look above what I posted, just change TitleText to whatever the variable name for the username is and all should work fine.

    - - - Updated - - -


    Look above what I posted, just change TitleText to whatever the variable name for the username is and all should work fine.

    - - - Updated - - -


    Look above what I posted, just change TitleText to whatever the variable name for the username is and all should work fine.

    - - - Updated - - -


    Look above what I posted, just change TitleText to whatever the variable name for the username is and all should work fine.

    - - - Updated - - -


    Look above what I posted, just change TitleText to whatever the variable name for the username is and all should work fine.

    - - - Updated - - -


    Look above what I posted, just change TitleText to whatever the variable name for the username is and all should work fine.

    - - - Updated - - -


    Look above what I posted, just change TitleText to whatever the variable name for the username is and all should work fine.

    - - - Updated - - -


    Look above what I posted, just change TitleText to whatever the variable name for the username is and all should work fine.
    Look above what I posted, just change TitleText to whatever the variable name for the username is and all should work fine.

  10. #10
    BurgerLoverMx's Avatar
    Join Date
    Jan 2014
    Gender
    male
    Location
    Québec
    Posts
    411
    Reputation
    23
    Thanks
    843
    My Mood
    Relaxed
    Quote Originally Posted by Riigged View Post
    Look above what I posted, just change TitleText to whatever the variable name for the username is and all should work fine.
    Alright I'll try that later thanks :3
    Last edited by Ahlwong; 11-11-2016 at 12:40 PM.

  11. #11
    AzzyG's Avatar
    Join Date
    Aug 2016
    Gender
    male
    Location
    I Think The Worst Thing You Can Do About a Situation Is Nothing
    Posts
    1,732
    Reputation
    261
    Thanks
    476
    Quote Originally Posted by BurgerLoverMx View Post
    Alright I'll try that later thanks :3
    How did you move the things? What did you edit?

  12. #12
    MikeRaarupBirk's Avatar
    Join Date
    Mar 2016
    Gender
    male
    Posts
    1,583
    Reputation
    38
    Thanks
    3,775
    My Mood
    Stressed
    Quote Originally Posted by Queen View Post


    How did you move the things? What did you edit?
    HUDView.as

  13. #13
    New's Avatar
    Join Date
    Jun 2014
    Gender
    male
    Location
    Location:
    Posts
    2,605
    Reputation
    386
    Thanks
    4,708
    My Mood
    Angelic
    Quote Originally Posted by Riigged View Post
    same way you moved it to that spot its currently in, change the X coord to be a tad bit more to the right lol
    What if the text was larger than that? It will not be centered, it will extend to the right.

    Edit- nvm you fixed it l8r
    New

    Current Project:
    SimpleExaltHack

    Outdated stuff I made in the past:
    Famebot
    Clientless tradebot
    RotMG ping checker
    Zautonexus crack

  14. #14
    BurgerLoverMx's Avatar
    Join Date
    Jan 2014
    Gender
    male
    Location
    Québec
    Posts
    411
    Reputation
    23
    Thanks
    843
    My Mood
    Relaxed
    Still isn't solved :C

Similar Threads

  1. Name Change & Centered Image Title
    By McSpicy in forum Profile Edit Requests
    Replies: 1
    Last Post: 10-22-2016, 03:21 PM
  2. Name change + Title Centered
    By TheRealMakan in forum Profile Edit Requests
    Replies: 3
    Last Post: 04-18-2016, 10:09 PM
  3. Name + Image Title Center
    By Ahlwong in forum Profile Edit Requests
    Replies: 1
    Last Post: 04-02-2015, 06:57 PM
  4. New Name/Text Title Center
    By Mr.Carter in forum Profile Edit Requests
    Replies: 1
    Last Post: 11-09-2014, 05:01 PM
  5. Centered name
    By Shadeyz346 in forum General
    Replies: 22
    Last Post: 04-30-2011, 01:36 PM