#pragma once class IToggleable{ friend class Crawler; public: inline std::vectorGetToggleGroup(){ return toggleGroup; } inline void Select(){ for(IToggleable*item:toggleGroup){ item->selected=false; } selected=true; } inline bool IsSelected(){ return selected; } inline void SetToggleGroup(){ if(toggleGroupInitialized){ std::cout<<"WARNING! Toggle group for this component was set twice for some reason! THIS SHOULD NOT BE HAPPENING!"<toggleGroup){ this->toggleGroup=toggleGroup; SetToggleGroup(); } inline IToggleable(){ uninitializedToggleGroupItems.push_back(this); if("debug_toggleable_items"_I){ std::cout<<"\tInitialized Toggle Item Ptr: 0x"<toggleGroup; private: bool selected=false; bool toggleGroupInitialized=false; inline static std::vectoruninitializedToggleGroupItems; };