Commit Graph

14236 Commits

Author SHA1 Message Date
Stian Grenborgen e7cecf5e26 Ensures that European starting units are not spawned on the same tile. 2024-01-28 08:45:04 +01:00
Stian Grenborgen 4f05e70000 Hides the display of the "option only"-nation type from the start game panel. This nation type was already hidden from display in the Colopedia. 2024-01-28 08:06:52 +01:00
Stian Grenborgen 4ee64d08fe The European starting areas defined by map authors can now be used when starting a new game. 2024-01-27 20:36:46 +01:00
Stian Grenborgen a35f586e61 Moving the map generator code for European starting units to a separate class. The code has been restructured to allow map defined starting positions in a later commit. 2024-01-27 18:33:26 +01:00
Stian Grenborgen b3baff9650 Fixes ships just going back and forth to Europe. The issue was caused by the ship's mission being overridden to PrivateerMission in Europe. 2024-01-26 22:18:06 +01:00
Stian Grenborgen 24ff8ab8bb The colony panel now has a non-rectangular shape when resizing. This avoids stealing mouse events that should be handled by the map instead (since a large part of the border is transparent). 2024-01-21 11:39:14 +01:00
Stian Grenborgen 9657c8a65d Caps the automatic font size at no more than 25% larger than the current scaleFactor. In debug mode, resizing the application frame now updates the scaleFactor (if automatic). This behavior can only be enabled outside of the debug mode when all panels are automatically refreshed when the scalingFactor and/or font size changes. 2024-01-21 11:39:14 +01:00
Stian Grenborgen 697096c0da Using 75% display scaling for screens with less than 720px height. 2024-01-21 11:39:14 +01:00
Stian Grenborgen 8e203ac4a1 Paints the docks/drydocks/shipyard in the colony panel. 2024-01-21 11:39:14 +01:00
Stian Grenborgen ce92508e43 Allows the outside-of-the-colony panel to have a background when there are no defensive images. 2024-01-21 11:39:14 +01:00
Stian Grenborgen 031fa81599 Shows the styling in the cargo panel when using the vertical scrollbars. 2024-01-14 15:03:36 +01:00
Stian Grenborgen 8e4c9c7ed9 Map editor: A new game is now always loaded before importing or generating a new map. This fixes lots of issues caused by stuff from the old map leaking into the new one. 2024-01-14 14:31:42 +01:00
Stian Grenborgen 16b98ecf42 Bugfix: Closes old map editor dialogs that depends on the old map when creating a new map or loading a map. 2024-01-14 14:06:23 +01:00
Stian Grenborgen ab4b40c2db Fixes a bug where map width was used for height, and the other way around, when scaling a map in the map editor. 2024-01-14 13:50:05 +01:00
Stian Grenborgen 53dc415abe Allows areas to be separately hidden from view. 2024-01-14 13:48:55 +01:00
Stian Grenborgen 7dfa486570 The WrapLayout can now make every child component have the same size as the largest child. 2024-01-14 13:47:41 +01:00
Stian Grenborgen dd23a7c3ac Areas are now only showed in the map editor while editing them. 2024-01-14 08:57:51 +01:00
Stian Grenborgen 7870bc7bb8 Shows all the areas in the map editor when there are overlapping areas. 2024-01-14 08:32:12 +01:00
Stian Grenborgen 06dcf01df9 Areas can now be edited in the map editor. Areas can now be used for defining the locations a given native nation can have settlements (when generating settlements semi-randomly). 2024-01-13 22:00:44 +01:00
Stian Grenborgen c6ed870630 Fixes regions used for native settlement placements by deleting duplicates. 2024-01-13 18:44:13 +01:00
Stian Grenborgen e80cc21a55 Allows areas to be defined for a game. An area is a collection of tiles that can easily be referenced and changed in the map editor. Note that areas are defined on the Game instead of a specific map. The reason for this is that we should be able to have areas crossing different maps if we later allow multiple maps for a game. 2024-01-13 18:12:33 +01:00
Stian Grenborgen 146009a942 Allows the map to be iterable over tiles. 2024-01-09 21:50:39 +01:00
Stian Grenborgen 6c9fb07414 Fixes geographical region intitialization so that native settlements can be placed correctly. 2024-01-09 21:50:39 +01:00
Stian Grenborgen cb44400862 Directly use an image with an exact match if available. 2024-01-09 21:50:39 +01:00
Stian Grenborgen 63b053b868 Allows background images for the Colony's "Outside Colony" panel. The background images are stretched to fit the current size of the panel. Alternative images with different aspect ratios can be provided -- and the image with the closest aspect ratio will be used. 2024-01-09 21:50:39 +01:00
Stian Grenborgen 01e4070aea Updating the code to get rid of warnings. Neither of these caused an issue. 2024-01-09 21:50:39 +01:00
Stian Grenborgen fcb4ecd200 Allow to run FreeCol with only 512MB memory. Please keep in mind that 2GB is still needed for higher resolution, smoother scroll and high rendering quality. 2024-01-07 00:04:52 +01:00
Stian Grenborgen 036dd1edfa Various fixes to the map editor and action logic.
* Store panel positions and sizes (if enabled) in more cases (for example, before closing all panels when starting a new game or creating a new map).
* Don't store sizes and positions for fullscreen panels.
* Adds title to map editor frames.
* Plays the default music playlist in the editor.
* Add an action/menu item for disabling/enabling the tile transform panel in the meap editor.
2024-01-06 19:10:00 +01:00
Stian Grenborgen 394d591169 Don't start scrolling if there's no map. 2024-01-06 12:54:19 +01:00
Stian Grenborgen ac3ad7c91b Stops the asyncpainter thread from exiting when getting an exception. 2024-01-06 12:51:07 +01:00
Stian Grenborgen b77b15dce5 Using resizable and minimizable frames for controls in the map editor. 2024-01-06 12:48:25 +01:00
Stian Grenborgen 9d36d7ef4a WrapLayout can now force components to have a specific size. This allows the use of WrapLayout in many of the places we earlier had fixed column based layouts with GridLayout. 2024-01-05 19:59:00 +01:00
Stian Grenborgen a45d17226a Better log messages when failing to start the game. 2024-01-04 22:00:29 +01:00
Stian Grenborgen ee61fdedd5 Prioritize displaying a new goto-order above a previous unit path (that will be overridden). 2024-01-04 21:59:31 +01:00
Stian Grenborgen dd3fb87223 Shows the goto-path with lines instead of the old icons. Using lines makes it easier to read the path. 2024-01-04 21:42:18 +01:00
Stian Grenborgen e66d3f5d8c Fixes a NPE in the minimap when loading a new game. 2024-01-04 08:52:00 +01:00
Stian Grenborgen 7a9607ec13 Only use white foreground color if styling has been applied to the cargo panel. 2024-01-03 23:34:07 +01:00
Stian Grenborgen 11bdd7e957 Drawing the actual number of goods images, but compressed, for high amounts for goods. We can add a separate graphics for bulk goods if this causes a performance hit on slow systems. 2024-01-03 22:57:16 +01:00
Stian Grenborgen f69e2e9c88 Fixes units getting clipped when the building image is too small. 2024-01-03 22:22:55 +01:00
Stian Grenborgen bfb78c325c Allows the fullscreen colony panel to be in front of other panels. 2024-01-03 21:43:43 +01:00
Stian Grenborgen 00a8b8b42c Accelerator keys for unload and load are now working again. 2024-01-03 21:38:26 +01:00
Stian Grenborgen ad5bd6bd27 Allows two lines of goods production to be displayed in the ColonyPanel. 2024-01-03 19:59:26 +01:00
Stian Grenborgen a24ccff806 WrapLayout now allows more control of alignment and gap between components. For example, only the last row in the layout can be centered. 2024-01-03 19:57:14 +01:00
Stian Grenborgen 74b2f2989b Goods labels in the colony warehouse has color coding again. It's now possible to specifiy separate goods' color codes for white and black backgrounds. 2024-01-02 23:33:05 +01:00
Stian Grenborgen b58eda6b68 Turns on antialiasing when rendering text in the ColonyPanel. 2024-01-02 23:05:42 +01:00
Stian Grenborgen e8f5735461 Added a black background to the contruction panel. This is both in the ColonyPanel and the BuildQueuePanel. 2024-01-02 22:36:22 +01:00
Stian Grenborgen 52bff796a2 Added more visualizations to the new colony panel. Population, colonists to be added/removed because of bonus, rebel percentage and royalist percentage. The tooltip showing more details have been reenabled. 2024-01-02 22:33:31 +01:00
Stian Grenborgen a77adcc70a The selected carrier in the ColonyPanel is now displayed with a border. 2024-01-02 18:08:57 +01:00
Stian Grenborgen 393f9da340 Allows the colony panel to be moved when the dragevent starts in child panels. 2024-01-02 18:08:57 +01:00
Stian Grenborgen aebb741bbb The build queue is no longer displayed when clicking on other buildings than the carpenter type of buildings. 2024-01-02 18:08:57 +01:00