Quantcast
Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums!

    1. GTANet.com

    1. GTA Online

      1. The Cayo Perico Heist
      2. Find Lobbies & Players
      3. Guides & Strategies
      4. Vehicles
      5. Content Creator
      6. Help & Support
    2. Red Dead Online

      1. Frontier Pursuits
      2. Find Lobbies & Outlaws
      3. Help & Support
    3. Crews

    1. Red Dead Redemption 2

      1. PC
      2. Help & Support
    2. Red Dead Redemption

    1. Grand Theft Auto Series

    2. GTA VI

      1. St. Andrews Cathedral
    3. GTA V

      1. Guides & Strategies
      2. Help & Support
    4. GTA IV

      1. The Lost and Damned
      2. The Ballad of Gay Tony
      3. Guides & Strategies
      4. Help & Support
    5. GTA San Andreas

      1. Guides & Strategies
      2. Help & Support
    6. GTA Vice City

      1. Guides & Strategies
      2. Help & Support
    7. GTA III

      1. Guides & Strategies
      2. Help & Support
    8. Portable Games

      1. GTA Chinatown Wars
      2. GTA Vice City Stories
      3. GTA Liberty City Stories
    9. Top-Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    1. GTA Mods

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Red Dead Mods

      1. Documentation
    3. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    4. Featured Mods

      1. Design Your Own Mission
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Rockstar Games

    2. Rockstar Collectors

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Movies & TV
      5. Music
      6. Sports
      7. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    3. Gangs

    1. Announcements

    2. Support

    3. Suggestions

Alander Blade native trainer menu design HELP


vizzminzi

Recommended Posts

ENLYMv5.png

 

This is how my menu looks. i want to remove that massive gap between buttons, how do i do that?

 

this is what i did so far.

