// Token: 0x06000034 RID: 52 RVA: 0x000044F0 File Offset: 0x000026F0 public void EditColumn() { foreach (object obj in this.ListView.SelectedIndices) { int index = (int)obj; ColumnElement columnElement = this.Config.Columns.ColumnList[index]; DebugTools.Print("Open dialog box: Edit overlay column (DialogBoxOverlayColumn)"); using (DialogBoxOverlayColumn dialogBoxOverlayColumn = new DialogBoxOverlayColumn()) { dialogBoxOverlayColumn.Text = "Edit Column"; dialogBoxOverlayColumn.CheckboxColumnEnabled.Checked = columnElement.Enabled; dialogBoxOverlayColumn.NumericUpDownColumnWidth.Value = columnElement.Width; dialogBoxOverlayColumn.ComboBoxColumnData.SelectedIndex = (int)columnElement.Data; dialogBoxOverlayColumn.CheckBoxShowHeader.Checked = columnElement.ShowHeader; dialogBoxOverlayColumn.LabelHeaderColourPreview.BackColor = columnElement.HeaderColour; dialogBoxOverlayColumn.LabelDataColourPreview.BackColor = columnElement.DataColour; dialogBoxOverlayColumn.ButtonColumnConfirm.Text = "Confirm"; if (dialogBoxOverlayColumn.ShowDialog() == DialogResult.OK) { DebugTools.Print("Option change: Edit overlay column"); columnElement.Enabled = dialogBoxOverlayColumn.CheckboxColumnEnabled.Checked; columnElement.Width = (int)dialogBoxOverlayColumn.NumericUpDownColumnWidth.Value; columnElement.Data = (DataSourceEnum)dialogBoxOverlayColumn.ComboBoxColumnData.SelectedIndex; columnElement.ShowHeader = dialogBoxOverlayColumn.CheckBoxShowHeader.Checked; columnElement.HeaderColour = dialogBoxOverlayColumn.LabelHeaderColourPreview.BackColor; columnElement.DataColour = dialogBoxOverlayColumn.LabelDataColourPreview.BackColor; GameMemory.OverlayUpdateConfig(); this.UpdateStatic(); } } } }
// Token: 0x0600002C RID: 44 RVA: 0x000041DC File Offset: 0x000023DC private bool ColumnSwap(int Position1, int Position2) { if (Position2 < Position1) { int num = Position1; Position1 = Position2; Position2 = num; } if (Position1 >= 0 & Position2 < this.ListView.Items.Count) { ColumnElement element = this.Config.Columns.ColumnList[Position1]; ColumnElement element2 = this.Config.Columns.ColumnList[Position2]; this.Config.Columns.ColumnList.RemoveAt(Position1); this.Config.Columns.ColumnList.RemoveAt(Position2 - 1); this.Config.Columns.ColumnList.AddAt(Position1, element2); this.Config.Columns.ColumnList.AddAt(Position2, element); return(true); } return(false); }
// Token: 0x060000C7 RID: 199 RVA: 0x000155A0 File Offset: 0x000137A0 public static void PackageOverlayConfig(OverlayElement OverlayConfig) { DebugTools.Write("Game Memory: Packaging overlay configuration... "); List <TableStruct> list = new List <TableStruct>(); List <ColumnStruct> list2 = new List <ColumnStruct>(); List <int> list3 = new List <int>(); if (OverlayConfig.Columns.Additional.LobbyInfo.Basic.Id) { list3.Add(0); } if (OverlayConfig.Columns.Additional.LobbyInfo.Basic.Type) { list3.Add(1); } if (OverlayConfig.Columns.Additional.LobbyInfo.Basic.Host) { list3.Add(2); } if (OverlayConfig.Columns.Additional.LobbyInfo.Basic.PlayerCount) { list3.Add(3); } int count = list3.Count; if (OverlayConfig.Columns.Additional.LobbyInfo.MatchMode.Event) { list3.Add(4); } if (OverlayConfig.Columns.Additional.LobbyInfo.MatchMode.Track) { list3.Add(5); } if (OverlayConfig.Columns.Additional.LobbyInfo.MatchMode.Difficulty) { list3.Add(6); } if (count > 0 && count < list3.Count) { list3.Insert(count, -1); } foreach (object obj in OverlayConfig.Columns.ColumnList) { ColumnElement columnElement = (ColumnElement)obj; if (columnElement.Enabled) { CellStruct[] array = new CellStruct[11]; CellStruct cellStruct = default(CellStruct); cellStruct.BackgroundColour = Color.FromArgb(OverlayConfig.Background.Opacity, OverlayConfig.Background.Colour); cellStruct.BackgroundHidden = !OverlayConfig.Background.Enabled; cellStruct.BackgroundFitTable = new bool[] { true, true }; cellStruct.Colour = columnElement.HeaderColour; cellStruct.Font = OverlayConfig.Fonts.Header; int[] array2 = new int[4]; array2[0] = 5; array2[1] = 5; cellStruct.Padding = array2; cellStruct.ManualDimensions = new Size(columnElement.Width, 0); CellStruct cellStruct2 = cellStruct; array[0] = cellStruct2; cellStruct2.Colour = columnElement.DataColour; cellStruct2.Font = OverlayConfig.Fonts.Data; for (int i = 1; i < 11; i++) { array[i] = cellStruct2; if (count > 0 && count < list3.Count && columnElement.Data == DataSourceEnum.LobbyInfo && i == count + 1) { CellStruct[] array3 = array; int num = i; int[] array4 = new int[4]; array4[2] = 20; array3[num].Padding = array4; } } list2.Add(new ColumnStruct { DataSource = columnElement.Data, HeaderHidden = !columnElement.ShowHeader, CellFormats = array }); } } if (OverlayConfig.Enabled) { list.Add(new TableStruct { Position = new Point(OverlayConfig.Position.X, OverlayConfig.Position.Y), Transposed = false, Columns = new ColumnsStruct { ColumnList = list2, Additional = new AdditionalStruct { LobbyInfo = list3, Ping = new PingStruct { EnableThresholds = false }, ShortPlayerNames = OverlayConfig.Columns.Additional.PlayerName.ShortNames, ShortCharacterNames = OverlayConfig.Columns.Additional.Character.ShortNames, ShortLobbyInfoNames = OverlayConfig.Columns.Additional.LobbyInfo.ShortNames } }, PlayerOrder = new SortStruct { DataSource = DataSourceEnum.Rating, increasing = false }, Visibility = new bool[] { false, true, true, true }, CustomRows = new List <CustomRowStruct>(), Background = new RectangleStruct { Hidden = true } }); } GameMemory._OverlayConfigPackage = new OverlayConfig { UpdateRate = 500, PlayerTables = list }; Debug.Print("done."); }
// Token: 0x0600002B RID: 43 RVA: 0x00003E2C File Offset: 0x0000202C public void UpdateStatic() { DebugTools.Write("Overlay: Updating user interface static elements... "); this.settingValues = true; int num = -1; if (this.ListView.SelectedIndices.Count == 1) { num = this.ListView.SelectedItems[0].Index; } this.ListView.Items.Clear(); if (this.Config.Columns.ColumnList.Count > 0) { foreach (object obj in this.Config.Columns.ColumnList) { ColumnElement columnElement = (ColumnElement)obj; this.ListView.Items.Add(new ListViewItem(new string[] { columnElement.Data.GetDescription(), columnElement.Width.ToString(), columnElement.HeaderColour.Name, columnElement.DataColour.Name }) { Checked = columnElement.Enabled }); } if (num >= 0 && num < this.ListView.Items.Count) { MainForm.ListViewFocus(this.ListView.Items, num, true); } } this.LabelHeaderFontPreview.Font = this.Config.Fonts.Header; this.LabelHeaderFontName.Text = string.Concat(new object[] { "Name: ", this.Config.Fonts.Header.Name, " ", this.Config.Fonts.Header.Style }); this.LabelDataFontPreview.Font = this.Config.Fonts.Data; this.LabelDataFontName.Text = string.Concat(new object[] { "Name: ", this.Config.Fonts.Data.Name, " ", this.Config.Fonts.Data.Style }); this.LabelBackgroundColourPreview.BackColor = this.Config.Background.Colour; this.CheckBoxEnable.Checked = this.Config.Enabled; this.CheckBoxBackgroundEnable.Checked = this.Config.Background.Enabled; this.LabelBackgroundColourPreview.BackColor = this.Config.Background.Colour; this.NumericUpDownX.Value = this.Config.Position.X; this.NumericUpDownY.Value = this.Config.Position.Y; this.TrackBarBackgroundOpacity.Value = this.Config.Background.Opacity; this.ButtonEdit.Enabled = (this.Config.Columns.ColumnList.Count > 0); this.ButtonRemove.Enabled = (this.Config.Columns.ColumnList.Count > 0); this.ButtonMoveUp.Enabled = (this.Config.Columns.ColumnList.Count > 0); this.ButtonMoveDown.Enabled = (this.Config.Columns.ColumnList.Count > 0); this.settingValues = false; Debug.Print("done."); }