public void SetBlockTypes(List <ScheduleBlockType> blockTypes) { ScheduleGroup scheduleGroup = Db.Get().ScheduleGroups.FindGroupForScheduleTypes(blockTypes); if (scheduleGroup != null && paintStyles.ContainsKey(scheduleGroup.Id)) { image.colorStyleSetting = paintStyles[scheduleGroup.Id]; image.ApplyColorStyleSetting(); toolTip.SetSimpleTooltip(scheduleGroup.GetTooltip()); } else { toolTip.SetSimpleTooltip("UNKNOWN"); } }
/// <summary> /// Sets up the background image to have the right sprite and slice type. /// </summary> /// <param name="bgImage">The image that forms the button background.</param> internal static void SetupButtonBackground(KImage bgImage) { bgImage.ApplyColorStyleSetting(); bgImage.sprite = PUITuning.Images.ButtonBorder; bgImage.type = Image.Type.Sliced; }