-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Transparency Slider in Context Menu (with typo fix) (#234)
* Update Setup Script.iss Fixed Typo in FirstRun regkey * Added transparency slider to context menu until MainForm bug is resolved. * Update Setup Script.iss Fixed Typo in FirstRun regkey (cherry picked from commit 1009c12) * Change to MACTrackBar * Fixed references to Core in x84 and x86 * Remove scripts * Some cleanup (cherry picked from commit 5d5dd49) * Use resources for string Had to fix resources generation with new Visual Studio (cherry picked from commit 41f7ccd) * Some more refactoring (cherry picked from commit f794921) * Delete backup file (cherry picked from commit bddfb9b) * Fix build --------- Co-authored-by: Michael Scrivo <mscrivo@gmail.com>
- Loading branch information
1 parent
d06e6f2
commit 4e928b0
Showing
8 changed files
with
149 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
using System; | ||
using System.Drawing; | ||
using System.Windows.Forms; | ||
using MACTrackBarLib; | ||
|
||
namespace OotD.Controls; | ||
|
||
public class TrackBarMenuItem : ToolStripControlHost | ||
{ | ||
#pragma warning disable CS3003 | ||
public MACTrackBar TrackBar { get; } | ||
#pragma warning restore CS3003 | ||
|
||
public event EventHandler? ValueChanged; | ||
|
||
public ToolTip ToolTip { get; } = new ToolTip(); // Add ToolTip property | ||
|
||
public TrackBarMenuItem() : base(new MACTrackBar()) | ||
{ | ||
TrackBar = (MACTrackBar)Control; | ||
TrackBar.Scroll += TrackBar_Scroll; | ||
} | ||
|
||
public Point Location | ||
{ | ||
get { return TrackBar.Location; } | ||
set { TrackBar.Location = value; } | ||
} | ||
|
||
public int Minimum | ||
{ | ||
get { return TrackBar.Minimum; } | ||
set { TrackBar.Minimum = value; } | ||
} | ||
|
||
public int Maximum | ||
{ | ||
get { return TrackBar.Maximum; } | ||
set { TrackBar.Maximum = value; } | ||
} | ||
|
||
public int Value | ||
{ | ||
get { return TrackBar.Value; } | ||
set { TrackBar.Value = value; } | ||
} | ||
|
||
public TickStyle TickStyle | ||
{ | ||
get { return TrackBar.TickStyle; } | ||
set { TrackBar.TickStyle = value; } | ||
} | ||
|
||
// Add more properties as needed... | ||
|
||
private void TrackBar_Scroll(object? sender, EventArgs e) | ||
{ | ||
ValueChanged?.Invoke(this, EventArgs.Empty); | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters