void FillLists() { llLeft.SuspendRedraw = true; llRight.SuspendRedraw = true; llLeft.ClearItems(); llRight.ClearItems(); int num = _myPetPowers.Count - 1; for (int index = 0; index <= num; ++index) { ListLabelV2.LLItemState iState = !MidsContext.Character.CurrentBuild.PowerUsed(_myPetPowers[index]) ? (!(_myPetPowers[index].PowerType != Enums.ePowerType.Click | _myPetPowers[index].ClickBuff) ? (!_myPetPowers[index].SubIsAltColour ? ListLabelV2.LLItemState.Disabled : ListLabelV2.LLItemState.Invalid) : ListLabelV2.LLItemState.Enabled) : ListLabelV2.LLItemState.Selected; ListLabelV2.ListLabelItemV2 iItem = !MidsContext.Config.RtFont.PairedBold ? new ListLabelV2.ListLabelItemV2(_myPetPowers[index].DisplayName, iState) : new ListLabelV2.ListLabelItemV2(_myPetPowers[index].DisplayName, iState, -1, -1, -1, "", ListLabelV2.LLFontFlags.Bold); if (index >= _myPetPowers.Count / 2.0) { llRight.AddItem(iItem); } else { llLeft.AddItem(iItem); } } llLeft.SuspendRedraw = false; llRight.SuspendRedraw = false; llLeft.Refresh(); llRight.Refresh(); }
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); }