What, the page refused to load on a low resolution?lordazamath wrote:How is wiki.openttd.org readable for even 640*480. I tried this just..Wanted to show manual to someone...He couldn't read it...
NewGRF GUI Window
Moderator: OpenTTD Developers
Re: NewGRF GUI Window
#################
Re: NewGRF GUI Window
With links/lynx it is; otherwise you are free to 'fix' it.lordazamath wrote:How is wiki.openttd.org readable for even 640*480. I tried this just..Wanted to show manual to someone...He couldn't read it...
- cmoiromain
- Chief Executive
- Posts: 655
- Joined: 15 Jan 2007 21:45
- Location: FRANCE
- Contact:
Re: NewGRF GUI Window
I wanted to bring back this topic, the number of GRF files becoming larger every day, with the new industries and the graphic replacement projects going on. This feature would really be useful, despite the fact that the window is too large. And, as it was already said, maybe the patch could switch back to normal behaviour when resolution is too small. I have no idea how C++ works, but I guess that would do the trick:
That's PHP coding, but I believe C++ looks the same...
And another request, maybe to add a way of adding sub folders to the list of available GRFs, once again because organising them all would make life easier (for example a directory containing all the ECS vectors, another containing all the UKRS files (train, roads, industries...), one containing the newGFX files, and so on)
I am conscious that trunk does not take in new features until v0.6 is out, but I hope this will make it soon afterwards!
Code: Select all
if ($screen_height >> 480 && $screen_width >> 640)
{
//paste your patch here
}
else
{
//paste original code here
}
And another request, maybe to add a way of adding sub folders to the list of available GRFs, once again because organising them all would make life easier (for example a directory containing all the ECS vectors, another containing all the UKRS files (train, roads, industries...), one containing the newGFX files, and so on)
I am conscious that trunk does not take in new features until v0.6 is out, but I hope this will make it soon afterwards!
Last edited by cmoiromain on 09 Mar 2008 17:30, edited 1 time in total.
I am little, ugly, and nasty. How do you do?
Re: NewGRF GUI Window
I don't think that's quite what you meant. C++ or PHP.cmoiromain wrote:That's PHP coding, but I believe C++ looks the same...Code: Select all
if (height >> 480 && width >> 640)
To get a good answer, ask a Smart Question. Similarly, if you want a bug fixed, write a Useful Bug Report. No TTDPatch crashlog? Then follow directions.
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
- cmoiromain
- Chief Executive
- Posts: 655
- Joined: 15 Jan 2007 21:45
- Location: FRANCE
- Contact:
Re: NewGRF GUI Window
That's not what I meant. In most languages (including C, C++, C#, Java, Perl, and Python) >> is the right-shift operator. Right shifting by values equal to or larger than the width of the left-hand operand is discouraged. 641-bit wide integers are rather larger than most current processors are comfortable handling.
To get a good answer, ask a Smart Question. Similarly, if you want a bug fixed, write a Useful Bug Report. No TTDPatch crashlog? Then follow directions.
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
- cmoiromain
- Chief Executive
- Posts: 655
- Joined: 15 Jan 2007 21:45
- Location: FRANCE
- Contact:
Re: NewGRF GUI Window
for me that literally means "If the screen height is more than 480 pixels and the screen width is more than 640, then put the patch (draw the new window). If any of the height or width is smaller, then use the original behaviour. IIRC in PHP >> means "bigger than". But then maybe I'm wrong, I haven't coded for more than a year...
But anyway this is not the matter, the topic was about a new GRF selection window.
But anyway this is not the matter, the topic was about a new GRF selection window.
I am little, ugly, and nasty. How do you do?
Re: NewGRF GUI Window
no,cmoiromain wrote: IIRC in PHP >> means "bigger than".
DaleStan is totally right.
> is greater.
>> is the right-shift operator.
Re: NewGRF GUI Window
reviving another corpse
- Attachments
-
- newgrf_gui_r12735.diff
- (27.85 KiB) Downloaded 179 times
Re: NewGRF GUI Window
It might be better to filter out the ones that you can't apply (same grfid as one already in), so you can get a nice overview.
Re: NewGRF GUI Window
added a button to toggle between all grfs and unselected ones
fixed some truncation
changed the strings in english.txt so it works with all languages
fixed some truncation
changed the strings in english.txt so it works with all languages
- Attachments
-
- newgrf_gui_r12914.patch
- (28.69 KiB) Downloaded 231 times
-
- screen1.png (383.99 KiB) Viewed 1691 times
-
- screen2.png (383.91 KiB) Viewed 1659 times
Re: NewGRF GUI Window
Does it support low resolutions? 320x240? Not that I need it, it's that I think the devs won't accept this patch in the trunk if it doesn't support it. And this patch is too good to not go into the trunk!
Thank you!
Thank you!
Re: NewGRF GUI Window
No it doesn't and i doubt it ever will. The solution will probably be a switch between this and the original windows for low resolutions. But then, having two different newgrf windows is also disliked by the devs.rbenevid wrote:Does it support low resolutions? 320x240? Not that I need it, it's that I think the devs won't accept this patch in the trunk if it doesn't support it. And this patch is too good to not go into the trunk!
Thank you!
Re: NewGRF GUI Window
Just tested this and it works like a charm on high resolution, wich is probably what most people use these days
Good Job Roest!

