mtasa-resources icon indicating copy to clipboard operation
mtasa-resources copied to clipboard

Map Editor: highlight cursor

Open x-Crown opened this issue 3 months ago • 5 comments

mta-screen_2025-09-26_02-34-39 This PR introduces an additional hover highlight effect in the MTA:SA Editor. When the player hovers over an object in the map editor:

The object becomes semi-transparent.

A 3D animated bounding box is drawn around it with rainbow cycling colors (HSV → RGB).

The effect resets automatically when the cursor leaves the object

x-Crown avatar Sep 25 '25 23:09 x-Crown

In my opinion, I don't think this would be good to have enabled by default. Maybe it could be added as an option in the settings, with the default set to false.

omar-o22 avatar Sep 26 '25 11:09 omar-o22

The idea is cool. You should add a Map Editor setting to disable it. Your code looks like it was generated by AI :-) Don't write unnecessary comments

Fernando-A-Rocha avatar Sep 26 '25 12:09 Fernando-A-Rocha

it should use existing functions instead of creating a new one, this can be easily implemented through editor_main/client/main.lua, editor_main/client/gridlines.lua, also it's possible to support select/remove world object mode

q8X avatar Sep 27 '25 16:09 q8X

If we're to implement something like this, it should be highly configurable - the user should be able to enable/disable it (disabled by default), choose opacity, line thickness, line color gradients (or solid color), etc.

Lpsd avatar Dec 10 '25 18:12 Lpsd

i was going to implement this when this PR came out, but it seems like one of the recent changes to editor broke settings (kinda)

https://github.com/multitheftauto/mtasa-resources/blob/604c05e9f1d3e72fd1fad5757b008eefa6002511/%5Beditor%5D/editor_gui/client/options_backend.lua#L133-L137

this issue could delete new settings if the mapper switches to outdated editor (which is likely going to happen when mappers switch between servers)

image

q8X avatar Dec 11 '25 04:12 q8X