scripts icon indicating copy to clipboard operation
scripts copied to clipboard

`gui/probe` candidate

Open MagistrumT-T opened this issue 1 year ago • 4 comments

I tempted some vengeful deity by mentioning work downtime and got swamped this week. This creates a tool that will run probe on the position of the mouse and show it in a window in the right corner of the screen. Left click locks on a tile.

I chose the same window that gui/design uses, it feels comfortable there. I'm not sure about pausing the game, maybe someone could be trying to check something changing in realtime?

I should probably let the map movement keys go through, someone might be trying to check something on multiple z-levels.

Probe spits out a lot of lines, which is fine because the widgets have auto scrollbar feature for big elements. Sadly, updating the frame resets the scrolling position. So every time I move the mouse to check another tile it will snap back to the top and I have to scroll down again to see the light tags and such.

Outside of ASCII mode it is actually kind of difficult to discern where a tile ends and another begins sometimes, definitely add a transparent or blinking cursor to help pinpoint which tile is being probed, specially if locked on a tile.

It works fine as is, but I'll keep committing to this while the PR is open.

MagistrumT-T avatar Feb 07 '24 02:02 MagistrumT-T

Outside of ASCII mode it is actually kind of difficult to discern where a tile ends and another begins sometimes, definitely add a transparent or blinking cursor to help pinpoint which tile is being probed, specially if locked on a tile.

See gui/quickfort for a blue marker that indicates the hovered tile. Alternately, you could choose a boundary-with-center-dot cursor like gui/pathable

myk002 avatar Feb 09 '24 06:02 myk002

gui/quickfort and gui/pathable do it via C++, right? I was trying to avoid it, so I used the map overlay thing gui/design uses.

MagistrumT-T avatar Feb 12 '24 03:02 MagistrumT-T

gui/quickfort and gui/pathable do it via C++, right? I was trying to avoid it, so I used the map overlay thing gui/design uses.

gui/pathable does it with C++, but gui/blueprint and gui/quickfort do it in pure Lua. I was just mentioning gui/pathable for its choice of tile highlight cursor, which you can just as easily use from Lua.

myk002 avatar Feb 13 '24 02:02 myk002

gui/quickfort indeed does the exact blink behavior I wished for in lua, I have no idea how I missed it. I think I looked a gui/pathable and stopped searching? Anyways, It looks great!

MagistrumT-T avatar Feb 15 '24 02:02 MagistrumT-T