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:
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user