Page 1 of 1

NewObjects main tool tip caption bug

Posted: 30 Jul 2013 14:15
by WWTBAM
The tool tip for the NewObjects button on the main tool bar says "Save music settings to disk".

Re: NewObjects main tool tool tip caption bug

Posted: 30 Jul 2013 15:26
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

Re: NewObjects main tool tool tip caption bug

Posted: 30 Jul 2013 16:44
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!

Re: NewObjects main tool tool tip caption bug

Posted: 30 Jul 2013 17:43
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

Re: NewObjects main tool tip caption bug

Posted: 31 Jul 2013 02:41
by WWTBAM
I submitted it to the bug tracker as well.
http://projects.tt-forums.net/issues/199

Re: NewObjects main tool tip caption bug

Posted: 31 Jul 2013 22:58
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

Re: NewObjects main tool tip caption bug

Posted: 01 Aug 2013 06:26
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".

Re: NewObjects main tool tip caption bug

Posted: 01 Aug 2013 12:12
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

Re: NewObjects main tool tip caption bug

Posted: 01 Aug 2013 13:23
by WWTBAM
The rest of the TTD tooltips use build though.

Re: NewObjects main tool tip caption bug

Posted: 02 Aug 2013 09:08
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.

Re: NewObjects main tool tip caption bug

Posted: 02 Aug 2013 15:50
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

Re: NewObjects main tool tip caption bug

Posted: 02 Aug 2013 16:03
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.

Re: NewObjects main tool tip caption bug

Posted: 02 Aug 2013 17:19
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

Re: NewObjects main tool tip caption bug

Posted: 03 Aug 2013 03:20
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.

Re: NewObjects main tool tip caption bug

Posted: 03 Aug 2013 15:19
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

Re: NewObjects main tool tip caption bug

Posted: 03 Aug 2013 15:23
by WWTBAM
ok. I think we can put these tooltips (excluding the main toolbar one) as features that can wait till you have time.