P
Pelican
Guest
GM Version: Game Maker Studio
Target Platform: Windows
Download: http://www.host-a.net/u/Pelican/Scrolling_Menu.gmz
Links: None
Summary
Creates a scrolling menu, allowing you to have more menu options than just the amount of space you have on your screen. The example does this for a menu with three rows, and six options.
Tutorial
The code is explained thoroughly in the download itself, however I’ll briefly explain it here:
Variables:
menuChoices = menu choice names (choice[0] = 1st option, choice[1] = 2nd etc…)
choice = index of menu choices
topChoice = index of menu choice shown at the top of the menu
selectorPos = position of menu selector
________
This is generally what the program does:
When scrolling up:
When scrolling down:
Target Platform: Windows
Download: http://www.host-a.net/u/Pelican/Scrolling_Menu.gmz
Links: None
Summary
Creates a scrolling menu, allowing you to have more menu options than just the amount of space you have on your screen. The example does this for a menu with three rows, and six options.
Tutorial
The code is explained thoroughly in the download itself, however I’ll briefly explain it here:
Variables:
menuChoices = menu choice names (choice[0] = 1st option, choice[1] = 2nd etc…)
choice = index of menu choices
topChoice = index of menu choice shown at the top of the menu
selectorPos = position of menu selector
________
This is generally what the program does:
When scrolling up:
Code:
If(selectorPos>0){
selectorPos--;
}
else{
if(topChoice>0){
topChoice--;
}
}
Code:
If(selectorPos<array_length_1d(menuChoices)){
selectorPos++;
}
else{
if(topChoice<array_length_1d(menuChoices)-3){
topChoice++;
}
}