public void RegisterComponent(IUIElement Element) { if (!componentStates.ContainsKey(Element.GetKey())) { componentEventStates[Element.GetKey()] = new Dictionary <string, object>() { { "isMouseInside", false }, { "scroll", 0 }, }; componentStates[Element.GetKey()] = Element.GetDefaultState(); } }