Setup framework for scrollbar and buttons in ScrollableWindowComponent. Fixed a bug where disabled buttons would not increment selection check loop. CreateMenu function instead of creating pointer and returning, so windows can add stuff to menus easily.

This commit is contained in:
2023-10-15 12:58:39 -05:00
parent b08002e61b
commit ff3f4ba1c0
13 changed files with 86 additions and 48 deletions
+2 -3
View File
@@ -1,8 +1,8 @@
#include "Crawler.h"
#include "MenuComponent.h"
Menu*Menu::InitializeTestMenu(){
Menu*testMenu=new Menu(CENTERED,{24*8,24*6});
void Menu::InitializeTestMenu(){
Menu*testMenu=CreateMenu(TEST,CENTERED,{24*8,24*6});
MenuFunc quitWindow=[](MenuFuncData data){
data.menu.stack.clear();
@@ -22,5 +22,4 @@ Menu*Menu::InitializeTestMenu(){
testMenu->AddComponent("Open SubMenu",new MenuComponent(TEST,{{24*2,24*4.5},{24*4,24*1}},"Open Another\n Menu",TEST_2,doNothing));
return testMenu;
}