Cursor / GUI Replacer

Find and discuss all the latest NewGRF releases for TTDPatch and OpenTTD here.

Moderator: Graphics Moderators

Post Reply
User avatar
Andrew350
Chief Executive
Chief Executive
Posts: 740
Joined: 19 Dec 2011 07:54
Location: Washington State, USA
Contact:

Cursor / GUI Replacer

Post by Andrew350 »

gui_preview.png
gui_preview.png (84.8 KiB) Viewed 1852 times
Background

Many moons ago while playing OpenTTD with OpenGFX, I suddenly realized I was tired of loosing track of my cursor every time I moved it. I am not color blind or anything, but the orange cursor that comes standard with OpenGFX just doesn't have enough contrast with the background, leading to many instances of having to wiggle the mouse around to find it. And of course, in older versions of OpenTTD (<1.11) the mouse also tended to flicker, which made the problem MUCH worse.

So I decided to finally do something about it and modified my version of OpenGFX to make the cursor solid white. After several months of using it, and realizing I could never switch back, I decided to open a PR to include it in OpenGFX itself, but as I pretty much expected, it was denied. Since I figure I can't be the only one who might fancy such a change, I've gone ahead and made it into NewGRF form for others to use it too.

Also, I would really like playing with the original TTD graphics, but the cursor drives me crazy. It's chonky as hell and it looks...crooked. It just bothers me :lol: This GRF takes care of that...

What does it do?

This NewGRF will replace your cursor sprite(s) with a solid white one, with a parameter option available to also replace the rest of the GUI with the one from OpenGFX as well, including 2x size. It is intended to be used as a static NewGRF, but can alternatively be used as a regular NewGRF just fine.

Using this NewGRF Properly™

What is a static NewGRF, you ask? I went into some more detail in this post here, but in a nutshell it is a very simple NewGRF which can be added to a special list in your openttd.cfg so it doesn't take up a slot in your 'regular' NewGRF list. This NewGRF is the perfect candidate for such a thing :)

To add this NewGRF to your static list you must manually edit your openttd.cfg file; there is no GUI for it (yet). At the very end of the file you will see the heading: [newgrf-static]

Under this heading (which is probably empty) copy and paste the following:

Code: Select all

415A1401|gui_replacer.grf = 0
Make sure to do this when OpenTTD is not running, otherwise it will not work. Now the next time you start OpenTTD, you should have a white cursor :)

If you need help locating your openttd.cfg file, consult the OpenTTD readme. And don't worry, the above info is included in the bundled readme which ships with this NewGRF, and can be viewed anytime using the in-game viewer or your favorite text editor.

Optionally, if for some reason you don't want to do this (for example just to try it out) you can always add it to your NewGRF list the usual way, just be aware that in that case it won't be active in the main menu, multiplayer, old savegames, etc. like it will if done the proper way :)

Using the Parameter
  • By default (with parameter = 0) only the cursor sprites will be replaced. This is probably all most people need, either when using OpenGFX (which already has the rest of the UI), or for getting rid of that chonky cursor from the TTD graphics.
  • Changing this value to 1 will also replace the rest of the GUI elements with the ones from OpenGFX. This is mainly meant for the rare case where you want to use e.g. the original TTD graphics, but are more accustomed to the OpenGFX GUI. It should be noted that this option does NOT replace things like fonts, item previews, faces, etc.; only buttons and icons.
Known Issues / Limitations
  • The white cursor may be a bit difficult to see on snowy landscapes. This is the principle reason OpenGFX uses orange, but I personally find the advantage of having the higher-contrast white cursor everywhere else to be worth more than the slight difficulty of seeing it over snow. If you do not agree, do not use this NewGRF ;)
  • If using parameter = 0 (cursor only), the cursor sprites and the UI buttons may not always match up graphically, for example when using the original TTD baseset. This is very minor, however, and should hardly be noticeable.
  • If using a truly ancient version of OpenTTD, you may not be able to use this as a static NewGRF (because that concept didn't exist yet). Also it will not work at all prior to OpenTTD 1.2 because I couldn't be bothered to make it work that far back. If that is a problem for you, I cannot help you, sorry ;)
========================================

If you encounter any issues or there is something you would like to see added as an option (something you would actually use) please tell me below :) As always this NewGRF is released under the GPLv2 license and can be found on your favorite fruit store. The source bundle has been attached below.

Enjoy :)
Attachments
gui_replacer_source_1.0.zip
(1.25 MiB) Downloaded 78 times
mak
Traffic Manager
Traffic Manager
Posts: 191
Joined: 30 Sep 2015 13:16

Re: Cursor / GUI Replacer

Post by mak »

"I suddenly realized I was tired of loosing track of my cursor every time I moved it. I am not color blind"

Oh so true, I have tried this as a GRF with my existing GRFs and it works, only in a new game, not a problem for me.
May try putting it into config file but am a complete novice in doing that sort of editing.

Thank you

EDIT: now done the editing in config and it works even in saved game :D
adambishop
Engineer
Engineer
Posts: 1
Joined: 15 Apr 2021 17:07

Re: Cursor / GUI Replacer

Post by adambishop »

Thank you very much for this! I often lose track of the cursor too and have been wanting something like this for a while.
Post Reply

Return to “Graphics Releases”

Who is online

Users browsing this forum: No registered users and 2 guests