if(parentComponent.lock()->GetSubcomponentCount()>=subcomponentCount)ERR(std::format("WARNING! The subcomponent count went from {} -> {} when trying to remove the lock button for item {}! THIS SHOULD NOT BE HAPPENING!",subcomponentCount,parentComponent.lock()->GetSubcomponentCount(),name));
@ -120,7 +120,6 @@ class Menu:public IAttributable{
floatbuttonHoldTime=0;
floatbuttonHoldTime=0;
staticvi2dlastActiveMousePos;
staticvi2dlastActiveMousePos;
intcomponentCount=0;
floatcomponentSelectionIndex=0.f;
floatcomponentSelectionIndex=0.f;
//This variable is an override available to all menus that allows us to say we've clicked something, so do not handle any automatic clicking anymore of menus for this frame!
//This variable is an override available to all menus that allows us to say we've clicked something, so do not handle any automatic clicking anymore of menus for this frame!
//X (0-2), Y (0-2) for specific 9-patch tile (tiled version).
//X (0-2), Y (0-2) for specific 9-patch tile (tiled version).
staticRenderable&GetPatchPart(intx,inty);
staticRenderable&GetPatchPart(intx,inty);
voidRecalculateComponentCount();
voidSetSelection(std::string_viewbutton,constboolscroll=true,constboolreset=false);// Use the reset parameter when a window is opening up, as this will cause the window now to scroll to its previous target.
voidSetSelection(std::string_viewbutton,constboolscroll=true,constboolreset=false);// Use the reset parameter when a window is opening up, as this will cause the window now to scroll to its previous target.
voidSetSelection(std::weak_ptr<MenuComponent>button,constboolscroll=true,constboolreset=false);// Use the reset parameter when a window is opening up, as this will cause the window now to scroll to its previous target.
voidSetSelection(std::weak_ptr<MenuComponent>button,constboolscroll=true,constboolreset=false);// Use the reset parameter when a window is opening up, as this will cause the window now to scroll to its previous target.
voidSetSelection(Databutton,constboolreset=false);// Use the reset parameter when a window is opening up, as this will cause the window now to scroll to its previous target.
voidSetSelection(Databutton,constboolreset=false);// Use the reset parameter when a window is opening up, as this will cause the window now to scroll to its previous target.
@ -224,6 +222,8 @@ private:
//This triggers if we use a keyboard/controller input to try and select some off-screen menu item. We should ideally follow the menu cursor.
//This triggers if we use a keyboard/controller input to try and select some off-screen menu item. We should ideally follow the menu cursor.
if(componentSearchResults==components.end()&&subcomponentSearchResults==subcomponents.end())ERR("Could not find Component "<<std::quoted(button.lock()->GetName())<<" inside the component or subcomponent lists!");
if(componentPtr->renderInMain)ERR(std::format("WARNING! Component {} is inside a ScrollableWindowComponent but renders in main instead! Parent Component: {}",componentPtr->GetName(),GetName()));
if(componentPtr->renderInMain)ERR(std::format("WARNING! Component {} is inside a ScrollableWindowComponent but renders in main instead! Parent Component: {}",componentPtr->GetName(),GetName()));
if(componentPtr->renderInMain)ERR(std::format("WARNING! Subcomponent {} is inside a ScrollableWindowComponent but renders in main instead! Parent Component: {}",componentPtr->GetName(),GetName()));