mirror of
https://github.com/KillzXGaming/Switch-Toolbox
synced 2024-11-23 13:03:15 +00:00
04eec01042
- The UI has been completely redone. It's far much more clean and intuitive to edit with. - All major pane types can be created now. Part panes are not supported but will be added in a future update due to being more complex to mess with. - Window panes can be fully customized now, with custom frame adjusting, adding, and editing materials per frame and content regions. - Picture panes have improved UV editing, and vertex color editing (which can set by corner or all at once). - Text boxes will have a dialog for selecting the font file. These also can be switchted in the text editor. - Improved pane deleting signifcantly. Material references are removed, and undo/redo works perfectly fine. - Fixed many flags for properties which didn't get set correctly if edited. - Fixed layout saving for text boxes with using the wrong encoding. Also some padding fixes. - Text panes now auto calculate the text length and allow restricted lengths to be edited. - Properties can now be scrolled down, and kept at that state when refocused. - Add a selection box for selecting multiple panes at once - Textures can be added, removed and edited in editor. Make sure these are in the same archive!!! Wii U auto does it in the same archive opened, switch must have a bntx in it. Automatic creaton of these will come - Picture panes can be generated via textures. Drag and drop one from a list. Also keeps the original image sizes. - Fixed window pane rendering with 1 frame and flipping textures. - Materials can add textures, and have new custom blend and alpha modes. when i finish the new layout export dialog. - Added an edit option for image editor to gamma fix smash ultimate bntx.
56 lines
1.5 KiB
C#
56 lines
1.5 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using System.Windows.Forms;
|
|
|
|
namespace Toolbox.Library.Forms
|
|
{
|
|
public class STTextBox : TextBox
|
|
{
|
|
public STTextBox()
|
|
{
|
|
BackColor = FormThemes.BaseTheme.TextEditorBackColor;
|
|
ForeColor = FormThemes.BaseTheme.TextForeColor;
|
|
BorderStyle = BorderStyle.FixedSingle;
|
|
|
|
InitializeComponent();
|
|
}
|
|
|
|
/// <summary>
|
|
/// Binds a property from the given object to the textbox
|
|
/// </summary>
|
|
/// <param name="Object"></param>
|
|
/// <param name="PropertyName"></param>
|
|
/// <param name="ResetBindings"></param>
|
|
public void Bind(object Object, string PropertyName, bool ResetBindings = true)
|
|
{
|
|
if (ResetBindings)
|
|
DataBindings.Clear();
|
|
|
|
DataBindings.Add("Text", Object, PropertyName);
|
|
}
|
|
|
|
private void InitializeComponent()
|
|
{
|
|
this.SuspendLayout();
|
|
//
|
|
// STTextBox
|
|
//
|
|
this.TextChanged += new System.EventHandler(this.STTextBox_TextChanged);
|
|
this.ResumeLayout(false);
|
|
|
|
}
|
|
|
|
private void STTextBox_TextChanged(object sender, EventArgs e)
|
|
{
|
|
if (this.Text.Length == 0) return;
|
|
|
|
foreach (Binding data in DataBindings)
|
|
{
|
|
data.WriteValue();
|
|
}
|
|
}
|
|
}
|
|
}
|