mirror of
https://github.com/4sval/FModel.git
synced 2026-08-26 03:14:39 -05:00
ctrl s
This commit is contained in:
@@ -23,30 +23,29 @@ public static class ImGuiExtensions
|
||||
ImGui.SetNextWindowPos(new Vector2(0, 0));
|
||||
ImGui.SetNextWindowSize(new Vector2(size.X, size.Y));
|
||||
ImGui.Begin("Snooper", flags);
|
||||
ImGui.DockSpace(ImGui.GetID("Snooper"));
|
||||
ImGui.DockSpace(0);
|
||||
}
|
||||
|
||||
public static void DrawNavbar()
|
||||
{
|
||||
if (ImGui.BeginMainMenuBar())
|
||||
if (!ImGui.BeginMainMenuBar()) return;
|
||||
|
||||
if (ImGui.BeginMenu("Edit"))
|
||||
{
|
||||
if (ImGui.BeginMenu("Edit"))
|
||||
{
|
||||
if (ImGui.MenuItem("Undo", "CTRL+Z")) {}
|
||||
if (ImGui.MenuItem("Redo", "CTRL+Y", false, false)) {} // Disabled item
|
||||
ImGui.Separator();
|
||||
if (ImGui.MenuItem("Cut", "CTRL+X")) {}
|
||||
if (ImGui.MenuItem("Copy", "CTRL+C")) {}
|
||||
if (ImGui.MenuItem("Paste", "CTRL+V")) {}
|
||||
ImGui.EndMenu();
|
||||
}
|
||||
|
||||
const string text = "Press ESC to Exit...";
|
||||
ImGui.SetCursorPosX(ImGui.GetWindowViewport().WorkSize.X - ImGui.CalcTextSize(text).X - 5);
|
||||
ImGui.TextColored(new Vector4(0.36f, 0.42f, 0.47f, 1.00f), text); // ImGuiCol.TextDisabled
|
||||
|
||||
ImGui.EndMainMenuBar();
|
||||
if (ImGui.MenuItem("Undo", "CTRL+Z")) {}
|
||||
if (ImGui.MenuItem("Redo", "CTRL+Y", false, false)) {} // Disabled item
|
||||
ImGui.Separator();
|
||||
if (ImGui.MenuItem("Cut", "CTRL+X")) {}
|
||||
if (ImGui.MenuItem("Copy", "CTRL+C")) {}
|
||||
if (ImGui.MenuItem("Paste", "CTRL+V")) {}
|
||||
ImGui.EndMenu();
|
||||
}
|
||||
|
||||
const string text = "Press ESC to Exit...";
|
||||
ImGui.SetCursorPosX(ImGui.GetWindowViewport().WorkSize.X - ImGui.CalcTextSize(text).X - 5);
|
||||
ImGui.TextColored(new Vector4(0.36f, 0.42f, 0.47f, 1.00f), text); // ImGuiCol.TextDisabled
|
||||
|
||||
ImGui.EndMainMenuBar();
|
||||
}
|
||||
|
||||
public static void DrawFPS()
|
||||
|
||||
@@ -140,7 +140,7 @@ namespace FModel.Settings
|
||||
set => SetProperty(ref _isLoggerExpanded, value);
|
||||
}
|
||||
|
||||
private GridLength _avalonImageSize = GridLength.Auto;
|
||||
private GridLength _avalonImageSize = new (200, GridUnitType.Pixel);
|
||||
public GridLength AvalonImageSize
|
||||
{
|
||||
get => _avalonImageSize;
|
||||
|
||||
@@ -127,7 +127,10 @@ public class Snooper
|
||||
_gl = GL.GetApi(_window);
|
||||
_gl.Enable(EnableCap.Multisample);
|
||||
|
||||
_controller = new ImGuiController(_gl, _window, input);
|
||||
// we don't need to bother with file check
|
||||
// but keep an eye on font size for different monitors
|
||||
var fontConfig = new ImGuiFontConfig("C:\\Windows\\Fonts\\segoeui.ttf", 16);
|
||||
_controller = new ImGuiController(_gl, _window, input, fontConfig);
|
||||
|
||||
ImGuiExtensions.Theme();
|
||||
|
||||
@@ -205,6 +208,7 @@ public class Snooper
|
||||
|
||||
private void OnUpdate(double deltaTime)
|
||||
{
|
||||
if (ImGui.GetIO().WantTextInput) return;
|
||||
var multiplier = _keyboard.IsKeyPressed(Key.ShiftLeft) ? 2f : 1f;
|
||||
var moveSpeed = _camera.Speed * multiplier * (float) deltaTime;
|
||||
if (_keyboard.IsKeyPressed(Key.W))
|
||||
|
||||
Reference in New Issue
Block a user