HOMEBLOGDEVLOG

Clickable airports

Adam C. Clifton
7 Jan 2026

To be able to access airports to create routes and all that other cool management stuff, we first need to be able to click on airports on the world map.

Clicking an airport now opens a dialog that shows more info plus a list of actions the player can take.

On the world map, I've also update the airport icons to give more info. Airports the player has slots at are highlighted in grey, and other airports where the player has no slots are blue. The red highlight signifys that the airport is a hub, where flights should originate from.

There was a bug with the game engine GUI where if an element is draggable and clickable, the click event would never fire. It was mostly straightforward to resolve, mainly by keeping better track of if the user is in the middle of a click or is actively dragging, and responding correctly when they release the mouse button.

The main complexity was how input flows through the GUI stack. This has been fine for previous games, a new window appears, sits on top of the stack, and can block all input to anything underneath it. Eg: a popup menu blocking the main view.

But the design for AeroCEO has the world at the bottom of the stack, sometimes taking input, and sometimes not. So initially you can drag around and select an airport, but then while the airport dialog is up, you cannot interact with the map. But then if you choose to create a new route, I want the world to accept input again so the destination can be selected.

The current solution is for the world to maintain an array of listeners, that get pushed on as they are created, and popped off when dismissed. Mirroring the way GUIs are stacked up. Then only the topmost GUI gets events, which it can act on or ignore. So the airport dialog would block the user from selecting a different airport. Then when a GUI is dismissed and the listener popped off, events will naturally pass back to the lower GUI.

Previous: Select airport UI
Next: Create route UI
© Numbat Logic Pty Ltd 2014 - 2026