static void UpdateLlColours(ref ListLabelV2 iList) { iList.UpdateTextColors(ListLabelV2.LLItemState.Enabled, MidsContext.Config.RtFont.ColorPowerAvailable); iList.UpdateTextColors(ListLabelV2.LLItemState.Disabled, MidsContext.Config.RtFont.ColorPowerDisabled); iList.UpdateTextColors(ListLabelV2.LLItemState.Selected, MidsContext.Config.RtFont.ColorPowerTaken); iList.UpdateTextColors(ListLabelV2.LLItemState.SelectedDisabled, MidsContext.Config.RtFont.ColorPowerTakenDark); iList.UpdateTextColors(ListLabelV2.LLItemState.Invalid, Color.FromArgb(byte.MaxValue, 0, 0)); iList.HoverColor = MidsContext.Config.RtFont.ColorPowerHighlight; iList.Font = new Font(iList.Font.FontFamily, MidsContext.Config.RtFont.PairedBase, FontStyle.Bold, GraphicsUnit.Point); }
public void updateColours() { ConfigData.FontSettings iFs = new ConfigData.FontSettings(); csHero.BackColor = myFS.ColorBackgroundHero; csVillain.BackColor = myFS.ColorBackgroundVillain; csText.BackColor = myFS.ColorText; csInv.BackColor = myFS.ColorInvention; csInvInv.BackColor = myFS.ColorInventionInv; csFade.BackColor = myFS.ColorFaded; csEnh.BackColor = myFS.ColorEnhancement; csAlert.BackColor = myFS.ColorWarning; csValue.BackColor = myFS.ColorPlName; csSpecial.BackColor = myFS.ColorPlSpecial; iFs.Assign(MidsContext.Config.RtFont); MidsContext.Config.RtFont.Assign(myFS); rtPreview.BackColor = myFS.ColorBackgroundHero; MidsContext.Config.RtFont.ColorBackgroundHero = myFS.ColorPlName; MidsContext.Config.RtFont.ColorBackgroundVillain = myFS.ColorPlSpecial; rtPreview.Rtf = RTF.StartRTF() + RTF.Color(RTF.ElementID.Invention) + RTF.Underline("Invention Name") + RTF.Crlf() + RTF.Color(RTF.ElementID.Enhancement) + RTF.Italic("Enhancement Text") + RTF.Color(RTF.ElementID.Warning) + " (Alert)" + RTF.Crlf() + RTF.Color(RTF.ElementID.Text) + " Regular Text" + RTF.Crlf() + RTF.Color(RTF.ElementID.Text) + " Regular Text" + RTF.Crlf() + RTF.Color(RTF.ElementID.Faded) + " Faded Text" + RTF.Crlf() + RTF.Crlf() + RTF.Color(RTF.ElementID.BackgroundHero) + RTF.Bold("Value Name: ") + RTF.Color(RTF.ElementID.Text) + "Normal Text" + RTF.Crlf() + RTF.Color(RTF.ElementID.BackgroundHero) + RTF.Bold("Value Name: ") + RTF.Color(RTF.ElementID.BackgroundVillain) + "Special Case" + RTF.Crlf() + RTF.Color(RTF.ElementID.BackgroundHero) + RTF.Bold("Value Name: ") + RTF.Color(RTF.ElementID.Enhancement) + "Enahnced value" + RTF.Crlf() + RTF.Color(RTF.ElementID.BackgroundHero) + RTF.Bold("Value Name: ") + RTF.Color(RTF.ElementID.Invention) + "Invention Effect" + RTF.Crlf() + RTF.EndRTF(); Listlabel1.SuspendRedraw = true; Listlabel1.ClearItems(); Listlabel1.AddItem(new ListLabelV2.ListLabelItemV2("Available Power", ListLabelV2.LLItemState.Enabled)); Listlabel1.AddItem(new ListLabelV2.ListLabelItemV2("Taken Power", ListLabelV2.LLItemState.Selected)); Listlabel1.AddItem(new ListLabelV2.ListLabelItemV2("Taken Power (Dark)", ListLabelV2.LLItemState.SelectedDisabled)); Listlabel1.AddItem(new ListLabelV2.ListLabelItemV2("Unavailable Power", ListLabelV2.LLItemState.Disabled)); Listlabel1.AddItem(new ListLabelV2.ListLabelItemV2("Highlight Colour", ListLabelV2.LLItemState.Enabled)); Listlabel1.HoverColor = myFS.ColorPowerHighlight; Listlabel1.UpdateTextColors(ListLabelV2.LLItemState.Enabled, myFS.ColorPowerAvailable); Listlabel1.UpdateTextColors(ListLabelV2.LLItemState.Selected, myFS.ColorPowerTaken); Listlabel1.UpdateTextColors(ListLabelV2.LLItemState.SelectedDisabled, myFS.ColorPowerTakenDark); Listlabel1.UpdateTextColors(ListLabelV2.LLItemState.Disabled, myFS.ColorPowerDisabled); Listlabel1.Font = new Font(Listlabel1.Font.FontFamily, MidsContext.Config.RtFont.PairedBase); int num = Listlabel1.Items.Length - 1; for (int index = 0; index <= num; ++index) { Listlabel1.Items[index].Bold = MidsContext.Config.RtFont.PairedBold; } Listlabel1.SuspendRedraw = false; Listlabel1.Refresh(); MidsContext.Config.RtFont.Assign(iFs); }