Page 1 of 4

[OTTD] OpenGFX+ Big GUI (Double Sized GUI) [WIP]

Posted: 16 Sep 2010 22:11
by Zephyris
Got a touchscreen and fat fingers?
Got a dodgy old ball mouse that isn't very accurate?

This is the thread for you! Double size GUI - work now in progress.

Re: [Univ] Big GUI (Double Sized GUI) [WIP]

Posted: 17 Sep 2010 05:33
by planetmaker
Very nice to see work on that :-)

Re: [OTTD] Big GUI (Double Sized GUI) [WIP]

Posted: 17 Sep 2010 08:08
by FooBar
Good work, but it's actually quadruple sized :wink: If you want double size you need to multiply the x and y dimensions with sqrt(2) rather than 2 :mrgreen:

Will you be including larger fonts as well?

Re: [OTTD] Big GUI (Double Sized GUI) [WIP]

Posted: 17 Sep 2010 08:34
by Zephyris
Yeah, I was planning on making some larger fonts (or rather using the existing normal font as the small font and making a large sans serif font for the rest of the dialogs - cba to change the newspaper font though). If anyone wants to help with that I would gladly accept some sprites :)

Re: [OTTD] Big GUI (Double Sized GUI) [WIP]

Posted: 17 Sep 2010 15:12
by Rubidium
Larger fonts might be a big problem as OpenTTD makes assumptions on the font size, i.e. it's hardcoded font sprite fonts. It might be possible to detect the size of a font though by scanning through all the font sprites.

Re: [OTTD] Big GUI (Double Sized GUI) [WIP]

Posted: 17 Sep 2010 16:13
by Zephyris
Sounds like a magic number to me :) It would be nice if OpenTTD could support alternative bitmap font sizes...

Re: [OTTD] Big GUI (Double Sized GUI) [WIP]

Posted: 17 Sep 2010 16:21
by Yexo
As before: send me a test grf and I'll take a look at it. This project is interesting.

Re: [OTTD] Big GUI (Double Sized GUI) [WIP]

Posted: 17 Sep 2010 19:41
by Zephyris
Cool, I'll let you know when I have a grf in place... I'll finish the GUI elements first though.

Re: [OTTD] Big GUI (Double Sized GUI) [WIP]

Posted: 17 Sep 2010 23:09
by Zephyris
A little coding question:
I am trying to replace the electric rail, canal and tram GUI elements but it doesn't seem to be working... This is the code I have tried:

Code: Select all

  215 * 4     05 85 04 25
  216 sprites/biggui5.pcx 642 712 09 40 40 0 0
  217 sprites/biggui5.pcx 690 712 09 40 40 0 0
  218 sprites/biggui5.pcx 738 712 09 40 40 0 0
  219 sprites/biggui5.pcx 2 776 09 40 40 0 0
  220 * 4     05 85 01 2D
  221 sprites/biggui5.pcx 66 776 09 40 40 0 0
  222 * 4     05 88 01 41
  223 sprites/biggui5.pcx 130 776 09 40 40 0 0
  224 * 4     05 8B 02 01
  225 sprites/biggui5.pcx 194 776 09 40 40 0 4
  226 sprites/biggui5.pcx 242 776 09 40 40 0 4
The action5 wiki entry says "Bit 7 may only be set if the type supports it.", is this the problem?

Re: [OTTD] Big GUI (Double Sized GUI) [WIP]

Posted: 18 Sep 2010 00:07
by Zephyris
Done some more work on the GUI, it is now essentially complete (excluding fonts). For the download see the first post. There are quite a lot of little bugs with widget resizing - particularly scrollbar arrows and exit arrow crosses, although it is generally useable. For best results use the latest nightly.

Re: [OTTD] Big GUI (Double Sized GUI) [WIP]

Posted: 18 Sep 2010 11:48
by FooBar
Zephyris wrote:A little coding question:
I am trying to replace the electric rail, canal and tram GUI elements but it doesn't seem to be working...

The action5 wiki entry says "Bit 7 may only be set if the type supports it.", is this the problem?
Correct. You can only set bit 7 for types 14 to 16. So there's no other way than including all other sprites of the type as well.
I recall me asking to have that available for the other types as well, maybe now is the time to implement it :)

