public override void DoWindowContents(Rect inRect) { // Title GenUI.SetLabelAlign(TextAnchor.MiddleCenter); Text.Font = GameFont.Medium; var titleRect = new Rect(0f, 0f, inRect.width, 40f); Widgets.Label(titleRect, "Dialog_EditNames_Title".Translate()); Text.Font = GameFont.Tiny; GenUI.ResetLabelAlign(); //Name list var scrollViewVisible = new Rect(0f, titleRect.height + 10, inRect.width, inRect.height - titleRect.height - 60f); var scrollBarVisible = SettingsHandler.STATE_LIMIT * 42f > scrollViewVisible.height; var scrollViewTotal = new Rect(0f, 0f - 10f, scrollViewVisible.width - (scrollBarVisible ? ScrollBarWidthMargin : 0) - 20f, SettingsHandler.STATE_LIMIT * 42f); Widgets.BeginScrollView(scrollViewVisible, ref scrollPosition, scrollViewTotal); if (SettingsHandler.DoStateNamesDrawerContents(scrollViewTotal)) { settingsHaveChanged = true; } Widgets.EndScrollView(); }