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()
|
||||
{
|
||||
pluginInterface!.SavePluginConfig(this);
|
||||
Service.PluginUI.UpdateFromConfig();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -182,7 +182,7 @@ public sealed unsafe class Plugin : IDalamudPlugin
|
|||
|
||||
_currentHwnd = (HWND) win->WindowHandle;
|
||||
|
||||
#if CRES_CLEAN
|
||||
#if CRES_CLEAN || true
|
||||
var _dev_hWnd = (IntPtr*) &dev->hWnd;
|
||||
var _dev_NewWidth = &dev->NewWidth;
|
||||
var _dev_NewHeight = &dev->NewHeight;
|
||||
|
|
|
@ -44,6 +44,11 @@ public sealed class PluginUI : IDisposable
|
|||
WindowSystem.Draw();
|
||||
}
|
||||
|
||||
public void UpdateFromConfig()
|
||||
{
|
||||
_configWindow.UpdateFromConfig();
|
||||
}
|
||||
|
||||
private void ShowConfigWindow()
|
||||
{
|
||||
SettingsVisible = true;
|
||||
|
|
|
@ -130,30 +130,17 @@ public class ConfigWindow : Window, IDisposable
|
|||
ImGui.Text("Hotkey");
|
||||
|
||||
|
||||
if (!_configIsEnabled)
|
||||
{
|
||||
ImGui.BeginDisabled();
|
||||
}
|
||||
|
||||
ImGui.Checkbox("Use scale", ref _configIsScale);
|
||||
|
||||
if (_configIsScale)
|
||||
{
|
||||
if (ImGui.InputFloat("Scale", ref _configScale, 0.01f, 0.1f, "%.3f", ImGuiInputTextFlags.EnterReturnsTrue))
|
||||
{
|
||||
save = true;
|
||||
}
|
||||
ImGui.InputFloat("Scale", ref _configScale, 0.01f, 0.1f, "%.3f", ImGuiInputTextFlags.EnterReturnsTrue);
|
||||
}
|
||||
else
|
||||
{
|
||||
ImGui.InputInt2("Size in pixels", ref _configWH[0]);
|
||||
}
|
||||
|
||||
if (!_configIsEnabled)
|
||||
{
|
||||
ImGui.EndDisabled();
|
||||
}
|
||||
|
||||
if (ImGui.BeginCombo("Borderless window workaround", _configDXVKDWMHackMode.ToHumanNameString()))
|
||||
{
|
||||
foreach (var mode in Enum.GetValues<DXVKDWMHackMode>())
|
||||
|
|
Loading…
Add table
Reference in a new issue