Initial commit: Complete open-source Decal rebuild
All 5 phases of the open-source Decal rebuild: Phase 1: 14 decompiled .NET projects (Interop.*, Adapter, FileService, DecalUtil) Phase 2: 10 native DLLs rewritten as C# COM servers with matching GUIDs - DecalDat, DHS, SpellFilter, DecalInput, DecalNet, DecalFilters - Decal.Core, DecalControls, DecalRender, D3DService Phase 3: C++ shims for Inject.DLL (D3D9 hooking) and LauncherHook.DLL Phase 4: DenAgent WinForms tray application Phase 5: WiX installer and build script 25 C# projects building with 0 errors. Native C++ projects require VS 2022 + Windows SDK (x86). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
commit
d1442e3747
1382 changed files with 170725 additions and 0 deletions
46
Managed/Decal.DecalControls/SliderImpl.cs
Normal file
46
Managed/Decal.DecalControls/SliderImpl.cs
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
using System.Runtime.InteropServices;
|
||||
using Decal.Interop.Controls;
|
||||
using Decal.Interop.Inject;
|
||||
|
||||
namespace Decal.DecalControls
|
||||
{
|
||||
[ComVisible(true)]
|
||||
[Guid("5D14557A-1268-43C6-A283-3B5B271359AA")]
|
||||
[ClassInterface(ClassInterfaceType.None)]
|
||||
[ComSourceInterfaces("Decal.Interop.Controls.ISliderEvents\0\0")]
|
||||
[ProgId("DecalControls.Slider")]
|
||||
public class SliderImpl : ControlBase, ISlider
|
||||
{
|
||||
public event ISliderEvents_DestroyEventHandler Destroy;
|
||||
public event ISliderEvents_ChangeEventHandler Change;
|
||||
|
||||
private IFontCache _font;
|
||||
private int _textColor;
|
||||
private int _position;
|
||||
private int _minimum;
|
||||
private int _maximum = 100;
|
||||
|
||||
public IFontCache Font { get => _font; set { _font = value; Invalidate(); } }
|
||||
public int TextColor { get => _textColor; set { _textColor = value; Invalidate(); } }
|
||||
|
||||
public int SliderPosition
|
||||
{
|
||||
get => _position;
|
||||
set
|
||||
{
|
||||
int clamped = value < _minimum ? _minimum : (value > _maximum ? _maximum : value);
|
||||
if (_position != clamped)
|
||||
{
|
||||
_position = clamped;
|
||||
Invalidate();
|
||||
Change?.Invoke(ID, _position);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public int Minimum { get => _minimum; set { _minimum = value; Invalidate(); } }
|
||||
public int Maximum { get => _maximum; set { _maximum = value; Invalidate(); } }
|
||||
|
||||
protected override void OnDestroy() => Destroy?.Invoke(ID);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue