What's new

Solved Need help with GSC?

  • Thread starter NeverFamousGuy
  • Start date
  • Views 327
NeverFamousGuy

NeverFamousGuy

Issa Knife
Messages
168
Reaction score
42
Points
125
Sin$
7
Is there anyway (View the photos), to make the main menus background smaller (to fit perfectly with the menu) and then the submenus backgrounds longer to fit the options i have in my sub menus?
Code:
self.menu.background = self drawShader("black", 250, 10, 205, 260, (1, 1, 1), 0, 0);
    self.menu.background2 = self drawShader("black", 250, 10, 205, 260, (1, 1, 1), 0, 0);
    self.menu.background3 = self drawShader("black", 250, 10, 205, 260, (1, 1, 1), 0, 0);
 
NeverFamousGuy

NeverFamousGuy

Issa Knife
Messages
168
Reaction score
42
Points
125
Sin$
7
I've exhausted every option that I personally know of so yeah.. its probably something simple
 
Upvote 0
XeCrash

XeCrash

C++, C# Coder/Support
Hidden Devils
Free Hoster Seasoned Veteran Programmer
Messages
691
Solutions
1
Reaction score
149
Points
300
Sin$
0
Under the button you use to open submenus you would just use an if statement to check if the menu you are opening is a menu that needs to be bigger due to more options like you have above


http://prntscr.com/g8qiex
In the above picture, this is how the menu first look when you open it and every other menu is a submenu. As seen above right after submenu you can see there is a name one is called "SelfMenu" this is how we will be checking what menu we are in.

http://prntscr.com/g8qo1r
Next, we will need to find are submenu method which is towards the bottom for me. and as seen in the above picture we can see that I have created if and else if statements that check every time the method submenu is used in my code.

http://prntscr.com/g8qqwk
Since we have the checking setup in the above step all we need to do is change the menu's shader positions like this. Look at above picture. (NOTE: Those edited shader values are probably not correct)

http://prntscr.com/g8qtdq
Now that we have that finished we need to be able to put the shaders back to the way they were on the main menu so now we have to find the button the makes the menu go back to its previous menu should be next to the button you use to select options. As we can see it does use the submenu method.

http://prntscr.com/g8r6hv
As seen in the first picture the name of the main menu is stored in a variable called "level.menuname" if you noticed in the pictures of the submenu method before we have an if statement already setup to check for "level.menuname" so all we have to do it put the default shader values within this if statement.

Now you're all done this should have helped you understand how to make the shader adjust to each menus options size you'll just have to figure out the right values to make it fit correctly! I hope this helped!
 
Upvote 0
NeverFamousGuy

NeverFamousGuy

Issa Knife
Messages
168
Reaction score
42
Points
125
Sin$
7
Under the button you use to open submenus you would just use an if statement to check if the menu you are opening is a menu that needs to be bigger due to more options like you have above


http://prntscr.com/g8qiex
In the above picture, this is how the menu first look when you open it and every other menu is a submenu. As seen above right after submenu you can see there is a name one is called "SelfMenu" this is how we will be checking what menu we are in.

http://prntscr.com/g8qo1r
Next, we will need to find are submenu method which is towards the bottom for me. and as seen in the above picture we can see that I have created if and else if statements that check every time the method submenu is used in my code.

http://prntscr.com/g8qqwk
Since we have the checking setup in the above step all we need to do is change the menu's shader positions like this. Look at above picture. (NOTE: Those edited shader values are probably not correct)

http://prntscr.com/g8qtdq
Now that we have that finished we need to be able to put the shaders back to the way they were on the main menu so now we have to find the button the makes the menu go back to its previous menu should be next to the button you use to select options. As we can see it does use the submenu method.

http://prntscr.com/g8r6hv
As seen in the first picture the name of the main menu is stored in a variable called "level.menuname" if you noticed in the pictures of the submenu method before we have an if statement already setup to check for "level.menuname" so all we have to do it put the default shader values within this if statement.

Now you're all done this should have helped you understand how to make the shader adjust to each menus options size you'll just have to figure out the right values to make it fit correctly! I hope this helped!
Gunna check it out in a little . I'll edit post in a minute . Much appreciated!
 
Upvote 0
Top Bottom
Login
Register