config: Update when using hotkey, disable save on enter, always enable inputs
This commit is contained in:
parent
033ba5f1f0
commit
3831b5f64f
4 changed files with 8 additions and 15 deletions
|
@ -36,6 +36,7 @@ public class Configuration : IPluginConfiguration
|
||||||
public void Save()
|
public void Save()
|
||||||
{
|
{
|
||||||
pluginInterface!.SavePluginConfig(this);
|
pluginInterface!.SavePluginConfig(this);
|
||||||
|
Service.PluginUI.UpdateFromConfig();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -182,7 +182,7 @@ public sealed unsafe class Plugin : IDalamudPlugin
|
||||||
|
|
||||||
_currentHwnd = (HWND) win->WindowHandle;
|
_currentHwnd = (HWND) win->WindowHandle;
|
||||||
|
|
||||||
#if CRES_CLEAN
|
#if CRES_CLEAN || true
|
||||||
var _dev_hWnd = (IntPtr*) &dev->hWnd;
|
var _dev_hWnd = (IntPtr*) &dev->hWnd;
|
||||||
var _dev_NewWidth = &dev->NewWidth;
|
var _dev_NewWidth = &dev->NewWidth;
|
||||||
var _dev_NewHeight = &dev->NewHeight;
|
var _dev_NewHeight = &dev->NewHeight;
|
||||||
|
|
|
@ -44,6 +44,11 @@ public sealed class PluginUI : IDisposable
|
||||||
WindowSystem.Draw();
|
WindowSystem.Draw();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void UpdateFromConfig()
|
||||||
|
{
|
||||||
|
_configWindow.UpdateFromConfig();
|
||||||
|
}
|
||||||
|
|
||||||
private void ShowConfigWindow()
|
private void ShowConfigWindow()
|
||||||
{
|
{
|
||||||
SettingsVisible = true;
|
SettingsVisible = true;
|
||||||
|
|
|
@ -130,30 +130,17 @@ public class ConfigWindow : Window, IDisposable
|
||||||
ImGui.Text("Hotkey");
|
ImGui.Text("Hotkey");
|
||||||
|
|
||||||
|
|
||||||
if (!_configIsEnabled)
|
|
||||||
{
|
|
||||||
ImGui.BeginDisabled();
|
|
||||||
}
|
|
||||||
|
|
||||||
ImGui.Checkbox("Use scale", ref _configIsScale);
|
ImGui.Checkbox("Use scale", ref _configIsScale);
|
||||||
|
|
||||||
if (_configIsScale)
|
if (_configIsScale)
|
||||||
{
|
{
|
||||||
if (ImGui.InputFloat("Scale", ref _configScale, 0.01f, 0.1f, "%.3f", ImGuiInputTextFlags.EnterReturnsTrue))
|
ImGui.InputFloat("Scale", ref _configScale, 0.01f, 0.1f, "%.3f", ImGuiInputTextFlags.EnterReturnsTrue);
|
||||||
{
|
|
||||||
save = true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ImGui.InputInt2("Size in pixels", ref _configWH[0]);
|
ImGui.InputInt2("Size in pixels", ref _configWH[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!_configIsEnabled)
|
|
||||||
{
|
|
||||||
ImGui.EndDisabled();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ImGui.BeginCombo("Borderless window workaround", _configDXVKDWMHackMode.ToHumanNameString()))
|
if (ImGui.BeginCombo("Borderless window workaround", _configDXVKDWMHackMode.ToHumanNameString()))
|
||||||
{
|
{
|
||||||
foreach (var mode in Enum.GetValues<DXVKDWMHackMode>())
|
foreach (var mode in Enum.GetValues<DXVKDWMHackMode>())
|
||||||
|
|
Loading…
Add table
Reference in a new issue