Add files for the new one.
Rework UI from scratch with proper themes and custom controls. MDI windows are now used for workspaces, comparing docs, and multiple usages. Tabs organise multiple workspaces and you can keep mdi windows maximized if you want to only use tabs. Themes currently include dark and white theme but plan to have XML files with list of color and styles
Alot of things optimized. UI is very fast and snappy now
Dae rigging fixed.
Dae bones can be imported.
Dae with textures can be imported and exported to a folder
Custom sampler editor for sampler data.
Texture refs, shader options, params, render info, and basically all material data can be added/removed and edited
User data editor
Update opengl framework by JuPaHe64 to the newest. Includes an origintation cube, multiple models in a scene, and many improvements
Skeleton can be viewed
GFPAK with some fixes in saving
NUTEXB has proper mip map viewing
PTCL Editor (Wii U and Switch). Can edit colors ( Wii U) and view textures. Also EFFN files in smash ultimate can be previewed
Files can be associated with the program and opened with on clicking them
ASTC textures can be viewed
UVs can be viewed. Includes wrap modes and also translating and scaling for some basic edits
Textures use a new editor. It includes channel viewing and some new editing options
Fixed black textures on some wii u bfres
Fixed saving sarcs in sarcs
Shortcut keys have been added in. CTRL + S can save the active file in the currently used window
Fix more issues with bfres crashing
File - New includes BNTX for creating new bntx files from scatch
Raw shader binaries can be extracted from bnsh and bfsha. Yuzu and Ryujinx can decompile these
Sharc files can have source data previewed and shader programs in XML
Aamp v1 and v2 data can be previewed. v1 can be edited and saved atm, v2 will be at a later update
Byaml uses it's own editor instead of a seperate window for easy saving within sarcs
Archives have a hex viewer
Dae exporting greatly improved and can export rigged meshes
Scene, shader param, srt, color, and texture pattern animations can all be previewed (in a list)
Memory usage is greatly improved
Narc (Nitro Archives) can be viewed and extracted.
Fixed importing TGA images
Support importing ASTC textures for bntx
Added in PBR lighting for bfres from my implimentaion in forge
Added gradient background for viewport. This can be edited in the settings
Added skybox background option for viewport. Can load cubemaps
Added grid with customizable cells for viewport.
DDS decompression no longer requires Direct X tex.
Zlib decompression has been improved for opening files that use it
Rigid bones are properly ordered on importing a mesh. May fix some exploding issues.
Endianness for KCL can be toggled for saving. Will be set to what it was using orignally
Tangents can be filled with a constant value. Will allow them to not cause seams nor flat lighting however normal maps may not work as good
Vertex buffers can be added and removed. Also re encoded
Parameters now use drop down panels with values for easier editing
Reworked the bone editor. Everything for a bone can be fully edited now besides the index, billboard index and parent index which get set automatically
Fixed animation scaling for skeletal animations finally!
Textures can be loaded in a tab now with thumbnail displaying for easy real time edits while previewing in the viewport
Fixed support for audio files to be big endian in BARS
Textures for switch now use their own folder. You can easily add textures to this and add textures to bfres that have no bntx. If there are no textures then the bfres will automatically not have one on save.
Animations are split into multiple sub sections for switch's material animation for easier access
Bfres for wii u has better binary exporting and is fully compatiable with Wexos Toolbox (to and from)
Every section can be added in as new for both wii u and switch.
Every section can be renamed properly and mostly everything can be edited. (Key frame editing and a more in depth curve editor later)
Added option to copy UV channel
Bone weights can be previewed
Tons of fixes for the switch bfres library with more games working. Splatoon 2 (more work now), BOTW, Kirby Star Allies, and more!
Fixed 3.3 Wii U bfres from not opening
Wii U Sharcfb files can have shader program data previewed (XML)
And possibly alot more things i missed! All this is still experimental but will improve over the next few weeks
2019-03-23 17:55:09 +01:00
|
|
|
|
using System.Windows.Forms;
|
|
|
|
|
using System.Runtime.InteropServices;
|
|
|
|
|
using System.Drawing;
|
|
|
|
|
using System;
|
|
|
|
|
|
|
|
|
|
namespace Switch_Toolbox.Library.Forms
|
|
|
|
|
{
|
|
|
|
|
public class STForm : Form
|
|
|
|
|
{
|
|
|
|
|
private bool canResize = true;
|
|
|
|
|
public bool CanResize
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
return canResize;
|
|
|
|
|
}
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
canResize = value;
|
|
|
|
|
|
|
|
|
|
if (BtnMinMax != null)
|
|
|
|
|
BtnMinMax.Visible = value;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2019-05-01 00:00:08 +02:00
|
|
|
|
public void AddControl(Control control) {
|
|
|
|
|
contentContainer.Controls.Add(control);
|
|
|
|
|
}
|
|
|
|
|
|
Add files for the new one.
Rework UI from scratch with proper themes and custom controls. MDI windows are now used for workspaces, comparing docs, and multiple usages. Tabs organise multiple workspaces and you can keep mdi windows maximized if you want to only use tabs. Themes currently include dark and white theme but plan to have XML files with list of color and styles
Alot of things optimized. UI is very fast and snappy now
Dae rigging fixed.
Dae bones can be imported.
Dae with textures can be imported and exported to a folder
Custom sampler editor for sampler data.
Texture refs, shader options, params, render info, and basically all material data can be added/removed and edited
User data editor
Update opengl framework by JuPaHe64 to the newest. Includes an origintation cube, multiple models in a scene, and many improvements
Skeleton can be viewed
GFPAK with some fixes in saving
NUTEXB has proper mip map viewing
PTCL Editor (Wii U and Switch). Can edit colors ( Wii U) and view textures. Also EFFN files in smash ultimate can be previewed
Files can be associated with the program and opened with on clicking them
ASTC textures can be viewed
UVs can be viewed. Includes wrap modes and also translating and scaling for some basic edits
Textures use a new editor. It includes channel viewing and some new editing options
Fixed black textures on some wii u bfres
Fixed saving sarcs in sarcs
Shortcut keys have been added in. CTRL + S can save the active file in the currently used window
Fix more issues with bfres crashing
File - New includes BNTX for creating new bntx files from scatch
Raw shader binaries can be extracted from bnsh and bfsha. Yuzu and Ryujinx can decompile these
Sharc files can have source data previewed and shader programs in XML
Aamp v1 and v2 data can be previewed. v1 can be edited and saved atm, v2 will be at a later update
Byaml uses it's own editor instead of a seperate window for easy saving within sarcs
Archives have a hex viewer
Dae exporting greatly improved and can export rigged meshes
Scene, shader param, srt, color, and texture pattern animations can all be previewed (in a list)
Memory usage is greatly improved
Narc (Nitro Archives) can be viewed and extracted.
Fixed importing TGA images
Support importing ASTC textures for bntx
Added in PBR lighting for bfres from my implimentaion in forge
Added gradient background for viewport. This can be edited in the settings
Added skybox background option for viewport. Can load cubemaps
Added grid with customizable cells for viewport.
DDS decompression no longer requires Direct X tex.
Zlib decompression has been improved for opening files that use it
Rigid bones are properly ordered on importing a mesh. May fix some exploding issues.
Endianness for KCL can be toggled for saving. Will be set to what it was using orignally
Tangents can be filled with a constant value. Will allow them to not cause seams nor flat lighting however normal maps may not work as good
Vertex buffers can be added and removed. Also re encoded
Parameters now use drop down panels with values for easier editing
Reworked the bone editor. Everything for a bone can be fully edited now besides the index, billboard index and parent index which get set automatically
Fixed animation scaling for skeletal animations finally!
Textures can be loaded in a tab now with thumbnail displaying for easy real time edits while previewing in the viewport
Fixed support for audio files to be big endian in BARS
Textures for switch now use their own folder. You can easily add textures to this and add textures to bfres that have no bntx. If there are no textures then the bfres will automatically not have one on save.
Animations are split into multiple sub sections for switch's material animation for easier access
Bfres for wii u has better binary exporting and is fully compatiable with Wexos Toolbox (to and from)
Every section can be added in as new for both wii u and switch.
Every section can be renamed properly and mostly everything can be edited. (Key frame editing and a more in depth curve editor later)
Added option to copy UV channel
Bone weights can be previewed
Tons of fixes for the switch bfres library with more games working. Splatoon 2 (more work now), BOTW, Kirby Star Allies, and more!
Fixed 3.3 Wii U bfres from not opening
Wii U Sharcfb files can have shader program data previewed (XML)
And possibly alot more things i missed! All this is still experimental but will improve over the next few weeks
2019-03-23 17:55:09 +01:00
|
|
|
|
public override string Text
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
return base.Text;
|
|
|
|
|
}
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
base.Text = value;
|
|
|
|
|
|
|
|
|
|
if (LblTitle != null)
|
|
|
|
|
LblTitle.Text = value;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private int BorderSize = 5;
|
|
|
|
|
|
|
|
|
|
private Color BorderColor;
|
|
|
|
|
|
|
|
|
|
private const int cGrip = 16; // Grip size
|
|
|
|
|
private const int cCaption = 32; // Caption bar height;
|
|
|
|
|
|
|
|
|
|
private const int HTCLIENT = 0x1;
|
|
|
|
|
private const int HT_CAPTION = 0x2;
|
|
|
|
|
private const int WM_SETREDRAW = 0xb;
|
|
|
|
|
private const int WM_NCHITTEST = 0x84;
|
|
|
|
|
protected STPanel contentContainer;
|
|
|
|
|
private const int WM_NCLBUTTONDOWN = 0xa1;
|
|
|
|
|
|
|
|
|
|
[DllImport("user32.dll")]
|
|
|
|
|
public static extern int SendMessage(IntPtr hWnd, int Msg, int wParam, int lParam);
|
|
|
|
|
[DllImport("user32.dll")]
|
|
|
|
|
public static extern bool ReleaseCapture();
|
|
|
|
|
|
|
|
|
|
private Panel TitleBar;
|
|
|
|
|
private Label LblTitle;
|
|
|
|
|
private PictureBox PicIcon;
|
|
|
|
|
private PictureBox BtnMinimize;
|
|
|
|
|
private PictureBox BtnMinMax;
|
|
|
|
|
private PictureBox BtnClose;
|
|
|
|
|
|
|
|
|
|
public STForm()
|
|
|
|
|
{
|
|
|
|
|
InitializeComponent();
|
|
|
|
|
|
|
|
|
|
mLastState = this.WindowState;
|
|
|
|
|
|
|
|
|
|
SetStyle(ControlStyles.ResizeRedraw, true);
|
|
|
|
|
|
|
|
|
|
ForeColor = FormThemes.BaseTheme.FormForeColor;
|
|
|
|
|
BackColor = FormThemes.BaseTheme.FormBackColor;
|
|
|
|
|
BorderColor = FormThemes.BaseTheme.MDIChildBorderColor;
|
|
|
|
|
TitleBar.BackColor = BorderColor;
|
|
|
|
|
|
|
|
|
|
StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected override void OnCreateControl()
|
|
|
|
|
{
|
|
|
|
|
this.ControlBox = false;
|
|
|
|
|
this.DoubleBuffered = true;
|
|
|
|
|
|
|
|
|
|
base.OnCreateControl();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void InitializeComponent()
|
|
|
|
|
{
|
|
|
|
|
this.contentContainer = new Switch_Toolbox.Library.Forms.STPanel();
|
|
|
|
|
this.TitleBar = new System.Windows.Forms.Panel();
|
|
|
|
|
this.LblTitle = new System.Windows.Forms.Label();
|
|
|
|
|
this.PicIcon = new System.Windows.Forms.PictureBox();
|
|
|
|
|
this.BtnMinimize = new System.Windows.Forms.PictureBox();
|
|
|
|
|
this.BtnMinMax = new System.Windows.Forms.PictureBox();
|
|
|
|
|
this.BtnClose = new System.Windows.Forms.PictureBox();
|
|
|
|
|
this.contentContainer.SuspendLayout();
|
|
|
|
|
this.TitleBar.SuspendLayout();
|
|
|
|
|
((System.ComponentModel.ISupportInitialize)(this.PicIcon)).BeginInit();
|
|
|
|
|
((System.ComponentModel.ISupportInitialize)(this.BtnMinimize)).BeginInit();
|
|
|
|
|
((System.ComponentModel.ISupportInitialize)(this.BtnMinMax)).BeginInit();
|
|
|
|
|
((System.ComponentModel.ISupportInitialize)(this.BtnClose)).BeginInit();
|
|
|
|
|
this.SuspendLayout();
|
|
|
|
|
//
|
|
|
|
|
// contentContainer
|
|
|
|
|
//
|
|
|
|
|
this.contentContainer.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
|
|
|
|
| System.Windows.Forms.AnchorStyles.Left)
|
|
|
|
|
| System.Windows.Forms.AnchorStyles.Right)));
|
|
|
|
|
this.contentContainer.Controls.Add(this.TitleBar);
|
|
|
|
|
this.contentContainer.Location = new System.Drawing.Point(3, 2);
|
|
|
|
|
this.contentContainer.Name = "contentContainer";
|
|
|
|
|
this.contentContainer.Size = new System.Drawing.Size(543, 393);
|
|
|
|
|
this.contentContainer.TabIndex = 11;
|
|
|
|
|
//
|
|
|
|
|
// TitleBar
|
|
|
|
|
//
|
|
|
|
|
this.TitleBar.BackColor = System.Drawing.Color.White;
|
|
|
|
|
this.TitleBar.Controls.Add(this.LblTitle);
|
|
|
|
|
this.TitleBar.Controls.Add(this.PicIcon);
|
|
|
|
|
this.TitleBar.Controls.Add(this.BtnMinimize);
|
|
|
|
|
this.TitleBar.Controls.Add(this.BtnMinMax);
|
|
|
|
|
this.TitleBar.Controls.Add(this.BtnClose);
|
|
|
|
|
this.TitleBar.Dock = System.Windows.Forms.DockStyle.Top;
|
|
|
|
|
this.TitleBar.Location = new System.Drawing.Point(0, 0);
|
|
|
|
|
this.TitleBar.Name = "TitleBar";
|
|
|
|
|
this.TitleBar.Size = new System.Drawing.Size(543, 25);
|
|
|
|
|
this.TitleBar.TabIndex = 10;
|
2019-03-28 22:28:39 +01:00
|
|
|
|
this.TitleBar.DoubleClick += new System.EventHandler(this.TitleBar_DoubleClick);
|
Add files for the new one.
Rework UI from scratch with proper themes and custom controls. MDI windows are now used for workspaces, comparing docs, and multiple usages. Tabs organise multiple workspaces and you can keep mdi windows maximized if you want to only use tabs. Themes currently include dark and white theme but plan to have XML files with list of color and styles
Alot of things optimized. UI is very fast and snappy now
Dae rigging fixed.
Dae bones can be imported.
Dae with textures can be imported and exported to a folder
Custom sampler editor for sampler data.
Texture refs, shader options, params, render info, and basically all material data can be added/removed and edited
User data editor
Update opengl framework by JuPaHe64 to the newest. Includes an origintation cube, multiple models in a scene, and many improvements
Skeleton can be viewed
GFPAK with some fixes in saving
NUTEXB has proper mip map viewing
PTCL Editor (Wii U and Switch). Can edit colors ( Wii U) and view textures. Also EFFN files in smash ultimate can be previewed
Files can be associated with the program and opened with on clicking them
ASTC textures can be viewed
UVs can be viewed. Includes wrap modes and also translating and scaling for some basic edits
Textures use a new editor. It includes channel viewing and some new editing options
Fixed black textures on some wii u bfres
Fixed saving sarcs in sarcs
Shortcut keys have been added in. CTRL + S can save the active file in the currently used window
Fix more issues with bfres crashing
File - New includes BNTX for creating new bntx files from scatch
Raw shader binaries can be extracted from bnsh and bfsha. Yuzu and Ryujinx can decompile these
Sharc files can have source data previewed and shader programs in XML
Aamp v1 and v2 data can be previewed. v1 can be edited and saved atm, v2 will be at a later update
Byaml uses it's own editor instead of a seperate window for easy saving within sarcs
Archives have a hex viewer
Dae exporting greatly improved and can export rigged meshes
Scene, shader param, srt, color, and texture pattern animations can all be previewed (in a list)
Memory usage is greatly improved
Narc (Nitro Archives) can be viewed and extracted.
Fixed importing TGA images
Support importing ASTC textures for bntx
Added in PBR lighting for bfres from my implimentaion in forge
Added gradient background for viewport. This can be edited in the settings
Added skybox background option for viewport. Can load cubemaps
Added grid with customizable cells for viewport.
DDS decompression no longer requires Direct X tex.
Zlib decompression has been improved for opening files that use it
Rigid bones are properly ordered on importing a mesh. May fix some exploding issues.
Endianness for KCL can be toggled for saving. Will be set to what it was using orignally
Tangents can be filled with a constant value. Will allow them to not cause seams nor flat lighting however normal maps may not work as good
Vertex buffers can be added and removed. Also re encoded
Parameters now use drop down panels with values for easier editing
Reworked the bone editor. Everything for a bone can be fully edited now besides the index, billboard index and parent index which get set automatically
Fixed animation scaling for skeletal animations finally!
Textures can be loaded in a tab now with thumbnail displaying for easy real time edits while previewing in the viewport
Fixed support for audio files to be big endian in BARS
Textures for switch now use their own folder. You can easily add textures to this and add textures to bfres that have no bntx. If there are no textures then the bfres will automatically not have one on save.
Animations are split into multiple sub sections for switch's material animation for easier access
Bfres for wii u has better binary exporting and is fully compatiable with Wexos Toolbox (to and from)
Every section can be added in as new for both wii u and switch.
Every section can be renamed properly and mostly everything can be edited. (Key frame editing and a more in depth curve editor later)
Added option to copy UV channel
Bone weights can be previewed
Tons of fixes for the switch bfres library with more games working. Splatoon 2 (more work now), BOTW, Kirby Star Allies, and more!
Fixed 3.3 Wii U bfres from not opening
Wii U Sharcfb files can have shader program data previewed (XML)
And possibly alot more things i missed! All this is still experimental but will improve over the next few weeks
2019-03-23 17:55:09 +01:00
|
|
|
|
this.TitleBar.MouseDown += new System.Windows.Forms.MouseEventHandler(this.TitleBar_MouseDown);
|
|
|
|
|
//
|
|
|
|
|
// LblTitle
|
|
|
|
|
//
|
|
|
|
|
this.LblTitle.AutoSize = true;
|
|
|
|
|
this.LblTitle.Font = new System.Drawing.Font("Segoe UI Semibold", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
|
|
|
|
this.LblTitle.Location = new System.Drawing.Point(20, 3);
|
|
|
|
|
this.LblTitle.Name = "LblTitle";
|
|
|
|
|
this.LblTitle.Size = new System.Drawing.Size(33, 17);
|
|
|
|
|
this.LblTitle.TabIndex = 5;
|
|
|
|
|
this.LblTitle.Text = "Title";
|
|
|
|
|
this.LblTitle.MouseDown += new System.Windows.Forms.MouseEventHandler(this.TitleBar_MouseDown);
|
|
|
|
|
//
|
|
|
|
|
// PicIcon
|
|
|
|
|
//
|
|
|
|
|
this.PicIcon.Location = new System.Drawing.Point(5, 5);
|
|
|
|
|
this.PicIcon.Name = "PicIcon";
|
|
|
|
|
this.PicIcon.Size = new System.Drawing.Size(16, 16);
|
|
|
|
|
this.PicIcon.TabIndex = 4;
|
|
|
|
|
this.PicIcon.TabStop = false;
|
|
|
|
|
//
|
|
|
|
|
// BtnMinimize
|
|
|
|
|
//
|
|
|
|
|
this.BtnMinimize.BackColor = System.Drawing.Color.Transparent;
|
|
|
|
|
this.BtnMinimize.Dock = System.Windows.Forms.DockStyle.Right;
|
|
|
|
|
this.BtnMinimize.Image = global::Switch_Toolbox.Library.Properties.Resources.minimize;
|
|
|
|
|
this.BtnMinimize.Location = new System.Drawing.Point(429, 0);
|
|
|
|
|
this.BtnMinimize.Name = "BtnMinimize";
|
|
|
|
|
this.BtnMinimize.Size = new System.Drawing.Size(38, 25);
|
|
|
|
|
this.BtnMinimize.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
|
|
|
|
|
this.BtnMinimize.TabIndex = 3;
|
|
|
|
|
this.BtnMinimize.TabStop = false;
|
|
|
|
|
this.BtnMinimize.Click += new System.EventHandler(this.BtnMinimize_Click);
|
|
|
|
|
this.BtnMinimize.MouseEnter += new System.EventHandler(this.BtnMinimize_MouseEnter);
|
|
|
|
|
this.BtnMinimize.MouseLeave += new System.EventHandler(this.BtnMinimize_MouseLeave);
|
|
|
|
|
//
|
|
|
|
|
// BtnMinMax
|
|
|
|
|
//
|
|
|
|
|
this.BtnMinMax.BackColor = System.Drawing.Color.Transparent;
|
|
|
|
|
this.BtnMinMax.Dock = System.Windows.Forms.DockStyle.Right;
|
|
|
|
|
this.BtnMinMax.Image = global::Switch_Toolbox.Library.Properties.Resources.maximize;
|
|
|
|
|
this.BtnMinMax.Location = new System.Drawing.Point(467, 0);
|
|
|
|
|
this.BtnMinMax.Name = "BtnMinMax";
|
|
|
|
|
this.BtnMinMax.Size = new System.Drawing.Size(38, 25);
|
|
|
|
|
this.BtnMinMax.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
|
|
|
|
|
this.BtnMinMax.TabIndex = 2;
|
|
|
|
|
this.BtnMinMax.TabStop = false;
|
|
|
|
|
this.BtnMinMax.Click += new System.EventHandler(this.BtnMinMax_Click);
|
|
|
|
|
this.BtnMinMax.MouseEnter += new System.EventHandler(this.BtnMinMax_MouseEnter);
|
|
|
|
|
this.BtnMinMax.MouseLeave += new System.EventHandler(this.BtnMinMax_MouseLeave);
|
|
|
|
|
//
|
|
|
|
|
// BtnClose
|
|
|
|
|
//
|
|
|
|
|
this.BtnClose.BackColor = System.Drawing.Color.Transparent;
|
|
|
|
|
this.BtnClose.Dock = System.Windows.Forms.DockStyle.Right;
|
|
|
|
|
this.BtnClose.Image = global::Switch_Toolbox.Library.Properties.Resources.Close;
|
|
|
|
|
this.BtnClose.Location = new System.Drawing.Point(505, 0);
|
|
|
|
|
this.BtnClose.Name = "BtnClose";
|
|
|
|
|
this.BtnClose.Size = new System.Drawing.Size(38, 25);
|
|
|
|
|
this.BtnClose.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
|
|
|
|
|
this.BtnClose.TabIndex = 1;
|
|
|
|
|
this.BtnClose.TabStop = false;
|
|
|
|
|
this.BtnClose.Click += new System.EventHandler(this.BtnClose_Click);
|
|
|
|
|
this.BtnClose.MouseEnter += new System.EventHandler(this.BtnClose_MouseEnter);
|
|
|
|
|
this.BtnClose.MouseLeave += new System.EventHandler(this.BtnClose_MouseLeave);
|
|
|
|
|
//
|
|
|
|
|
// STForm
|
|
|
|
|
//
|
|
|
|
|
this.ClientSize = new System.Drawing.Size(549, 398);
|
|
|
|
|
this.ControlBox = false;
|
|
|
|
|
this.Controls.Add(this.contentContainer);
|
|
|
|
|
this.DoubleBuffered = true;
|
|
|
|
|
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
|
|
|
|
|
this.Name = "STForm";
|
|
|
|
|
this.Shown += new System.EventHandler(this.STForm_Shown);
|
|
|
|
|
this.Paint += new System.Windows.Forms.PaintEventHandler(this.STForm_Paint);
|
|
|
|
|
this.Enter += new System.EventHandler(this.STForm_Enter);
|
|
|
|
|
this.Leave += new System.EventHandler(this.STForm_Leave);
|
|
|
|
|
this.contentContainer.ResumeLayout(false);
|
|
|
|
|
this.TitleBar.ResumeLayout(false);
|
|
|
|
|
this.TitleBar.PerformLayout();
|
|
|
|
|
((System.ComponentModel.ISupportInitialize)(this.PicIcon)).EndInit();
|
|
|
|
|
((System.ComponentModel.ISupportInitialize)(this.BtnMinimize)).EndInit();
|
|
|
|
|
((System.ComponentModel.ISupportInitialize)(this.BtnMinMax)).EndInit();
|
|
|
|
|
((System.ComponentModel.ISupportInitialize)(this.BtnClose)).EndInit();
|
|
|
|
|
this.ResumeLayout(false);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#region Events
|
|
|
|
|
|
|
|
|
|
private void BtnMinimize_Click(object sender, System.EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
WindowState = FormWindowState.Minimized;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void BtnMinMax_Click(object sender, System.EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
CheckWindowState();
|
|
|
|
|
}
|
|
|
|
|
public void Maximize()
|
|
|
|
|
{
|
|
|
|
|
if (IsMdiChild)
|
|
|
|
|
MDIMaximized();
|
2019-05-01 03:15:56 +02:00
|
|
|
|
|
|
|
|
|
MaximumSize = Screen.FromControl(this).WorkingArea.Size;
|
|
|
|
|
WindowState = FormWindowState.Maximized;
|
Add files for the new one.
Rework UI from scratch with proper themes and custom controls. MDI windows are now used for workspaces, comparing docs, and multiple usages. Tabs organise multiple workspaces and you can keep mdi windows maximized if you want to only use tabs. Themes currently include dark and white theme but plan to have XML files with list of color and styles
Alot of things optimized. UI is very fast and snappy now
Dae rigging fixed.
Dae bones can be imported.
Dae with textures can be imported and exported to a folder
Custom sampler editor for sampler data.
Texture refs, shader options, params, render info, and basically all material data can be added/removed and edited
User data editor
Update opengl framework by JuPaHe64 to the newest. Includes an origintation cube, multiple models in a scene, and many improvements
Skeleton can be viewed
GFPAK with some fixes in saving
NUTEXB has proper mip map viewing
PTCL Editor (Wii U and Switch). Can edit colors ( Wii U) and view textures. Also EFFN files in smash ultimate can be previewed
Files can be associated with the program and opened with on clicking them
ASTC textures can be viewed
UVs can be viewed. Includes wrap modes and also translating and scaling for some basic edits
Textures use a new editor. It includes channel viewing and some new editing options
Fixed black textures on some wii u bfres
Fixed saving sarcs in sarcs
Shortcut keys have been added in. CTRL + S can save the active file in the currently used window
Fix more issues with bfres crashing
File - New includes BNTX for creating new bntx files from scatch
Raw shader binaries can be extracted from bnsh and bfsha. Yuzu and Ryujinx can decompile these
Sharc files can have source data previewed and shader programs in XML
Aamp v1 and v2 data can be previewed. v1 can be edited and saved atm, v2 will be at a later update
Byaml uses it's own editor instead of a seperate window for easy saving within sarcs
Archives have a hex viewer
Dae exporting greatly improved and can export rigged meshes
Scene, shader param, srt, color, and texture pattern animations can all be previewed (in a list)
Memory usage is greatly improved
Narc (Nitro Archives) can be viewed and extracted.
Fixed importing TGA images
Support importing ASTC textures for bntx
Added in PBR lighting for bfres from my implimentaion in forge
Added gradient background for viewport. This can be edited in the settings
Added skybox background option for viewport. Can load cubemaps
Added grid with customizable cells for viewport.
DDS decompression no longer requires Direct X tex.
Zlib decompression has been improved for opening files that use it
Rigid bones are properly ordered on importing a mesh. May fix some exploding issues.
Endianness for KCL can be toggled for saving. Will be set to what it was using orignally
Tangents can be filled with a constant value. Will allow them to not cause seams nor flat lighting however normal maps may not work as good
Vertex buffers can be added and removed. Also re encoded
Parameters now use drop down panels with values for easier editing
Reworked the bone editor. Everything for a bone can be fully edited now besides the index, billboard index and parent index which get set automatically
Fixed animation scaling for skeletal animations finally!
Textures can be loaded in a tab now with thumbnail displaying for easy real time edits while previewing in the viewport
Fixed support for audio files to be big endian in BARS
Textures for switch now use their own folder. You can easily add textures to this and add textures to bfres that have no bntx. If there are no textures then the bfres will automatically not have one on save.
Animations are split into multiple sub sections for switch's material animation for easier access
Bfres for wii u has better binary exporting and is fully compatiable with Wexos Toolbox (to and from)
Every section can be added in as new for both wii u and switch.
Every section can be renamed properly and mostly everything can be edited. (Key frame editing and a more in depth curve editor later)
Added option to copy UV channel
Bone weights can be previewed
Tons of fixes for the switch bfres library with more games working. Splatoon 2 (more work now), BOTW, Kirby Star Allies, and more!
Fixed 3.3 Wii U bfres from not opening
Wii U Sharcfb files can have shader program data previewed (XML)
And possibly alot more things i missed! All this is still experimental but will improve over the next few weeks
2019-03-23 17:55:09 +01:00
|
|
|
|
}
|
|
|
|
|
private void CheckWindowState()
|
|
|
|
|
{
|
|
|
|
|
if (WindowState == FormWindowState.Maximized)
|
|
|
|
|
{
|
|
|
|
|
BtnMinMax.Image = Properties.Resources.maximize;
|
|
|
|
|
WindowState = FormWindowState.Normal;
|
|
|
|
|
|
|
|
|
|
if (IsMdiChild)
|
|
|
|
|
MDIWindowed();
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
BtnMinMax.Image = Properties.Resources.maximized;
|
|
|
|
|
|
|
|
|
|
Maximize();
|
|
|
|
|
}
|
|
|
|
|
Refresh();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void MDIWindowed()
|
|
|
|
|
{
|
|
|
|
|
TitleBar.Show();
|
|
|
|
|
|
|
|
|
|
this.ClientSize = new System.Drawing.Size(549, 398);
|
|
|
|
|
}
|
|
|
|
|
public void MDIMaximized()
|
|
|
|
|
{
|
|
|
|
|
TitleBar.Hide();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void BtnClose_Click(object sender, System.EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
Close();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void BtnClose_MouseEnter(object sender, System.EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
BtnClose.Image = Properties.Resources.Close_Hover;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void BtnClose_MouseLeave(object sender, System.EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
BtnClose.Image = Properties.Resources.Close;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void BtnMinMax_MouseEnter(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
BtnMinMax.Image = Properties.Resources.maximize_sele;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void BtnMinMax_MouseLeave(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
BtnMinMax.Image = Properties.Resources.maximize;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void BtnMinimize_MouseEnter(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
BtnMinimize.Image = Properties.Resources.minimize_sele;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void BtnMinimize_MouseLeave(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
BtnMinimize.Image = Properties.Resources.minimize;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void TitleBar_MouseDown(object sender, MouseEventArgs e)
|
|
|
|
|
{
|
|
|
|
|
if (e.Button == MouseButtons.Left && e.Y < 28)
|
|
|
|
|
{
|
|
|
|
|
ReleaseCapture();
|
|
|
|
|
SendMessage(Handle, WM_NCLBUTTONDOWN, HT_CAPTION, 0);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void STForm_Paint(object sender, PaintEventArgs e)
|
|
|
|
|
{
|
|
|
|
|
e.Graphics.DrawRectangle(new Pen(BorderColor, BorderSize),
|
|
|
|
|
this.DisplayRectangle);
|
|
|
|
|
|
|
|
|
|
using (SolidBrush brush = new SolidBrush(BorderColor))
|
|
|
|
|
{
|
|
|
|
|
e.Graphics.FillRectangle(brush, Top);
|
|
|
|
|
e.Graphics.FillRectangle(brush, Left);
|
|
|
|
|
e.Graphics.FillRectangle(brush, Right);
|
|
|
|
|
e.Graphics.FillRectangle(brush, Bottom);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void STForm_Leave(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
BorderColor = FormThemes.BaseTheme.DisabledBorderColor;
|
|
|
|
|
TitleBar.BackColor = BorderColor;
|
|
|
|
|
LblTitle.ForeColor = FormThemes.BaseTheme.DisabledItemColor;
|
|
|
|
|
Refresh();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void STForm_Enter(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
BorderColor = FormThemes.BaseTheme.MDIChildBorderColor;
|
|
|
|
|
TitleBar.BackColor = BorderColor;
|
|
|
|
|
LblTitle.ForeColor = FormThemes.BaseTheme.TextForeColor;
|
|
|
|
|
Refresh();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region Shadow
|
|
|
|
|
|
|
|
|
|
private void STForm_Shown(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private FormWindowState mLastState;
|
|
|
|
|
|
|
|
|
|
protected override void OnClientSizeChanged(EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
/* if (this.WindowState != mLastState)
|
|
|
|
|
{
|
|
|
|
|
mLastState = this.WindowState;
|
|
|
|
|
OnWindowStateChanged(e);
|
|
|
|
|
}
|
|
|
|
|
base.OnClientSizeChanged(e);*/
|
|
|
|
|
}
|
|
|
|
|
protected void OnWindowStateChanged(EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
if (this.WindowState == FormWindowState.Normal)
|
|
|
|
|
{
|
|
|
|
|
if (IsMdiChild)
|
|
|
|
|
MDIWindowed();
|
|
|
|
|
}
|
|
|
|
|
else if (this.WindowState == FormWindowState.Maximized)
|
|
|
|
|
{
|
|
|
|
|
if (IsMdiChild)
|
|
|
|
|
MDIMaximized();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region Border
|
|
|
|
|
private const int
|
|
|
|
|
HTLEFT = 10,
|
|
|
|
|
HTRIGHT = 11,
|
|
|
|
|
HTTOP = 12,
|
|
|
|
|
HTTOPLEFT = 13,
|
|
|
|
|
HTTOPRIGHT = 14,
|
|
|
|
|
HTBOTTOM = 15,
|
|
|
|
|
HTBOTTOMLEFT = 16,
|
|
|
|
|
HTBOTTOMRIGHT = 17;
|
|
|
|
|
|
|
|
|
|
Rectangle Top { get { return new Rectangle(0, 0, this.ClientSize.Width, BorderSize); } }
|
|
|
|
|
Rectangle Left { get { return new Rectangle(0, 0, BorderSize, this.ClientSize.Height); } }
|
|
|
|
|
|
2019-03-28 22:28:39 +01:00
|
|
|
|
private void TitleBar_DoubleClick(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
if (canResize)
|
|
|
|
|
{
|
|
|
|
|
Maximize();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
Add files for the new one.
Rework UI from scratch with proper themes and custom controls. MDI windows are now used for workspaces, comparing docs, and multiple usages. Tabs organise multiple workspaces and you can keep mdi windows maximized if you want to only use tabs. Themes currently include dark and white theme but plan to have XML files with list of color and styles
Alot of things optimized. UI is very fast and snappy now
Dae rigging fixed.
Dae bones can be imported.
Dae with textures can be imported and exported to a folder
Custom sampler editor for sampler data.
Texture refs, shader options, params, render info, and basically all material data can be added/removed and edited
User data editor
Update opengl framework by JuPaHe64 to the newest. Includes an origintation cube, multiple models in a scene, and many improvements
Skeleton can be viewed
GFPAK with some fixes in saving
NUTEXB has proper mip map viewing
PTCL Editor (Wii U and Switch). Can edit colors ( Wii U) and view textures. Also EFFN files in smash ultimate can be previewed
Files can be associated with the program and opened with on clicking them
ASTC textures can be viewed
UVs can be viewed. Includes wrap modes and also translating and scaling for some basic edits
Textures use a new editor. It includes channel viewing and some new editing options
Fixed black textures on some wii u bfres
Fixed saving sarcs in sarcs
Shortcut keys have been added in. CTRL + S can save the active file in the currently used window
Fix more issues with bfres crashing
File - New includes BNTX for creating new bntx files from scatch
Raw shader binaries can be extracted from bnsh and bfsha. Yuzu and Ryujinx can decompile these
Sharc files can have source data previewed and shader programs in XML
Aamp v1 and v2 data can be previewed. v1 can be edited and saved atm, v2 will be at a later update
Byaml uses it's own editor instead of a seperate window for easy saving within sarcs
Archives have a hex viewer
Dae exporting greatly improved and can export rigged meshes
Scene, shader param, srt, color, and texture pattern animations can all be previewed (in a list)
Memory usage is greatly improved
Narc (Nitro Archives) can be viewed and extracted.
Fixed importing TGA images
Support importing ASTC textures for bntx
Added in PBR lighting for bfres from my implimentaion in forge
Added gradient background for viewport. This can be edited in the settings
Added skybox background option for viewport. Can load cubemaps
Added grid with customizable cells for viewport.
DDS decompression no longer requires Direct X tex.
Zlib decompression has been improved for opening files that use it
Rigid bones are properly ordered on importing a mesh. May fix some exploding issues.
Endianness for KCL can be toggled for saving. Will be set to what it was using orignally
Tangents can be filled with a constant value. Will allow them to not cause seams nor flat lighting however normal maps may not work as good
Vertex buffers can be added and removed. Also re encoded
Parameters now use drop down panels with values for easier editing
Reworked the bone editor. Everything for a bone can be fully edited now besides the index, billboard index and parent index which get set automatically
Fixed animation scaling for skeletal animations finally!
Textures can be loaded in a tab now with thumbnail displaying for easy real time edits while previewing in the viewport
Fixed support for audio files to be big endian in BARS
Textures for switch now use their own folder. You can easily add textures to this and add textures to bfres that have no bntx. If there are no textures then the bfres will automatically not have one on save.
Animations are split into multiple sub sections for switch's material animation for easier access
Bfres for wii u has better binary exporting and is fully compatiable with Wexos Toolbox (to and from)
Every section can be added in as new for both wii u and switch.
Every section can be renamed properly and mostly everything can be edited. (Key frame editing and a more in depth curve editor later)
Added option to copy UV channel
Bone weights can be previewed
Tons of fixes for the switch bfres library with more games working. Splatoon 2 (more work now), BOTW, Kirby Star Allies, and more!
Fixed 3.3 Wii U bfres from not opening
Wii U Sharcfb files can have shader program data previewed (XML)
And possibly alot more things i missed! All this is still experimental but will improve over the next few weeks
2019-03-23 17:55:09 +01:00
|
|
|
|
Rectangle Bottom { get { return new Rectangle(0, this.ClientSize.Height - BorderSize, this.ClientSize.Width, BorderSize); } }
|
|
|
|
|
Rectangle Right { get { return new Rectangle(this.ClientSize.Width - BorderSize, 0, BorderSize, this.ClientSize.Height); } }
|
|
|
|
|
|
|
|
|
|
Rectangle TopLeft { get { return new Rectangle(0, 0, BorderSize, BorderSize); } }
|
|
|
|
|
Rectangle TopRight { get { return new Rectangle(this.ClientSize.Width - BorderSize, 0, BorderSize, BorderSize); } }
|
|
|
|
|
Rectangle BottomLeft { get { return new Rectangle(0, this.ClientSize.Height - BorderSize, BorderSize, BorderSize); } }
|
|
|
|
|
Rectangle BottomRight { get { return new Rectangle(this.ClientSize.Width - BorderSize, this.ClientSize.Height - BorderSize, BorderSize, BorderSize); } }
|
|
|
|
|
|
|
|
|
|
protected override void WndProc(ref Message message)
|
|
|
|
|
{
|
|
|
|
|
base.WndProc(ref message);
|
|
|
|
|
|
|
|
|
|
if (message.Msg == WM_NCHITTEST && CanResize && WindowState == FormWindowState.Normal)
|
|
|
|
|
{
|
|
|
|
|
int x = message.LParam.ToInt32() & 0xffff;
|
|
|
|
|
int y = (int)((message.LParam.ToInt32() & 0xffff0000) >> 16);
|
|
|
|
|
|
|
|
|
|
Point cursor = PointToClient(new Point(x, y));
|
|
|
|
|
|
|
|
|
|
// var cursor = this.PointToClient(Cursor.Position);
|
|
|
|
|
|
|
|
|
|
if (TopLeft.Contains(cursor)) message.Result = (IntPtr)HTTOPLEFT;
|
|
|
|
|
else if (TopRight.Contains(cursor)) message.Result = (IntPtr)HTTOPRIGHT;
|
|
|
|
|
else if (BottomLeft.Contains(cursor)) message.Result = (IntPtr)HTBOTTOMLEFT;
|
|
|
|
|
else if (BottomRight.Contains(cursor)) message.Result = (IntPtr)HTBOTTOMRIGHT;
|
|
|
|
|
|
|
|
|
|
else if (Top.Contains(cursor)) message.Result = (IntPtr)HTTOP;
|
|
|
|
|
else if (Left.Contains(cursor)) message.Result = (IntPtr)HTLEFT;
|
|
|
|
|
else if (Right.Contains(cursor)) message.Result = (IntPtr)HTRIGHT;
|
|
|
|
|
else if (Bottom.Contains(cursor)) message.Result = (IntPtr)HTBOTTOM;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
}
|