void draw_rect(float A_0, float A_1, float A_2, float A_3, int A_4, int A_5, int A_6, int A_7){    GRAPHICS::DRAW_RECT((A_0 + (A_2 * 0.5f)), (A_1 + (A_3 * 0.2f)), A_2, A_3, A_4, A_5, A_6, A_7);}void draw_menu_line(std::string caption, float lineWidth, float lineHeight, float lineTop, float lineLeft, float textLeft, bool active, bool title, bool rescaleText = true){    // default values    int text_col[4] = { 0, 209, 255, 255 },/// 0, 209, 255        rect_col[4] = { 188, 143, 210, 175 };//188, 143, 210    float text_scale = 0.25;//35    int font = 0;    // correcting values for active line    if (active)    {//  RGB decimens        text_col[0] = 177;        text_col[1] = 255;        text_col[2] = 255;        rect_col[0] = 91.114;        rect_col[1] = -48.083;        rect_col[2] = 19.169;        if (rescaleText) text_scale = 0.30;//40    }    if (title)    {//        rect_col[0] = 156;//156, 88, 188        rect_col[1] = 88;        rect_col[2] = 188;        if (rescaleText) text_scale = 0.40;//50        font = 7;    }    int screen_w, screen_h;    GRAPHICS::GET_SCREEN_RESOLUTION(&screen_w, &screen_h);    textLeft += lineLeft;    float lineWidthScaled = lineWidth / (float)screen_w; // line width    float lineTopScaled = lineTop / (float)screen_h; // line top offset    float textLeftScaled = textLeft / (float)screen_w; // text left offset    float lineHeightScaled = lineHeight / (float)screen_h; // line height    float lineLeftScaled = lineLeft / (float)screen_w;    // this is how it's done in original scripts    // text upper part    UI::SET_TEXT_FONT(font);    UI::SET_TEXT_SCALE(0.0, text_scale);    UI::SET_TEXT_COLOUR(text_col[0], text_col[1], text_col[2], text_col[3]);    UI::SET_TEXT_CENTRE(0);    UI::SET_TEXT_DROPSHADOW(0, 0, 0, 0, 0);    UI::SET_TEXT_EDGE(0, 0, 0, 0, 0);    UI::_SET_TEXT_ENTRY("STRING");    UI::_ADD_TEXT_COMPONENT_STRING((LPSTR)caption.c_str());    UI::_DRAW_TEXT(textLeftScaled, (((lineTopScaled + 0.00278f) + lineHeightScaled) - 0.015f));//5f    // text lower part    UI::SET_TEXT_FONT(font);    UI::SET_TEXT_SCALE(0.0, text_scale);    UI::SET_TEXT_COLOUR(text_col[0], text_col[1], text_col[2], text_col[3]);    UI::SET_TEXT_CENTRE(0);    UI::SET_TEXT_DROPSHADOW(0, 0, 0, 0, 0);    UI::SET_TEXT_EDGE(0, 0, 0, 0, 0);    UI::_SET_TEXT_GXT_ENTRY("STRING");    UI::_ADD_TEXT_COMPONENT_STRING((LPSTR)caption.c_str());    int num25 = UI::_0x9040DFB09BE75706(textLeftScaled, (((lineTopScaled + 0.00178f) + lineHeightScaled) - 0.015f));// 0.00178f    // rect    draw_rect(lineLeftScaled, lineTopScaled + (0.00278f),        lineWidthScaled, ((((float)(num25)* UI::_0xDB88A37483346780(text_scale, 0)) + (lineHeightScaled * 1.0f)) + 0.010f),//2 , +5f        rect_col[0], rect_col[1], rect_col[2], rect_col[3]);    }

Also how would i change the location of the menu?

 

thanks :D

Link to post
Share on other sites

Here nothing needs to be changed. Change is in the process of creating a menu (see comments):

for (int i = 0; i < lineCount; i++)if (i != activeLineIndexMain)draw_menu_line(lineCaption[i], lineWidth, 5.0, 60.0 + i * 20.0, 0.0, 9.0, false, false); // 0.0 - lineLeft, 9.0 - textLeftdraw_menu_line(lineCaption[activeLineIndexMain], lineWidth + 1.0, 2.0, 57.0 + activeLineIndexMain * 20.0, 0.0, 7.0, true, false); // 0.0 - lineLeft, 7.0 - textLeft// * 20.0 - gap (default AB value - 36.0)

yAK9gO9.jpg

 

 

Edited by m_boy
  • Like 1
Link to post
Share on other sites

you mean the big space between VEHICLE && TELEPORT && WEAPONS?

yAK9gO9.jpg

 

look at the difference, there are no gaps between buttons in this one, but there is mine, i wanted to fix that

 

Here nothing needs to be changed. Change is in the process of creating a menu (see comments):

for (int i = 0; i < lineCount; i++)if (i != activeLineIndexMain)draw_menu_line(lineCaption[i], lineWidth, 5.0, 60.0 + i * 20.0, 0.0, 9.0, false, false); // 0.0 - lineLeft, 9.0 - textLeftdraw_menu_line(lineCaption[activeLineIndexMain], lineWidth + 1.0, 2.0, 57.0 + activeLineIndexMain * 20.0, 0.0, 7.0, true, false); // 0.0 - lineLeft, 7.0 - textLeft// * 20.0 - gap (default AB value - 36.0)

yAK9gO9.jpg

 

 

 

Thanks :D i will try it

Link to post
Share on other sites

 

Here nothing needs to be changed. Change is in the process of creating a menu (see comments):

for (int i = 0; i < lineCount; i++)if (i != activeLineIndexMain)draw_menu_line(lineCaption[i], lineWidth, 5.0, 60.0 + i * 20.0, 0.0, 9.0, false, false); // 0.0 - lineLeft, 9.0 - textLeftdraw_menu_line(lineCaption[activeLineIndexMain], lineWidth + 1.0, 2.0, 57.0 + activeLineIndexMain * 20.0, 0.0, 7.0, true, false); // 0.0 - lineLeft, 7.0 - textLeft// * 20.0 - gap (default AB value - 36.0)

yAK9gO9.jpg

 

 

 

Thanks dude this way of doing it is much better :D

Edited by vizzminzi
Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.