armory3d / armory3d/armory

Support for SetCustomCursor in Krom

Open
#2,872 2 comments 0 reactions 0 assignees View on GitHub
feature request kha
Dominant language
C++
Stars
3.3k
Forks
353
Avg merge
3d 16h
Merged PRs (30d)
1

Description

Krom dont supports change the cursor via kha.input.Mouse.setSystemCursor().

It was nice to have this possibility.

`package arm;

import kha.Image;

class MouseCursorHandler extends iron.Trait {

var current_mouse = kha.input.Mouse.get();
var custom_mouse_image: Image;

public function new() {
super();

notifyOnInit(OnInit);

}

function OnInit() {
iron.data.Data.getImage("DefaultCursor.png", (image: Image) -> {
custom_mouse_image = image;

current_mouse.setSystemCursor(kha.input.Mouse.MouseCursor.Custom(custom_mouse_image));

});
}
}
`
With this code above the mouse cursor is changed when exporting to Web, but in Krom this don't work.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by tracing kha.input.Mouse.setSystemCursor() and the Krom path, then compare it with the working Web behavior described in the issue. Done means the provided custom cursor example changes the cursor when exported to Krom as well as on Web.

Written by the indexing model from the issue text.

Assessment

Domain
game-dev
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.