dotnet7 compat, DLSS, network manager rewrite and other fixes
This commit is contained in:
@@ -29,7 +29,7 @@ namespace Game
|
||||
public int ScrollMouseLines = 3;
|
||||
public int ScrollOffset;
|
||||
|
||||
|
||||
public bool SelectionAllowed = true;
|
||||
private bool selectionActive;
|
||||
|
||||
public Color SelectionColor = new Color(0x00, 0x7A, 0xCC);
|
||||
@@ -429,6 +429,9 @@ namespace Game
|
||||
|
||||
public override bool OnKeyDown(KeyboardKeys key)
|
||||
{
|
||||
if (!SelectionAllowed)
|
||||
return false;
|
||||
|
||||
bool shiftDown = Root.GetKey(KeyboardKeys.Shift);
|
||||
bool ctrlDown = Root.GetKey(KeyboardKeys.Control);
|
||||
|
||||
@@ -462,6 +465,9 @@ namespace Game
|
||||
|
||||
public override bool OnMouseWheel(Float2 location, float delta)
|
||||
{
|
||||
if (!SelectionAllowed)
|
||||
return false;
|
||||
|
||||
if (delta < 0)
|
||||
{
|
||||
ScrollOffset -= ScrollMouseLines;
|
||||
@@ -481,6 +487,9 @@ namespace Game
|
||||
|
||||
public override bool OnMouseDown(Float2 location, MouseButton button)
|
||||
{
|
||||
if (!SelectionAllowed)
|
||||
return false;
|
||||
|
||||
bool ret = false;
|
||||
if (button == MouseButton.Left && !IsFocused)
|
||||
{
|
||||
@@ -527,6 +536,9 @@ namespace Game
|
||||
|
||||
public override void OnMouseMove(Float2 location)
|
||||
{
|
||||
if (!SelectionAllowed)
|
||||
return;
|
||||
|
||||
if (selectionActive)
|
||||
if (HitTestText(location, out int hitLine, out int hitChar))
|
||||
{
|
||||
@@ -539,6 +551,9 @@ namespace Game
|
||||
/// <inheritdoc />
|
||||
public override bool OnMouseUp(Float2 location, MouseButton button)
|
||||
{
|
||||
if (!SelectionAllowed)
|
||||
return false;
|
||||
|
||||
if (button == MouseButton.Left)
|
||||
{
|
||||
OnSelectingEnd();
|
||||
@@ -553,6 +568,9 @@ namespace Game
|
||||
{
|
||||
base.OnMouseLeave();
|
||||
|
||||
if (!SelectionAllowed)
|
||||
return;
|
||||
|
||||
if (selectionActive)
|
||||
{
|
||||
OnSelectingEnd();
|
||||
|
||||
Reference in New Issue
Block a user