Skip to content

Commit c089ad5

Browse files
committed
🐛 Fix OK dialog button
1 parent 6f8d3d8 commit c089ad5

File tree

3 files changed

+2
-63
lines changed

3 files changed

+2
-63
lines changed

SRC/Aura_OS/Properties/VersionInfo.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ namespace Aura_OS
22
{
33
public class VersionInfo
44
{
5-
public static string revision = "280220241720";
5+
public static string revision = "280220241724";
66
}
77
}

SRC/Aura_OS/System/Graphics/UI/GUI/Dialog.cs

Lines changed: 1 addition & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,8 @@
66

77
using System;
88
using System.Collections.Generic;
9-
using System.Runtime.InteropServices;
10-
using Aura_OS.System.Graphics.UI.GUI.Components;
11-
using Cosmos.System;
129
using Cosmos.System.Graphics;
10+
using Aura_OS.System.Graphics.UI.GUI.Components;
1311

1412
namespace Aura_OS.System.Graphics.UI.GUI
1513
{
@@ -20,12 +18,6 @@ internal class Dialog : Window
2018
private List<Button> _buttons;
2119
private Bitmap AlertIcon;
2220

23-
private int _px;
24-
private int _py;
25-
private bool _lck = false;
26-
private bool _pressed;
27-
private bool _hasWindowMoving = false;
28-
2921
public Dialog(string title, string message, int x, int y) : base(title, x, y, 302, 119, false, false)
3022
{
3123
_title = title;
@@ -55,48 +47,6 @@ public void AddButton(string buttonText, Action onClickAction)
5547
AddChild(newButton);
5648
}
5749

58-
public override void Update()
59-
{
60-
base.Update();
61-
62-
if (Kernel.MouseManager.IsLeftButtonDown)
63-
{
64-
if (!_hasWindowMoving && Close.IsInside((int)MouseManager.X, (int)MouseManager.Y))
65-
{
66-
Close.Click();
67-
68-
return;
69-
}
70-
else if (!_hasWindowMoving && TopBar.IsInside((int)MouseManager.X, (int)MouseManager.Y))
71-
{
72-
_hasWindowMoving = true;
73-
74-
_pressed = true;
75-
if (!_lck)
76-
{
77-
_px = (int)MouseManager.X - X;
78-
_py = (int)MouseManager.Y - Y;
79-
_lck = true;
80-
}
81-
}
82-
}
83-
else
84-
{
85-
_pressed = false;
86-
_lck = false;
87-
_hasWindowMoving = false;
88-
}
89-
90-
if (_pressed)
91-
{
92-
X = (int)(MouseManager.X - _px);
93-
Y = (int)(MouseManager.Y - _py);
94-
95-
X = (int)(MouseManager.X - _px + 3);
96-
Y = (int)(MouseManager.Y - _py + TopBar.Height + 3);
97-
}
98-
}
99-
10050
public override void Draw()
10151
{
10252
base.Draw();

SRC/Aura_OS/System/Processing/Applications/EditorApp.cs

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -61,17 +61,6 @@ public EditorApp(string filePath, int width, int height, int x = 0, int y = 0)
6161
}
6262
MarkDirty();
6363
}));
64-
_dialog.Close.Click = new Action(() =>
65-
{
66-
_showDialog = false;
67-
_dialog.Visible = false;
68-
69-
foreach (var child in Window.Children)
70-
{
71-
child.MarkDirty();
72-
}
73-
MarkDirty();
74-
});
7564
AddChild(_dialog);
7665
}
7766

0 commit comments

Comments
 (0)