mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2025-01-31 04:40:55 +00:00
made texture and flat browsers resizable and maximizable
This commit is contained in:
parent
efa5663ca3
commit
5b1feeaa14
4 changed files with 29 additions and 33 deletions
5
Source/Windows/FlatBrowserForm.Designer.cs
generated
5
Source/Windows/FlatBrowserForm.Designer.cs
generated
|
@ -121,14 +121,11 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
this.Controls.Add(this.apply);
|
||||
this.Controls.Add(this.browser);
|
||||
this.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "FlatBrowserForm";
|
||||
this.Opacity = 0;
|
||||
this.ShowIcon = false;
|
||||
this.ShowInTaskbar = false;
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
|
||||
this.Text = "Browse Flats";
|
||||
this.Load += new System.EventHandler(this.FlatBrowserForm_Load);
|
||||
this.Activated += new System.EventHandler(this.FlatBrowserForm_Activated);
|
||||
|
|
|
@ -34,7 +34,7 @@ using CodeImp.DoomBuilder.Controls;
|
|||
|
||||
namespace CodeImp.DoomBuilder.Windows
|
||||
{
|
||||
internal partial class FlatBrowserForm : DelayedForm
|
||||
internal partial class FlatBrowserForm : Form
|
||||
{
|
||||
// Variables
|
||||
private string selectedname;
|
||||
|
@ -90,6 +90,18 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
// Keep last position and size
|
||||
lastposition = this.Location;
|
||||
lastsize = this.Size;
|
||||
|
||||
// Position window from configuration settings
|
||||
this.SuspendLayout();
|
||||
/*
|
||||
this.Location = new Point(General.Settings.ReadSetting("browserwindow.positionx", this.Location.X),
|
||||
General.Settings.ReadSetting("browserwindow.positiony", this.Location.Y));
|
||||
*/
|
||||
this.Size = new Size(General.Settings.ReadSetting("browserwindow.sizewidth", this.Size.Width),
|
||||
General.Settings.ReadSetting("browserwindow.sizeheight", this.Size.Height));
|
||||
this.WindowState = (FormWindowState)General.Settings.ReadSetting("browserwindow.windowstate", (int)FormWindowState.Normal);
|
||||
if(this.WindowState == FormWindowState.Normal) this.StartPosition = FormStartPosition.CenterParent;
|
||||
this.ResumeLayout(true);
|
||||
}
|
||||
|
||||
// Selection changed
|
||||
|
@ -127,17 +139,6 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
// Loading
|
||||
private void FlatBrowserForm_Load(object sender, EventArgs e)
|
||||
{
|
||||
/*
|
||||
// Position window from configuration settings
|
||||
this.SuspendLayout();
|
||||
this.Location = new Point(General.Settings.ReadSetting("browserwindow.positionx", this.Location.X),
|
||||
General.Settings.ReadSetting("browserwindow.positiony", this.Location.Y));
|
||||
this.Size = new Size(General.Settings.ReadSetting("browserwindow.sizewidth", this.Size.Width),
|
||||
General.Settings.ReadSetting("browserwindow.sizeheight", this.Size.Height));
|
||||
this.WindowState = (FormWindowState)General.Settings.ReadSetting("browserwindow.windowstate", (int)FormWindowState.Normal);
|
||||
this.ResumeLayout(true);
|
||||
*/
|
||||
|
||||
// Normal windowstate?
|
||||
if(this.WindowState == FormWindowState.Normal)
|
||||
{
|
||||
|
|
5
Source/Windows/TextureBrowserForm.Designer.cs
generated
5
Source/Windows/TextureBrowserForm.Designer.cs
generated
|
@ -121,14 +121,11 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
this.Controls.Add(this.apply);
|
||||
this.Controls.Add(this.browser);
|
||||
this.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "TextureBrowserForm";
|
||||
this.Opacity = 0;
|
||||
this.ShowIcon = false;
|
||||
this.ShowInTaskbar = false;
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
|
||||
this.Text = "Browse Textures";
|
||||
this.Load += new System.EventHandler(this.TextureBrowserForm_Load);
|
||||
this.Activated += new System.EventHandler(this.TextureBrowserForm_Activated);
|
||||
|
|
|
@ -34,7 +34,7 @@ using CodeImp.DoomBuilder.Controls;
|
|||
|
||||
namespace CodeImp.DoomBuilder.Windows
|
||||
{
|
||||
internal partial class TextureBrowserForm : DelayedForm
|
||||
internal partial class TextureBrowserForm : Form
|
||||
{
|
||||
// Variables
|
||||
private string selectedname;
|
||||
|
@ -86,10 +86,22 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
// Make groups
|
||||
usedgroup = browser.AddGroup("Used Textures");
|
||||
availgroup = browser.AddGroup("Available Textures");
|
||||
|
||||
|
||||
// Keep last position and size
|
||||
lastposition = this.Location;
|
||||
lastsize = this.Size;
|
||||
|
||||
// Position window from configuration settings
|
||||
this.SuspendLayout();
|
||||
/*
|
||||
this.Location = new Point(General.Settings.ReadSetting("browserwindow.positionx", this.Location.X),
|
||||
General.Settings.ReadSetting("browserwindow.positiony", this.Location.Y));
|
||||
*/
|
||||
this.Size = new Size(General.Settings.ReadSetting("browserwindow.sizewidth", this.Size.Width),
|
||||
General.Settings.ReadSetting("browserwindow.sizeheight", this.Size.Height));
|
||||
this.WindowState = (FormWindowState)General.Settings.ReadSetting("browserwindow.windowstate", (int)FormWindowState.Normal);
|
||||
if(this.WindowState == FormWindowState.Normal) this.StartPosition = FormStartPosition.CenterParent;
|
||||
this.ResumeLayout(true);
|
||||
}
|
||||
|
||||
// Selection changed
|
||||
|
@ -127,17 +139,6 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
// Loading
|
||||
private void TextureBrowserForm_Load(object sender, EventArgs e)
|
||||
{
|
||||
/*
|
||||
// Position window from configuration settings
|
||||
this.SuspendLayout();
|
||||
this.Location = new Point(General.Settings.ReadSetting("browserwindow.positionx", this.Location.X),
|
||||
General.Settings.ReadSetting("browserwindow.positiony", this.Location.Y));
|
||||
this.Size = new Size(General.Settings.ReadSetting("browserwindow.sizewidth", this.Size.Width),
|
||||
General.Settings.ReadSetting("browserwindow.sizeheight", this.Size.Height));
|
||||
this.WindowState = (FormWindowState)General.Settings.ReadSetting("browserwindow.windowstate", (int)FormWindowState.Normal);
|
||||
this.ResumeLayout(true);
|
||||
*/
|
||||
|
||||
// Normal windowstate?
|
||||
if(this.WindowState == FormWindowState.Normal)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue