NewObjects main tool tip caption bug

Got a problem with TTDPatch? Get help here.

Moderator: TTDPatch Moderators

Post Reply
User avatar
WWTBAM
Moderator
Moderator
Posts: 3689
Joined: 02 Apr 2005 07:01
Location: Sydney NSW Antipodea
Contact:

NewObjects main tool tip caption bug

Post by WWTBAM »

The tool tip for the NewObjects button on the main tool bar says "Save music settings to disk".
Formerly known as r0b0t_b0y2003, robotboy, roboboy and beclawat. The best place to get the most recent nightly builds of TTDPatch is: http://roboboy.users.tt-forums.net/TTDPatch/nightlies/
User avatar
Lakie
TTDPatch Developer
TTDPatch Developer
Posts: 1799
Joined: 26 May 2004 16:37
Location: Britain
Contact:

Re: NewObjects main tool tool tip caption bug

Post by Lakie »

That would appear to be the textid (0x1F9) stored for the tool-tip for that button, yes.
I imagine it'd require adding a new string (e.g. "\98Build NewGRF Object") which is then stored as the tool-tip.
It shouldn't be too hard to change, but I don't have any capacity to compile or test TTDPatch currently to check for quirks (or bugs).

~ Lakie
TTDpatch Developer 2005 - 2010 ~ It all started because of shortened vehicle not loading correctly, now look where I've gone with it!
Grfs coded ~ Finnish Train Set (Teaser) | Bm73 (Release 3) | Emu 680 (Release 3)| Glass Station (Release 1) | UK Roadset (Version 1.1a) | New Water Coasts (Version 7)
Pikka: "Lakie's a good coder, but before he'll add any feature to TTDP you have to convince him that you're not going to use it to destroy the world as we know it."
User avatar
orudge
Administrator
Administrator
Posts: 25129
Joined: 26 Jan 2001 20:18
Skype: orudge
Location: Banchory, UK
Contact:

Re: NewObjects main tool tool tip caption bug

Post by orudge »

These sorts of things should probably go into the bug tracker, if not there already. Whether there are any developers who could fix them is another matter!
User avatar
Lakie
TTDPatch Developer
TTDPatch Developer
Posts: 1799
Joined: 26 May 2004 16:37
Location: Britain
Contact:

Re: NewObjects main tool tool tip caption bug

Post by Lakie »

Most likely, however I imagine not may people look at the bug tracker these days, (me included).
I'm unable to compile TTDPatch at present (due to changes with Cygwin), but I believe these changes should work.
(Hopefully someone can test these changes).

~ Lakie
Attachments
Tool-tip.patch
(1.48 KiB) Downloaded 447 times
TTDpatch Developer 2005 - 2010 ~ It all started because of shortened vehicle not loading correctly, now look where I've gone with it!
Grfs coded ~ Finnish Train Set (Teaser) | Bm73 (Release 3) | Emu 680 (Release 3)| Glass Station (Release 1) | UK Roadset (Version 1.1a) | New Water Coasts (Version 7)
Pikka: "Lakie's a good coder, but before he'll add any feature to TTDP you have to convince him that you're not going to use it to destroy the world as we know it."
User avatar
WWTBAM
Moderator
Moderator
Posts: 3689
Joined: 02 Apr 2005 07:01
Location: Sydney NSW Antipodea
Contact:

Re: NewObjects main tool tip caption bug

Post by WWTBAM »

I submitted it to the bug tracker as well.
http://projects.tt-forums.net/issues/199
Formerly known as r0b0t_b0y2003, robotboy, roboboy and beclawat. The best place to get the most recent nightly builds of TTDPatch is: http://roboboy.users.tt-forums.net/TTDPatch/nightlies/
User avatar
Lakie
TTDPatch Developer
TTDPatch Developer
Posts: 1799
Joined: 26 May 2004 16:37
Location: Britain
Contact:

Re: NewObjects main tool tip caption bug

Post by Lakie »

Finally managed to get it compiled under a Ubuntu VM, seems to work as expected although "\98Build objects" may be a better caption. Any thoughts?

~ Lakie
TTDpatch Developer 2005 - 2010 ~ It all started because of shortened vehicle not loading correctly, now look where I've gone with it!
Grfs coded ~ Finnish Train Set (Teaser) | Bm73 (Release 3) | Emu 680 (Release 3)| Glass Station (Release 1) | UK Roadset (Version 1.1a) | New Water Coasts (Version 7)
Pikka: "Lakie's a good coder, but before he'll add any feature to TTDP you have to convince him that you're not going to use it to destroy the world as we know it."
User avatar
WWTBAM
Moderator
Moderator
Posts: 3689
Joined: 02 Apr 2005 07:01
Location: Sydney NSW Antipodea
Contact:

Re: NewObjects main tool tip caption bug

Post by WWTBAM »

OpenTTD uses "Place Object. ..." it also includes text about shift displaying the estimate but none of TTD's do that, so I would go for either "Build object" or "Place object".
Formerly known as r0b0t_b0y2003, robotboy, roboboy and beclawat. The best place to get the most recent nightly builds of TTDPatch is: http://roboboy.users.tt-forums.net/TTDPatch/nightlies/
User avatar
Lakie
TTDPatch Developer
TTDPatch Developer
Posts: 1799
Joined: 26 May 2004 16:37
Location: Britain
Contact:

Re: NewObjects main tool tip caption bug

Post by Lakie »

"Place object" sounds better, bit misleading in there's a cost attached...
I believe the majority of the object gui lacks tool-tips, so it might be worth me looking into including those also.
(Mainly the title, class and object selections and the object variant selection*).

* - Only for objects with 2-4 views, no point when just single view.

~ Lakie
TTDpatch Developer 2005 - 2010 ~ It all started because of shortened vehicle not loading correctly, now look where I've gone with it!
Grfs coded ~ Finnish Train Set (Teaser) | Bm73 (Release 3) | Emu 680 (Release 3)| Glass Station (Release 1) | UK Roadset (Version 1.1a) | New Water Coasts (Version 7)
Pikka: "Lakie's a good coder, but before he'll add any feature to TTDP you have to convince him that you're not going to use it to destroy the world as we know it."
User avatar
WWTBAM
Moderator
Moderator
Posts: 3689
Joined: 02 Apr 2005 07:01
Location: Sydney NSW Antipodea
Contact:

Re: NewObjects main tool tip caption bug

Post by WWTBAM »

The rest of the TTD tooltips use build though.
Formerly known as r0b0t_b0y2003, robotboy, roboboy and beclawat. The best place to get the most recent nightly builds of TTDPatch is: http://roboboy.users.tt-forums.net/TTDPatch/nightlies/
User avatar
WWTBAM
Moderator
Moderator
Posts: 3689
Joined: 02 Apr 2005 07:01
Location: Sydney NSW Antipodea
Contact:

Re: NewObjects main tool tip caption bug

Post by WWTBAM »

Some suggestions for the view selection, "Select object direction" or "Select object view. I would say for consistency with the train station window, the class drop down shouldn't have a tooltip same with the object drop down.

Edit: Can I have a couple of days to see if I can work out how to set the tooltip for the views?
Edit again: I can not find any new or modified windows except the Dock/water toolbar that have had their tooltips fixed or added. Eg the Tram toolbar still says road, truck or bus where they are correct for Roads. So I think, scratch my previous comment about giving me a few days to see if I can work out how to add the tooltips to the Objects Window. I will try and learn from what you change in objects.asm and try to fix the Tram toolbar myself.
Formerly known as r0b0t_b0y2003, robotboy, roboboy and beclawat. The best place to get the most recent nightly builds of TTDPatch is: http://roboboy.users.tt-forums.net/TTDPatch/nightlies/
User avatar
Lakie
TTDPatch Developer
TTDPatch Developer
Posts: 1799
Joined: 26 May 2004 16:37
Location: Britain
Contact:

Re: NewObjects main tool tip caption bug

Post by Lakie »

The Object gui is in objects.asm, I imagine it'll be in the window definition most likely.
I was thinking of making the view 'buttons' similarly tool-tipped to the other directional selction windows, likely using 'variant' instead of view or direction.

~ Lakie
TTDpatch Developer 2005 - 2010 ~ It all started because of shortened vehicle not loading correctly, now look where I've gone with it!
Grfs coded ~ Finnish Train Set (Teaser) | Bm73 (Release 3) | Emu 680 (Release 3)| Glass Station (Release 1) | UK Roadset (Version 1.1a) | New Water Coasts (Version 7)
Pikka: "Lakie's a good coder, but before he'll add any feature to TTDP you have to convince him that you're not going to use it to destroy the world as we know it."
User avatar
WWTBAM
Moderator
Moderator
Posts: 3689
Joined: 02 Apr 2005 07:01
Location: Sydney NSW Antipodea
Contact:

Re: NewObjects main tool tip caption bug

Post by WWTBAM »

I also noticed that right clicking the view buttons activates them as though they had been right clicked. I suspect that issue might go away once we have tool tips for them.
Formerly known as r0b0t_b0y2003, robotboy, roboboy and beclawat. The best place to get the most recent nightly builds of TTDPatch is: http://roboboy.users.tt-forums.net/TTDPatch/nightlies/
User avatar
Lakie
TTDPatch Developer
TTDPatch Developer
Posts: 1799
Joined: 26 May 2004 16:37
Location: Britain
Contact:

Re: NewObjects main tool tip caption bug

Post by Lakie »

That's quite possible, ideally the tool-tips are handled with-in the click handler. Sounds like it needs coded added for handling right click events for generating the tool-tips.
I'll look into it some-time, shouldn't be overly difficult to add (hopefully).

~ Lakie
TTDpatch Developer 2005 - 2010 ~ It all started because of shortened vehicle not loading correctly, now look where I've gone with it!
Grfs coded ~ Finnish Train Set (Teaser) | Bm73 (Release 3) | Emu 680 (Release 3)| Glass Station (Release 1) | UK Roadset (Version 1.1a) | New Water Coasts (Version 7)
Pikka: "Lakie's a good coder, but before he'll add any feature to TTDP you have to convince him that you're not going to use it to destroy the world as we know it."
User avatar
WWTBAM
Moderator
Moderator
Posts: 3689
Joined: 02 Apr 2005 07:01
Location: Sydney NSW Antipodea
Contact:

Re: NewObjects main tool tip caption bug

Post by WWTBAM »

I presume I need to set up a guiwindow block of type cWinTypeToolTip as there is now cWinElemToolTip? Or am I completely seeing how the GUI system works wrong?

An example of what I was thinking:

Code: Select all

guiwindow cWinTypeToolTip,230,195
	guicaption cColorSchemeCream, ourtext(objectgui_title)
endguiwindow
I was trying to work it out using the code that sets up the objects window and reading inc/window.inc. I couldn't find definitions for guiwindow, guicaption and guiele to determine exactly what the parameters do. I was then going to attempt to display the window in the click handler.
Formerly known as r0b0t_b0y2003, robotboy, roboboy and beclawat. The best place to get the most recent nightly builds of TTDPatch is: http://roboboy.users.tt-forums.net/TTDPatch/nightlies/
User avatar
Lakie
TTDPatch Developer
TTDPatch Developer
Posts: 1799
Joined: 26 May 2004 16:37
Location: Britain
Contact:

Re: NewObjects main tool tip caption bug

Post by Lakie »

I don't think that's quite how it should be done, whilst TTDPatch lacks solid examples of how to do tool-tips, TTD checked for a right mouse click in the click event handler, branching to code which generates the tool-tip.
Given the majority of the TTDPatch GUI's do not currently use tool-tips, I may have to look at how TTD actually generates them...

~ Lakie
TTDpatch Developer 2005 - 2010 ~ It all started because of shortened vehicle not loading correctly, now look where I've gone with it!
Grfs coded ~ Finnish Train Set (Teaser) | Bm73 (Release 3) | Emu 680 (Release 3)| Glass Station (Release 1) | UK Roadset (Version 1.1a) | New Water Coasts (Version 7)
Pikka: "Lakie's a good coder, but before he'll add any feature to TTDP you have to convince him that you're not going to use it to destroy the world as we know it."
User avatar
WWTBAM
Moderator
Moderator
Posts: 3689
Joined: 02 Apr 2005 07:01
Location: Sydney NSW Antipodea
Contact:

Re: NewObjects main tool tip caption bug

Post by WWTBAM »

ok. I think we can put these tooltips (excluding the main toolbar one) as features that can wait till you have time.
Formerly known as r0b0t_b0y2003, robotboy, roboboy and beclawat. The best place to get the most recent nightly builds of TTDPatch is: http://roboboy.users.tt-forums.net/TTDPatch/nightlies/
Post Reply

Return to “Problems with TTDPatch”

Who is online

Users browsing this forum: No registered users and 3 guests