..: Trond :.. because you deserve it! 
The whole problem with the world is that fools and fanatics are always so certain of themselves,
and wiser people so full of doubts.
Bertrand Russell
MyGRFs: Norwegian Funny Town Names 4 | LOTR & WoW Town Names 2 | Islandic Town Names 1 | Random Norwegian Town Names
Favorites: GRFCrawler | ISR | WIKI | Now Playing: OpenTTD 1.3.2 w/YAPP 3.0-RC3.9ish
The whole problem with the world is that fools and fanatics are always so certain of themselves,
and wiser people so full of doubts.
Bertrand Russell
MyGRFs: Norwegian Funny Town Names 4 | LOTR & WoW Town Names 2 | Islandic Town Names 1 | Random Norwegian Town Names
Favorites: GRFCrawler | ISR | WIKI | Now Playing: OpenTTD 1.3.2 w/YAPP 3.0-RC3.9ish
Re: NewGRF GUI Window
I was playing with paint some days ago trying to figure out a grf window to start a my own patch, but I think I won't code anything
If you like, this is what I was thinking: http://wolf01.game-host.org/OTTD_relate ... estyle.png
If you like, this is what I was thinking: http://wolf01.game-host.org/OTTD_relate ... estyle.png
Re: NewGRF GUI Window
ctrl-clicking the "toggle show mode" button now toggles between grf names and filenames
the right list of selected grfs can now be sorted using drag&drop
the right list of selected grfs can now be sorted using drag&drop
- Attachments
-
- newgrf_gui_r12929.patch
- (31.93 KiB) Downloaded 235 times
-
- screen3.png (459.17 KiB) Viewed 1703 times
Re: NewGRF GUI Window
updated to r13135
- Attachments
-
- 7_newgrf_gui_r13135.patch
- (33.77 KiB) Downloaded 201 times
Re: NewGRF GUI Window
update for r13377 
edit[0]: now it's horizontally resizable!
edit[1]: tweaked left pane scroll bars, fixed 'warning symbol' display
edit[2]: removed unused configuration variable

edit[0]: now it's horizontally resizable!
edit[1]: tweaked left pane scroll bars, fixed 'warning symbol' display
edit[2]: removed unused configuration variable
Last edited by Tiberius on 26 Jun 2008 10:37, edited 2 times in total.
I may implement/fix/tweak/eat/ditch it soon (or in distant future, if at all, so don't hold your breath).
If anyone want to be the one please implement it for us all
If anyone want to be the one please implement it for us all

- planetmaker
- OpenTTD Developer
- Posts: 9432
- Joined: 07 Nov 2007 22:44
- Location: Sol d
Re: NewGRF GUI Window
Is there a chance for an update? It compiles, but I it crashes when I choose "apply" in the newgrf window. Messages in the console (applied to r13571).
Thanks
Code: Select all
openttd(930,0xa000d000) malloc: *** vm_allocate(size=8421376) failed (error code=3)
openttd(930,0xa000d000) malloc: *** error: can't allocate region
openttd(930,0xa000d000) malloc: *** set a breakpoint in szone_error to debug
openttd(930,0xa000d000) malloc: *** vm_allocate(size=8421376) failed (error code=3)
openttd(930,0xa000d000) malloc: *** error: can't allocate region
openttd(930,0xa000d000) malloc: *** set a breakpoint in szone_error to debug
OpenTTD: manual | online content | translations | Wanted contributions and patches
#openttdcoop: blog | wiki | public server | DevZone | NewGRF web translator
DevZone - home of the free NewGRFs: OpenSFX | OpenMSX | OpenGFX | Swedish Rails | OpenGFX+ Trains|RV|Industries|Airports|Landscape | NML
Re: NewGRF GUI Window
checked against r13638 and seems working fine.
I may implement/fix/tweak/eat/ditch it soon (or in distant future, if at all, so don't hold your breath).
If anyone want to be the one please implement it for us all
If anyone want to be the one please implement it for us all

Who is online
Users browsing this forum: No registered users and 7 guests