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

Discuss, get help with, or post new graphics for TTDPatch and OpenTTD, using the NewGRF system, here. Graphics for plain TTD also acceptable here.

Moderator: Graphics Moderators

User avatar
Zephyris
Tycoon
Tycoon
Posts: 2890
Joined: 16 May 2007 16:59

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

Post 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.
Attachments
opengfx+biggui.grf
(114.09 KiB) Downloaded 39823 times
Fort Trenham Transport, 14th Feb 2020.png
(258.43 KiB) Downloaded 2 times
Fort Trenham Transport, 14th Feb 2020 Crop.png
Fort Trenham Transport, 14th Feb 2020 Crop.png (68.17 KiB) Viewed 40676 times
Last edited by Zephyris on 18 Sep 2010 00:08, edited 2 times in total.
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

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

Post by planetmaker »

Very nice to see work on that :-)
User avatar
FooBar
Tycoon
Tycoon
Posts: 6553
Joined: 21 May 2007 11:47
Location: The Netherlands
Contact:

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

Post 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?
User avatar
Zephyris
Tycoon
Tycoon
Posts: 2890
Joined: 16 May 2007 16:59

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

Post 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 :)
Rubidium
OpenTTD Developer
OpenTTD Developer
Posts: 3815
Joined: 09 Feb 2006 19:15

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

Post 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.
User avatar
Zephyris
Tycoon
Tycoon
Posts: 2890
Joined: 16 May 2007 16:59

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

Post by Zephyris »

Sounds like a magic number to me :) It would be nice if OpenTTD could support alternative bitmap font sizes...
Yexo
Tycoon
Tycoon
Posts: 3663
Joined: 20 Dec 2007 12:49

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

Post by Yexo »

As before: send me a test grf and I'll take a look at it. This project is interesting.
User avatar
Zephyris
Tycoon
Tycoon
Posts: 2890
Joined: 16 May 2007 16:59

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

Post by Zephyris »

Cool, I'll let you know when I have a grf in place... I'll finish the GUI elements first though.
User avatar
Zephyris
Tycoon
Tycoon
Posts: 2890
Joined: 16 May 2007 16:59

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

Post 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?
User avatar
Zephyris
Tycoon
Tycoon
Posts: 2890
Joined: 16 May 2007 16:59

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

Post 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.
User avatar
FooBar
Tycoon
Tycoon
Posts: 6553
Joined: 21 May 2007 11:47
Location: The Netherlands
Contact:

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

Post 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 :)
User avatar
Zephyris
Tycoon
Tycoon
Posts: 2890
Joined: 16 May 2007 16:59

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

Post 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
User avatar
Zephyris
Tycoon
Tycoon
Posts: 2890
Joined: 16 May 2007 16:59

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

Post by Zephyris »

Now on Bananas... Hopefully future versions of OpenTTD will allow more grfs like this :)
peter1138
OpenTTD Developer
OpenTTD Developer
Posts: 1728
Joined: 30 Mar 2005 09:43

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

Post 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.
He's like, some kind of OpenTTD developer.
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

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

Post 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)
User avatar
FooBar
Tycoon
Tycoon
Posts: 6553
Joined: 21 May 2007 11:47
Location: The Netherlands
Contact:

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

Post by FooBar »

petern wrote:properly
Good to see you working on OpenTTD again!

Just a question, does "properly" also include the main menu?
User avatar
Zephyris
Tycoon
Tycoon
Posts: 2890
Joined: 16 May 2007 16:59

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

Post 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:
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

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

Post 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 :-)
Eddi
Tycoon
Tycoon
Posts: 8254
Joined: 17 Jan 2007 00:14

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

Post 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.
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

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

Post 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.
Post Reply

Return to “Graphics Development”

Who is online

Users browsing this forum: Google [Bot] and 10 guests