The International Simutrans Forum

Development => Patches & Projects => Topic started by: An_dz on December 12, 2013, 08:57:10 PM

Title: Wrong D_EDIT_*
Post by: An_dz on December 12, 2013, 08:57:10 PM
There's a problem with D_EDIT_* in gui_theme.cc, the height is wrong when you use non-default sizes for your theme.

This is because it's loaded too early in the code, before arrows heights are finally defined, it should be moved to the bottom after the heights are calculated.

I don't know where it's better to send it to, here I just moved to the very bottom, right before return. I think it's the safest place. There are 2 typos fixed too. ;D
Title: Re: Wrong D_EDIT_*
Post by: prissi on December 12, 2013, 09:43:31 PM
Well, but then how do you customize it. Its rather goes into the the init from images. Well spotted, thank you.
Title: Re: Wrong D_EDIT_*
Post by: An_dz on December 13, 2013, 02:29:42 PM
I thought there was no need to customize it through theme.tab because it has to be max(LINESPACE, max(D_ARROW_LEFT_HEIGHT, D_ARROW_RIGHT_HEIGHT) ). It would look strange define a number smaller than LINESPACE.
Title: Re: Wrong D_EDIT_*
Post by: prissi on December 13, 2013, 09:42:08 PM
But larger is certainly an option, or? Like to have easy to touch it with a finger.
Title: Re: Wrong D_EDIT_*
Post by: An_dz on December 13, 2013, 11:52:32 PM
But then you would have already made a touch arrow. D_ARROW_(LEFT|RIGHT)_HEIGHT
Title: Re: Wrong D_EDIT_*
Post by: prissi on December 15, 2013, 09:32:04 PM
If you want editboxes larger than the arrow and linespace, you need this. Or you would get very wide scrollbars. Hmm.
Title: Re: Wrong D_EDIT_*
Post by: An_dz on December 16, 2013, 02:00:19 AM
But there's no point in not creating big arrows for touch layout. Or how would you choose the player or change building rotation?