Post: Dynamic Background that auto-resizes with the OptionText-size
06-10-2016, 07:47 AM #1
(adsbygoogle = window.adsbygoogle || []).push({}); Dynamic Background that auto-resizes with the OptionText-size
How Would i Go About Doing This?
(adsbygoogle = window.adsbygoogle || []).push({});
06-10-2016, 09:30 AM #2
anthonything
Space Ninja
Originally posted by MossyWave View Post
Dynamic Background that auto-resizes with the OptionText-size
How Would i Go About Doing This?


Get the text string, then use strtok( longesttext, "").size and multiply by the fontscale.
06-10-2016, 10:13 AM #3
Here are two example for "if you want to change the menu base size according to the amount of text you have in it" that would work for sharks menu base for example
You would put these in SubMenu()

    //Menu Dynamic Width
menusizewidth = 0;
menuheight = //Original Height Of Your Menu Background
for(i = 0; i < self.menu.menuopt[self.curmenu].size; i++)//For Every Options In The Menu
{
if(menuwidth < Int(self.menu.menuopt[self.curmenu][i].size))//Gets Largest line Size In Current Menu
menuwidth = Int(self.menu.menuopt[self.curmenu][i].size);
}
self.menubackground ScaleOverTime(0.2, menuwidth * 2, menuheight);
//*2 Is How Much To Increase The Menu Width For Each Character In The Longest Line

//Menu Dynamic Height
menusizewidth = //Original Width Of Your Menu Background
menuheight = 0;
for(i = 0; i < self.menu.menuopt[self.curmenu].size; i++)//For Every Options In The Menu
menuheight ++;
self.menubackground ScaleOverTime(0.2, menuwidth, menuheight * 10);
//*10 Is How Much To Increase The Menu Height For Each Option You Have


Those are individual so you can only use one or the either there, you can do a mixture of both
by doing like so:

    //Menu Dynamic Size
menusizewidth = 0;
menuheight = 0;
for(i = 0; i < self.menu.menuopt[self.curmenu].size; i++)//For Every Options In The Menu
{
if(menuwidth < Int(self.menu.menuopt[self.curmenu][i].size))//Gets Largest line Size In Current Menu
menuwidth = Int(self.menu.menuopt[self.curmenu][i].size);
menuheight ++;
}
self.menubackground ScaleOverTime(0.2, menuwidth * 2, menuheight * 10);
//*2 Is How Much To Increase The Menu Width For Each Character In The Longest Line
//*10 Is How Much To Increase The Menu Height For Each Option You Have

The following 2 users say thank you to OfficialCoolJay for this useful post:

BlueeHasSwag, FRINZ
06-10-2016, 10:29 AM #4
anthonything
Space Ninja
You didn't see anything here.

The following user thanked anthonything for this useful post:

OfficialCoolJay
06-10-2016, 11:29 AM #5
BoatyMcBoatFace
Are you high?
Originally posted by MossyWave View Post
Dynamic Background that auto-resizes with the OptionText-size
How Would i Go About Doing This?


Im sure stonedyoda was asking this question couple weeks ago


Edit: You must login or register to view this content.
06-10-2016, 03:35 PM #6
Patrick
League Champion
Originally posted by Liammmm View Post
Im sure stonedyoda was asking this question couple weeks ago


Edit: You must login or register to view this content.


Im sure you didnt do it for him lol, Because he came to me and i done it for him, if you are using sharks base which i assume you are just do this in your submenu.
self.BACKGROUNDSHADER scaleOverTime(.1,200,((self.menu.menuopt[self.menu.currentmenu].size*21)+50));

The following user thanked Patrick for this useful post:

BoatyMcBoatFace
06-10-2016, 03:36 PM #7
BoatyMcBoatFace
Are you high?
Originally posted by 32085
Im sure you didnt do it for him lol, Because he came to me and i done it for him, if you are using sharks base which i assume you are just do this in your submenu.
self.BACKGROUNDSHADER scaleOverTime(.1,200,((self.menu.menuopt[self.menu.currentmenu].size*21)+50));


Why would I know what to do Dave

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo