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

    1. Red Dead Redemption 2

      1. PC
      2. Gameplay
      3. Missions
      4. Help & Support
    2. Red Dead Online

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

      1. Recruitment
    2. Events

    1. GTA Online

      1. DLC
      2. Find Lobbies & Players
      3. Guides & Strategies
      4. Vehicles
      5. Content Creator
      6. Help & Support
      7. The Diamond Casino Heist
    2. Grand Theft Auto Series

    3. GTA 6

    4. GTA V

      1. PC
      2. Guides & Strategies
      3. Help & Support
    5. GTA IV

      1. Episodes from Liberty City
      2. Multiplayer
      3. Guides & Strategies
      4. Help & Support
      5. GTA IV Mods
    6. GTA Chinatown Wars

    7. GTA Vice City Stories

    8. GTA Liberty City Stories

    9. GTA San Andreas

      1. Guides & Strategies
      2. Help & Support
      3. GTA SA Mods
    10. GTA Vice City

      1. Guides & Strategies
      2. Help & Support
      3. GTA VC Mods
    11. GTA III

      1. Guides & Strategies
      2. Help & Support
      3. GTA III Mods
    12. Top Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    13. Wiki

      1. Merchandising
    1. GTA Modding

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Mod Showroom

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

      1. DYOM
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Red Dead Redemption

    2. Rockstar Games

    1. Off-Topic

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

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

    2. Forum Support

    3. Site Suggestions

Sign in to follow this  
vizzminzi

Alander Blade native trainer menu design HELP

Recommended Posts

vizzminzi

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

Share this post


Link to post
Share on other sites
pillow

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

Share this post


Link to post
Share on other sites
m_boy

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

Share this post


Link to post
Share on other sites
vizzminzi

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

Share this post


Link to post
Share on other sites
vizzminzi

 

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

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • 2 Users Currently Viewing
    0 members, 0 Anonymous, 2 Guests

×
×
  • Create New...

Important Information

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