Post: Removing indexing nature from GSC mod menu base
10-11-2015, 11:20 AM #1
BullyWiiPlaza
Climbing up the ladder
(adsbygoogle = window.adsbygoogle || []).push({}); I'm using the You must login or register to view this content.. However, I don't like its indexing nature at all. I want to be able to add a main menu or menu option without incrementing its index, basically like on a list and not on an array.

I don't want:

    self MenuOption("Main Menu", 3, "Sub Menu 4", ::SubMenu, "Sub Menu 4");

self MenuOption("Sub Menu 4", 0, "Fonctions Here", ::Test);
self MenuOption("Sub Menu 4", 1, "Fonctions Here", ::Test);


I do want:

    self MenuOption("Main Menu", "Sub Menu 4", ::SubMenu, "Sub Menu 4");

self MenuOption("Sub Menu 4", "Fonctions Here", ::Test);
self MenuOption("Sub Menu 4", "Fonctions Here", ::Test);


For your convenience, here is the function that needs to be modified from...

    MenuOption(Menu, Index, Texte, Function, Input)
{
self.Menu.System["MenuTexte"][Menu][Index] = Texte;
self.Menu.System["MenuFunction"][Menu][Index] = Function;
self.Menu.System["MenuInput"][Menu][Index] = Input;
}


... to
    MenuOption(Menu, Texte, Function, Input)
{
// Code here
}


Indexes are bad since they make it more tedious to restructure the menu. Thank you Smile
(adsbygoogle = window.adsbygoogle || []).push({});
10-11-2015, 08:50 PM #2
HiddenHour
I defeated!
Originally posted by BullyWiiPlaza View Post
I'm using the You must login or register to view this content.. However, I don't like its indexing nature at all. I want to be able to add a main menu or menu option without incrementing its index, basically like on a list and not on an array.

I don't want:

    self MenuOption("Main Menu", 3, "Sub Menu 4", ::SubMenu, "Sub Menu 4");

self MenuOption("Sub Menu 4", 0, "Fonctions Here", ::Test);
self MenuOption("Sub Menu 4", 1, "Fonctions Here", ::Test);


I do want:

    self MenuOption("Main Menu", "Sub Menu 4", ::SubMenu, "Sub Menu 4");

self MenuOption("Sub Menu 4", "Fonctions Here", ::Test);
self MenuOption("Sub Menu 4", "Fonctions Here", ::Test);


For your convenience, here is the function that needs to be modified from...

    MenuOption(Menu, Index, Texte, Function, Input)
{
self.Menu.System["MenuTexte"][Menu][Index] = Texte;
self.Menu.System["MenuFunction"][Menu][Index] = Function;
self.Menu.System["MenuInput"][Menu][Index] = Input;
}


... to
    MenuOption(Menu, Texte, Function, Input)
{
// Code here
}


Indexes are bad since they make it more tedious to restructure the menu. Thank you Smile


Look at how You must login or register to view this content. does it.
10-12-2015, 12:45 AM #3
BullyWiiPlaza
Climbing up the ladder
Originally posted by TheHiddenHour View Post
Look at how You must login or register to view this content. does it.

I tried but I couldn't transform it properly so the menu entries were invisible/messed up.
10-12-2015, 12:50 AM #4
HiddenHour
I defeated!
Originally posted by BullyWiiPlaza View Post
I tried but I couldn't transform it properly so the menu entries were invisible/messed up.


Well since you already tried to implement it, hopefully someone else can come in and explain it a little more thoroughly.

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo