Skip to content

Mouse doesn't work. #88

@Siomek101

Description

@Siomek101

Describe the bug

Mouse doesn't move.

To Reproduce

My code:
`using PrismAPI.Hardware.GPU;
using Cosmos.System;
using PrismAPI.Graphics;
using PrismAPI.UI;
using PrismAPI.UI.Controls;
using System.Numerics;

namespace Renderingindimension
{
public class Program : Kernel
{
public Display Canvas = null!;
public Window MyWindow = null!;
public Label MyLabel = null!;
public Textbox MyTextBox = null!;

    protected override void BeforeRun()
    {

        Canvas = Display.GetDisplay(800, 600); // Define the canvas instance.
        MyWindow = new Window(50, 50, 500, 400, "My Window");
        MyLabel = new(50, 55, $"{Canvas.GetFPS()} FPS");
        MyTextBox = new(30, 30, "i dunno man", "");

        MyWindow.Controls.Add(MyLabel);
        MyWindow.Controls.Add(MyTextBox);
        WindowManager.Windows.Add(MyWindow);
    }

    protected override void Run()
    {
        while (true)
        {
            Canvas.Clear(Color.CoolGreen); // Draw a green background.
            MyWindow.X += 1;
            WindowManager.Update(Canvas);
            Canvas.DrawFilledRectangle((int)MouseManager.X, (int)MouseManager.Y, 16, 16, 0, Color.StackOverflowOrange); // Draw the mouse.
            Canvas.DrawFilledTriangle(new PrismAPI.Graphics.Rasterizer.Triangle(new Vector3(40, 40, 0), new Vector3(50, 50, 0), new Vector3(35, 75, 0), Color.Red));
            Canvas.Update();
        }
        
    }
}

}
`
I ran it and it moved the window, but not the mouse

Expected behavior

Mouse is working

Screenshots

If applicable, add screenshots to help explain your problem.

Additional context

Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions