Open jamesg31 opened 3 years ago
I am working on this, some... a debug-mode that will let you select/enter an aircraft name, location, altitude, and speed, then spawn it... hopefully. :)
Please forgive the hodgepodge nature of this sketch, but what do you think of something like this for an airplane menu/GUI? We can have it be read-only for Name, but be able to enter anything when you're in debug mode (to spawn a new airplane in a random location)?
And I recognize this might fit better under issue #5 , but as I was considering how to implement spawning aircraft before we have any details set on where to spawn aircraft, this is what I came up with...
I think we are going to need to add "gates" to the config file, and maybe paths that the aircraft can follow on the ground. These can act as spawn locations for departures. We will need to figure out something else when we implement approaches I guess.
Yeah, for sure... in the meantime, does the mockup work okay for you as an update to the generic aircraft GUI? If not, does it work specifically for adding airplanes in debug mode, I guess? If not, I'll work on something else.
Oh of course, I get what your asking. It totally works!
Hey, check out this commit (it's standalone of just the GUI) and let me know? Obviously, we can/should add some theming and we'll need to come up with something for scaling... but when you enter stuff, it gets some checks (work needed) and printed (can call a function to spawn/update aircraft)...
I left it out of the code, but since everything "belongs" to top_panel, you can just top_panel.hide() and top_panel.show() to do the whole GUI.
There's the whole "anchors" aspect that... should make resizing/relative work? I just didn't figure it out yet and I'm done for now. :P
@jamesg31 , any thought on the example code snippet? If it's good, I would plan to replace the UI class with this block, basically. But I don't want to start on that larger effort until I get your thoughts on it. :)
Sorry, I have had a busy couple days. This looks really good. I'm pretty happy with this implementation.
No time for real-life stuff when we have an unpaid project to work on! 🤣
When I do things like this, I'm not trying to rush you... just making sure I remember where I am on things. 😄
No of course! Your work on this is invaluable
I am going to try and get some work done on this. I am thinking you can define where the gates and taxiways are in a config file, then we can randomly spawn aircraft at the gates. We can then use a pathfinding algorithm to get the aircraft to taxi to the hold point of the runway, and then depart.
Need to create a better way to spawn aircraft. Likely will need to use spawnpoints for gates ect. Also need to create list of airlines and GA aircraft.