mirror of
https://github.com/KillzXGaming/Switch-Toolbox
synced 2024-11-25 05:50:22 +00:00
Few more fixes and use icon for alpha display
This commit is contained in:
parent
3af14bbc0f
commit
ae7dadf5b1
11 changed files with 35 additions and 9 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -28,13 +28,14 @@
|
|||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ImageEditorBase));
|
||||
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
|
||||
this.stPanel2 = new Switch_Toolbox.Library.Forms.STPanel();
|
||||
this.stPanel1 = new Switch_Toolbox.Library.Forms.STPanel();
|
||||
this.stPanel4 = new Switch_Toolbox.Library.Forms.STPanel();
|
||||
this.pictureBoxCustom1 = new Switch_Toolbox.Library.Forms.PictureBoxCustom();
|
||||
this.stContextMenuStrip2 = new Switch_Toolbox.Library.Forms.STContextMenuStrip();
|
||||
this.stContextMenuStrip2 = new Switch_Toolbox.Library.Forms.STContextMenuStrip(this.components);
|
||||
this.copyImageToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.stPanel3 = new Switch_Toolbox.Library.Forms.STPanel();
|
||||
this.alphaBtn = new Switch_Toolbox.Library.Forms.STButton();
|
||||
|
@ -184,7 +185,6 @@
|
|||
this.alphaBtn.BackColor = System.Drawing.Color.Transparent;
|
||||
this.alphaBtn.BackgroundImage = global::Switch_Toolbox.Library.Properties.Resources.AlphaIcon;
|
||||
this.alphaBtn.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom;
|
||||
this.alphaBtn.Enabled = false;
|
||||
this.alphaBtn.FlatAppearance.BorderSize = 0;
|
||||
this.alphaBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.alphaBtn.Location = new System.Drawing.Point(70, 3);
|
||||
|
|
|
@ -159,7 +159,9 @@ namespace Switch_Toolbox.Library.Forms
|
|||
InitializeComponent();
|
||||
|
||||
useComponentSelectorToolStripMenuItem.Checked = Runtime.ImageEditor.UseComponetSelector;
|
||||
|
||||
displayAlphaToolStripMenuItem.Checked = Runtime.ImageEditor.DisplayAlpha;
|
||||
SetAlphaEnableUI(Runtime.ImageEditor.DisplayAlpha);
|
||||
|
||||
propertiesEditor = new ImagePropertiesEditor();
|
||||
propertiesEditor.Dock = DockStyle.Fill;
|
||||
|
@ -1015,10 +1017,6 @@ namespace Switch_Toolbox.Library.Forms
|
|||
ApplyEdit(ImageCache[currentCacheIndex]);
|
||||
}
|
||||
|
||||
private void displayAlphaToolStripMenuItem_Click(object sender, EventArgs e) {
|
||||
UpdateAlphaEnable();
|
||||
}
|
||||
|
||||
private void useComponentSelectorToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (useComponentSelectorToolStripMenuItem.Checked)
|
||||
|
@ -1032,18 +1030,30 @@ namespace Switch_Toolbox.Library.Forms
|
|||
|
||||
private void UpdateAlphaEnable()
|
||||
{
|
||||
if (displayAlphaToolStripMenuItem.Checked)
|
||||
if (Runtime.ImageEditor.DisplayAlpha)
|
||||
displayAlphaToolStripMenuItem.Checked = false;
|
||||
else
|
||||
displayAlphaToolStripMenuItem.Checked = true;
|
||||
|
||||
alphaBtn.Enabled = displayAlphaToolStripMenuItem.Checked;
|
||||
SetAlphaEnableUI(displayAlphaToolStripMenuItem.Checked );
|
||||
|
||||
Runtime.ImageEditor.DisplayAlpha = displayAlphaToolStripMenuItem.Checked;
|
||||
UpdateMipDisplay();
|
||||
}
|
||||
|
||||
private void alphaBtn_Click(object sender, EventArgs e)
|
||||
private void SetAlphaEnableUI(bool UseAlpha)
|
||||
{
|
||||
if (UseAlpha)
|
||||
alphaBtn.BackgroundImage = Properties.Resources.AlphaIcon;
|
||||
else
|
||||
alphaBtn.BackgroundImage = Properties.Resources.AlphaIconDisabled;
|
||||
}
|
||||
|
||||
private void displayAlphaToolStripMenuItem_Click(object sender, EventArgs e) {
|
||||
UpdateAlphaEnable();
|
||||
}
|
||||
|
||||
private void alphaBtn_Click(object sender, EventArgs e) {
|
||||
UpdateAlphaEnable();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -80,6 +80,16 @@ namespace Switch_Toolbox.Library.Properties {
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
public static System.Drawing.Bitmap AlphaIconDisabled {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("AlphaIconDisabled", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
|
|
|
@ -361,4 +361,7 @@
|
|||
<data name="AlphaIcon" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\AlphaIcon.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="AlphaIconDisabled" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\AlphaIconDisabled.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
</root>
|
BIN
Switch_Toolbox_Library/Resources/AlphaIconDisabled.png
Normal file
BIN
Switch_Toolbox_Library/Resources/AlphaIconDisabled.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.3 KiB |
|
@ -1032,6 +1032,9 @@
|
|||
<ItemGroup>
|
||||
<None Include="Resources\AlphaIcon.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\AlphaIconDisabled.png" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<PropertyGroup>
|
||||
|
|
Loading…
Reference in a new issue