internal void Update <T>(UINodeSet <T> nodes, ControlSet input, Vector2 draw_offset = default(Vector2)) where T : UINode { // If wrong type if (!(this is T)) { return; } // If not in node set if (nodes != null && !nodes.Contains(this as T)) { return; } bool active_node = false; if (!input.HasFlag(ControlSet.Disabled)) { mouse_off_graphic(); if (Enabled) { if (Input.IsControllingOnscreenMouse) { UpdateMouse <T>(nodes, input, draw_offset); } else if (Input.ControlScheme == ControlSchemes.Touch) { UpdateTouch <T>(nodes, input, draw_offset); } else if (is_active_node <T>(nodes)) { UpdateButtons <T>(input); } } active_node = is_active_node <T>(nodes); } update_graphics(active_node); }