Just provide the number of tiles per side, a pointer to a test function, the tile to start searching and voila.
Fixes [FS#364] by removing a lengthy and suboptimal random search pattern.
Thanks Rubidium.
always sending to teammate if the patch is on even if you do not have any allies. So
with setting off you always send to 'all players', with setting on you send to teammates
if you have any, otherwise to all players.
buttons depending on calling window, game-mode); handle it by broadcasting messages
to the calling window, because that knows how and what buttons to set.
WWT_IMGBTN must contain an image for drawing. Renamed WWT_PANEL_2 to WWT_IMGBTN_2
because that is what it is. Added WWT_PUSHBTN that is either just a pushable button,
or a textbutton, which text's drawn dynamically independent of widget.
sends a message to all players, CTRL+ENTER (CTRL+T) sends a message to all
team mates and ENTER (T) sends a message to teammates if you have any, otherwise
to all players.
The chat-window now also shows what kind of message is being sent. Shortcut
functionality has not been changed (ENTER sends message, ESC closes window)
normally they will start at the left side of the parent button except when
they would stick out, then align with the top toolbar's right side. This
also means the extra parameter 'x' is not needed, it is deducted from the
widget position.
It made no sense to maintain 8 nearly identically arrays when a single one can do the job
Also made the two buttons always use half of the bottom width each, even when resizing
This means that in the intro menu the 'Quit' button immediatelly quits
and the 'Quit' in the menu of the normal game and scenario editor
immediatelly quits when the 'autosave_on_exit' patch is turned on.
This is the same way as the OS/window manager initiated quits, like
alt-F4 and the 'x' in the (OS/window manager drawn) title bar of OTTD.
All the struct holds is a simple colour gradient, so using a simple array with 8 entries is more clear
Also add the names of colour the gradients as enum
-Codechange: use IsValidXXX where ever possible
Note: both changes to prepare for new pool system, which needs those changes.
For every pool there are 2 ugly lines, which will be removed when done
implementing new pool system.
Based on FS#13 by blathijs, partly implemented.
CodeChange : Move almost all fixed strings from ON_PAINT event to Widget array using WWT_LABEL.
Feature : All "Select Refit Cargo" are now centered, instead of been left aligned
- New optional landscape generator (TerraGenesis Perlin)
- Load heightmaps (either BMP or PNG)
- Progress dialog while generating worlds (no longer a 'hanging' screen)
- New dialogs for NewGame, Create Scenario and Play Heightmap
- Easier to configure your landscape
- More things to configure (tree-placer, ..)
- Speedup of world generation
- New console command 'restart': restart the map EXACTLY as it was when you
first started it (needs a game made after or with this commit)
- New console command 'getseed': get the seed of your map and share it with
others (of course only works with generated maps)
- Many new, world generation related, things
- Many internal cleanups and rewrites
Many tnx to those people who helped making this:
Belugas, DaleStan, glx, KUDr, RichK67, Rubidium, and TrueLight (alfabetic)
Many tnx to those who helped testing:
Arnau, Bjarni, and tokai (alfabetic)
And to all other people who helped testing and sending comments / bugs
Stats: 673 lines changed, 3534 new lines, 79 new strings
-Cleanup: fix whitespace related coding style issues in date.[ch]
-Cleanup: make original comments doxygen compatible and remove/change outdated comments
Simplification of the handling of the main_gui menus,
Removal of repetitions and Hiding the internals of screenshots.
Thanks to glx, Rubidium and Truelight for pointers