public void Draw(IBackgroundable item, IScreen screen) { //draw the rect! if (item.HasBackground) { DrawBackground(item, screen); } //draw the outline! if (item.HasOutline) { DrawOutline(item, screen); } }
protected void DrawOutline(IBackgroundable item, IScreen screen) { var color = StyleSheet.NeutralOutlineColor; var highlightable = item as IHighlightable; if (null != highlightable && highlightable.IsHighlighted) { color = StyleSheet.HighlightedOutlineColor; } var transitionable = item as ITransitionable; if (null != transitionable) { screen.ScreenManager.DrawHelper.DrawOutline(color, item.Rect, screen.Transition, transitionable.TransitionObject); } else { screen.ScreenManager.DrawHelper.DrawOutline(color, item.Rect); } }