Esempio n. 1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="MainUi"/> class.
        /// </summary>
        public MainUi()
        {
            this.mainWindow        = SettingsManager.Settings.GetValue(SettingsManager.MainWindowRect, new Rect(200, 200, 500, 400));
            this.mainWindow.width  = this.mainWindow.width > 500 ? 500 : this.mainWindow.width;
            this.mainWindow.height = this.mainWindow.height > 400 ? 400 : this.mainWindow.height;

            this.highlighter = new Highlighter();

            this.partFilter     = new PartManager();
            this.FilterChanged += this.partFilter.ViewFilterChanged;
        }
Esempio n. 2
0
 /// <summary>
 /// Draws buttons to allow the user to jump to a linked action group.
 /// </summary>
 /// <param name="part">The part to link the action group to.</param>
 private void DrawLinkedGroupButtons(Part part)
 {
     foreach (KSPActionGroup group in PartManager.GetActionGroupAttachedToPart(part))
     {
         if (group != KSPActionGroup.None && part != this.currentSelectedPart)
         {
             // #autoLOC_AGM_106 = Part has an action linked to action group <<1>>.
             var content = new GUIContent(group.ToShortString(), Localizer.Format(Localizer.GetStringByTag("#autoLOC_AGM_106"), group.displayDescription()));
             if (GUILayout.Button(content, Style.GroupFindButton, GUILayout.Width(Style.UseUnitySkin ? 30 : 20)))
             {
                 this.SelectedActionGroup = group;
             }
         }
     }
 }