Re: [OTTD] OpenGFX+ Big GUI (Double Sized GUI) [WIP]

Posted: 18 Sep 2010 18:35
by Zephyris
I definitely think it would be worth implementing! Do you know if there is any technical reason in particular as to why these sets are not supported for partial sprite replacement?

*edit* I setup a thread to discuss it here: http://www.tt-forums.net/viewtopic.php?f=68&t=50133

Re: [OTTD] OpenGFX+ Big GUI (Double Sized GUI) [WIP]

Posted: 23 Dec 2010 15:41
by Zephyris
Now on Bananas... Hopefully future versions of OpenTTD will allow more grfs like this :)

Re: [OTTD] OpenGFX+ Big GUI (Double Sized GUI) [WIP]

Posted: 11 Oct 2011 11:13
by peter1138
"Digging The Grave"

So I'm working on giving OpenTTD the love it needs to support Big GUI properly and found a bug in the version of Big GUI on bananas: the up and down arrows (sprites 116 and 117 are reversed). OpenTTD expects down, up, left and right.

Re: [OTTD] OpenGFX+ Big GUI (Double Sized GUI) [WIP]

Posted: 11 Oct 2011 11:28
by planetmaker
While at it, it will also need support for the new GUI sprites, namely at least the group autoreplace indicators (not sure about previous GUI additions)

Re: [OTTD] OpenGFX+ Big GUI (Double Sized GUI) [WIP]

Posted: 11 Oct 2011 12:28
by FooBar
petern wrote:properly
Good to see you working on OpenTTD again!

Just a question, does "properly" also include the main menu?

Re: [OTTD] OpenGFX+ Big GUI (Double Sized GUI) [WIP]

Posted: 11 Oct 2011 12:47
by Zephyris
petern wrote:So I'm working on giving OpenTTD the love it needs to support Big GUI properly and found a bug in the version of Big GUI on bananas: the up and down arrows (sprites 116 and 117 are reversed). OpenTTD expects down, up, left and right.
First of all: awesome! Thanks for supporting what I think is a very valuable endevour!

I will look into that bug (and the missing sprites planetmaker pointed out). Unfortunately, as with all my grfs, there is no logical source; I just read the raw nfo :twisted:

Re: [OTTD] OpenGFX+ Big GUI (Double Sized GUI) [WIP]

Posted: 11 Oct 2011 12:52
by planetmaker
Zephyris wrote:
petern wrote:So I'm working on giving OpenTTD the love it needs to support Big GUI properly and found a bug in the version of Big GUI on bananas: the up and down arrows (sprites 116 and 117 are reversed). OpenTTD expects down, up, left and right.
First of all: awesome! Thanks for supporting what I think is a very valuable endevour!

I will look into that bug (and the missing sprites planetmaker pointed out). Unfortunately, as with all my grfs, there is no logical source; I just read the raw nfo :twisted:
I'd volunteer to create a "logical source" for this NewGRF and re-implement it. All it would need from your side is the sprites in a nice format thus that I don't have to measure pixels positions within the xcf, psd or png file for each GUI button :-)

Re: [OTTD] OpenGFX+ Big GUI (Double Sized GUI) [WIP]

Posted: 11 Oct 2011 19:43
by Eddi
main menu is tricky, because GRFs can't be active there. we need a GUI to set up static grfs, and we need to handle static grfs special on startup, because the intro game is loaded before the grf locations/md5sums are known.

Re: [OTTD] Big GUI (Double Sized GUI) [WIP]

Posted: 11 Oct 2011 21:48
by planetmaker
Zephyris wrote:Done some more work on the GUI, it is now essentially complete (excluding fonts). For the download see the first post. There are quite a lot of little bugs with widget resizing - particularly scrollbar arrows and exit arrow crosses, although it is generally useable. For best results use the latest nightly.
Just saw this (again). FooBar's answer is not correct anymore. Since r23005 you can replace sprites with an offset in virtually every action5 type except sea shores. Thus I'll happily accept also sprites for those GUI elements found in other action5 types.
If you think I should use the de-compiled sprites from the existing grf, that's fine, too, of course.