[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: 2826
Joined: 16 May 2007 16:59

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

Post by Zephyris » 16 Sep 2010 22:11

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 39097 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 29500 times
Last edited by Zephyris on 18 Sep 2010 00:08, edited 2 times in total.

User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9313
Joined: 07 Nov 2007 22:44
Location: Sol d

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

Post by planetmaker » 17 Sep 2010 05:33

Very nice to see work on that :-)

User avatar
FooBar
Tycoon
Tycoon
Posts: 6559
Joined: 21 May 2007 11:47
Location: The Netherlands
Contact:

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

Post by FooBar » 17 Sep 2010 08:08

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: 2826
Joined: 16 May 2007 16:59

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

Post by Zephyris » 17 Sep 2010 08:34

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 » 17 Sep 2010 15:12

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: 2826
Joined: 16 May 2007 16:59

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

Post by Zephyris » 17 Sep 2010 16:13

Sounds like a magic number to me :) It would be nice if OpenTTD could support alternative bitmap font sizes...

Yexo
Tycoon
Tycoon
Posts: 3653
Joined: 20 Dec 2007 12:49

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

Post by Yexo » 17 Sep 2010 16:21

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: 2826
Joined: 16 May 2007 16:59

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

Post by Zephyris » 17 Sep 2010 19:41

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: 2826
Joined: 16 May 2007 16:59

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

Post by Zephyris » 17 Sep 2010 23:09

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: 2826
Joined: 16 May 2007 16:59

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

Post by Zephyris » 18 Sep 2010 00:07

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: 6559
Joined: 21 May 2007 11:47
Location: The Netherlands
Contact:

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

Post by FooBar » 18 Sep 2010 11:48

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: 2826
Joined: 16 May 2007 16:59

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

Post by Zephyris » 18 Sep 2010 18:35

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: 2826
Joined: 16 May 2007 16:59

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

Post by Zephyris » 23 Dec 2010 15:41

Now on Bananas... Hopefully future versions of OpenTTD will allow more grfs like this :)

peter1138
OpenTTD Developer
OpenTTD Developer
Posts: 1646
Joined: 30 Mar 2005 09:43

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

Post by peter1138 » 11 Oct 2011 11:13

"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: 9313
Joined: 07 Nov 2007 22:44
Location: Sol d

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

Post by planetmaker » 11 Oct 2011 11:28

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: 6559
Joined: 21 May 2007 11:47
Location: The Netherlands
Contact:

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

Post by FooBar » 11 Oct 2011 12:28

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: 2826
Joined: 16 May 2007 16:59

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

Post by Zephyris » 11 Oct 2011 12:47

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: 9313
Joined: 07 Nov 2007 22:44
Location: Sol d

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

Post by planetmaker » 11 Oct 2011 12:52

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: 7420
Joined: 17 Jan 2007 00:14

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

Post by Eddi » 11 Oct 2011 19:43

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.
You might not exactly be interested in Ferion, but if you are, have fun :)

User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9313
Joined: 07 Nov 2007 22:44
Location: Sol d

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

Post by planetmaker » 11 Oct 2011 21:48

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 Adsense [Bot] and 9 guests