James Turner
92864265af
Refactor aircraft helper classes
...
- move the aircraft list and delegate to their own files
2015-03-11 17:09:59 +00:00
James Turner
c3543f8fdd
GUI ‘restore defaults’ support.
...
- Hold ‘alt’ on launch to restore defaults, including launcher prefs.
2015-03-08 00:42:39 +00:00
James Turner
f9c23eb096
Add missing GPL boilerplate.
2015-03-08 00:42:39 +00:00
James Turner
a466dbce73
Very crude work on GUI base package selection.
...
- feedback on wording greatly appreciated.
- needed to make nightly builds usable without bundled data.
2015-03-08 00:42:05 +00:00
James Turner
8d9db2824e
Launch aircraft data cache
...
- makes successive aircraft scans much faster since -set.xml parsing
can be skipped when the file is unmodified.
2015-03-08 00:42:05 +00:00
James Turner
4038ba3d51
Arrow icons for variant selection.
2015-03-05 15:53:40 +00:00
James Turner
7ca9fba4a8
Fix some off-by-one errors in variants GUI
2015-03-05 14:51:33 +00:00
James Turner
13d50853df
Launcher support for aircraft variants.
...
- Allows for a less confusing UX when aircraft has several variants.
- Requires changes to aircraft -set.xml files.
2015-03-05 14:01:53 +00:00
James Turner
548b899fb6
Fix a couple more Qt version issues.
...
- only set the clearButton on QLineEdit if we have 5.2
- use itemData/currentIndex to avoid currentData()
2015-02-27 11:58:22 +00:00
James Turner
a3d3e81a86
Set placeholderText from code
...
Avoids a hard requirement of Qt 5.3; only 5.1 is
needed.
2015-02-25 23:14:02 +00:00
James Turner
1898a5fef8
Guard against a crash Torsten encountered once.
2015-02-23 18:22:52 +00:00
James Turner
c9c0833741
Qt launcher: additional arguments UI
...
Add a plain text edit widget to the launcher to support
custom command line arguments.
2015-02-23 13:41:50 +00:00
James Turner
8bfb63e4ed
Launcher: select season.
2015-01-10 14:57:59 +00:00
James Turner
ce10b4c8f1
Ask before creating the custom aircraft dir.
2015-01-10 14:18:44 +00:00
James Turner
55b092771f
Launcher: hook up MSAA checkbox.
2015-01-07 11:30:44 +00:00
James Turner
72e0ea9e40
Only set AUTOMOC for fglauncher target.
...
(Avoids pointless noise for all other targets)
2015-01-07 09:38:02 +00:00
James Turner
02bcb3718a
Hook up parking position in launcher.
2015-01-06 21:12:19 +00:00
James Turner
53b478654c
Linux fixes for launcher code.
2015-01-06 20:36:05 +00:00
James Turner
78e8f53312
In-app launcher for Mac, based on Qt5.
...
The old Mac launcher doesn’t work on Yosemite, add a tiny
Qt-based launcher inside the main process (no need to fork /
exec) which runs before the OSG window is created.
Will be merged for 3.4, hopefully with no impact on other
platforms.
2015-01-06 19:13:30 +00:00
James Turner
7317aff22d
Fix route-path bugs:
...
- accurate fly-over / fly-by computations
- parse additional LevelD XML elements
- path vector contains curves for turns
Remove dead code.
2014-12-18 23:05:28 +00:00
James Turner
01622dd1f4
Fix flight-plan course and distance computations.
...
Always use the RoutePath system for course and distance computations
in the flight plan, so that dynamic segments are handled correctly.
2014-12-08 17:56:15 +00:00
Thomas Geymayer
d836126c75
Better fallback for missing menu and splash translations.
2014-07-30 23:53:16 +02:00
Thomas Geymayer
a673f4a5f9
Nasal: update for simgear changes.
2014-07-21 00:26:54 +02:00
James Turner
3f433e2c35
Fix polar rendering of map. (Bug #55 )
...
Use an azimuth-equidistant projection, which handles high latitudes and
polar regions correctly. Written by Gijs de Rooy.
2014-06-29 21:45:18 +01:00
Thomas Geymayer
821af95e0d
Keep (PUI) menubar visibility on gui-redraw. ( Fix #1251 )
...
For aircraft using fgcommand("gui-redraw"), which is for example
also used by gui.menuBind, the menubar was always hidden and
not shown again.
2014-06-21 14:51:34 +02:00
Thomas Geymayer
75f5eba002
Update includes (required by simgear changes)
2014-06-04 02:58:14 +02:00
Thomas Geymayer
3c0b7f88b8
Updates for simgear nasal::Ghost changes.
2014-06-03 19:00:25 +02:00
Thomas Geymayer
5b74a72506
Canvas: support for custom events and event dispatching.
2014-05-19 00:28:40 +02:00
James Turner
070dba29f9
Close dialogs on GUI shutdown
...
- avoids orphaned dialogs on reset
- requires some guards in NasalSys since Nasal is shutdown first, but
dialogs can have Nasal modules.
2014-03-16 22:52:55 +00:00
Thomas Geymayer
764fbd519c
CanvasWidget (PUI): make button index consistent with Canvas windows
2014-03-15 15:01:09 +01:00
James Turner
f2a3090384
Fix some Clang warnings.
2014-03-11 16:46:00 +00:00
Thomas Geymayer
de38157916
FGPUIDialog: fix reading from already free'd memory.
...
Calls to updateValues can cause nested calls invalidating
the char* passed as argument, if retrieved from a
SGPropertyNode.
Probably SGPropertyNode should also be modified to return
a std::string instead of a pointer to an internal buffer.
2014-02-28 17:34:41 +01:00
Christian Schmitt
a0184ac80c
MapWidget: silence compiler warning
2014-02-02 16:47:25 +01:00
James Turner
4df9c61d2a
Check for and warn about old nVidia drivers.
...
(Had a bug report with someone using 189 drivers on Windows!)
2014-01-27 17:27:12 +00:00
James Turner
1a372d9366
Update image-server logic.
...
- no dependency on libJpeg or Simgear
- no duplicate rendering of the scene (uses a draw callback)
- supports other image types, eg PNG
- threaded so doesn't block the main loop ever
2014-01-27 09:08:34 +00:00
James Turner
45d67406a4
CrashRpt tweaks, checking.
...
- show a message box if setup fails
- log setup status
2014-01-22 22:33:30 +00:00
James Turner
1b585fa415
Windows native file-dialog, menu-bar
...
By Gijs with additions by James. Menubar is disabled at present
since it's not usable and potentially inferior to other solutions,
but committing the code so it doesn't rot.
2014-01-20 18:43:02 +00:00
James Turner
5e7574c9c2
Bug-fix: Cocoa menus work in aircraft with custom dialogs.
...
Restarting the GUI could cause Cocoa menus to misbehave, due to
destruction behaviour of SGBinding. Use new clear() helper in the
short term to work around this.
2014-01-15 22:00:09 +00:00
James Turner
1b9394fc37
Crashfix: move spatial, AI queries in map-widget
...
In threaded OSG drawing, MapWidget::draw runs in the render
thread context, but touches lots of main thread state. Move most of the
work to an update() helper run on the main thread instead, so draw()
mostly makes pure GL calls.
(This is a fix for 3.0, the real solution is to migrate to a
Canvas-based map and GUI)
2014-01-14 13:11:06 +00:00
James Turner
4c51ad0d87
Cocoa: fix warning about deprecated function.
...
SetFrontProcess is deprecated, use NSApplication instead now we
have the CocoaHelpers file.
2013-12-21 15:31:27 +00:00
Clément de l'Hamaide
efdb488736
Fix accent bug in MapWidget
2013-12-01 18:50:54 +01:00
James Turner
77075a2d66
Cocoa: more Function-key shortcuts in menus
2013-11-24 17:25:02 +00:00
James Turner
d99109c9e4
Reset: do re-init Ghost bindings.
2013-11-24 15:10:00 +00:00
James Turner
57c9ed1ae3
Cocoa menu fixes for reset
2013-11-24 15:10:00 +00:00
James Turner
0fbc448af0
Nasal changes for reset
...
- reduce use of global context (will die soon)
- replace static wrappedNode ref which breaks reset
2013-11-22 22:52:33 +00:00
James Turner
1f699984e9
One more Mac helper moved into CocoaHelpers.mm
2013-11-19 22:01:11 +00:00
James Turner
2331956539
One more Mac helper moved into CocoaHelpers.mm
2013-11-18 15:52:30 +00:00
James Turner
8b4b49cad2
Read-only mode fixes.
2013-11-18 15:40:14 +00:00
James Turner
fecb475145
Refactor Cocoa helpers.
...
Change away from using deprecated FSFindFolder.
2013-11-16 10:58:17 +00:00
James Turner
0cda3cbfb2
Multiple-instance support.
...
Write PID file to FG_HOME, use this to detect multiple launches.
When this situation is detected, set a marker property and place various
objects into read-only mode, such as the NavCache and TerraSync.
PID file is created using open+unlink semantics on POSIX, and
DELETE_ON_CLOSE on Windows, so it will be removed when fgfs exits,
even if killed or crashes.
2013-11-15 21:04:15 +00:00
James Turner
136cd6ac51
Message box support.
...
This allows us to display a platform-native dialog for problems
which occur early in startup (before we can show a PUI/Canvas dialog).
In particular this improves feedback where FG_HOME, FG_DATA or
aircraft selection is wrong, all of which happen very early in startup.
2013-11-14 22:02:29 +00:00
James Turner
e25aa4f004
Fix some static property references.
...
(These cause problems when replacing the property tree during reset)
2013-11-14 16:37:46 +00:00
James Turner
881df711ba
Reset: Nasal can be shutdown.
...
Also guard against duplicate init of cppbind wrapped classes.
2013-11-12 22:47:41 +00:00
James Turner
02a5261797
Reset: GUI can be shutdown.
2013-10-29 23:02:46 +00:00
James Turner
f499913762
Map shows all airports when zoomed in.
...
Bug 1135, or part of it.
(Ignore the short-runway culling when zoomed in)
2013-10-15 22:28:10 +01:00
James Turner
a45e3d1d07
Bug 1217, crash on AI traffic data.
...
Guard against flight plans with missing airport
information.
2013-10-15 22:27:19 +01:00
James Turner
38a373ba84
Display AI traffic route in map.
...
Add some helpers so MapWidget can show the
origin and destination of AIAircraft with a FlightPlan.
2013-09-14 12:17:33 +01:00
James Turner
1924bdfd82
Bug 550 / 454 work (not yet fully fixed)
...
Adding a spherical projection mode which will work at the poles and
+180/-180 line correctly. Not yet enabled since it has other issues to
be addressed.
2013-06-30 16:41:05 +01:00
James Turner
45ea8b5daa
Bug 947, menu item state wrong after reset.
...
Mark the entire /sim/menubar tree as PRESERVED, so reset doesn't
mess up all the state.
2013-06-25 21:28:56 +01:00
James Turner
145148944f
Kill off platformDesktopPath entirely
2013-06-20 00:20:12 +01:00
James Turner
6d158e886c
Abstraction for the user's desktop location.
2013-06-09 23:00:09 +01:00
Thomas Geymayer
3d3475e965
Small cleanup.
2013-06-03 23:46:27 +02:00
Thomas Geymayer
220f359d34
Fix crashing without support for GLSL/OpenGL 2.0
2013-04-24 00:19:37 +02:00
Thomas Geymayer
60bec150aa
Reduce severity of warning for missing gui/dialogs directory
2013-03-20 18:02:11 +01:00
Christian Schmitt
f11201d3d9
MapWidget: make partially use of the new colocated DME information.
...
Until a better way to draw proper symbols is implemented, this has to do.
2013-03-15 14:07:32 +01:00
James Turner
ead479532b
New cursor shapes.
...
Unfortunately OSG lacks the 'closed hand' (aka 'grab') cursor, really time to get platform cursor working reliably.
2013-03-10 12:05:14 +00:00
Christian Schmitt
461d89cb22
Fix some uninitialized variables (found by valgrind)
2013-03-10 01:24:57 +01:00
James Turner
b29470c129
Disable native cursor on Windows for now.
...
There's an unfortunate interaction with osgViewer on Windows that needs to be resolved, before the can switched on.
2013-03-07 19:33:46 +00:00
Thomas Geymayer
3047c316dc
Clean up/simplify NasalPositioned_cppbind
...
Ensure all FGPositioned related functions return SGSharedPtr
instead of raw pointers to allow automatic conversion to
nasal ghosts without custom helper functions.
2013-03-06 23:21:49 +01:00
James Turner
23a1d4338d
Windows cursor implementation.
...
This does not (yet) support custom cursor images, but can be easily
extended to do so.
2013-03-06 18:22:37 +00:00
Thomas Geymayer
1c905e5881
Typos, license headers...
2013-03-06 01:04:52 +01:00
James Turner
034140914c
Windows cursor handling stubs.
2013-03-05 20:59:05 +00:00
James Turner
8dc936b44b
Forgot GPL license on new files.
2013-03-05 20:53:43 +00:00
Christian Schmitt
658bda6e40
MapWidget: Show counties and towns as well, depending on the zoom.
...
Some colors added.
2013-03-05 18:26:01 +01:00
James Turner
4c32b832ec
Stray debug message, remove.
2013-03-05 14:29:14 +00:00
James Turner
f2c267f5d7
MouseInput changes to support hover.
...
This adds the framework for platform cursor implementations; Windows and X11 to be done.
It also extend the mouse-input code to generate hover events suitable for driving tooltips.
Note there should be no visible functionality change from this commit, since everything
is inactive until fgdata changes are made.
2013-03-04 23:35:30 +00:00
Christian Schmitt
6bf47cd248
MapWidget: make use of the new POI system and display cities on the map.
...
This is meant as a preview.
2013-03-04 00:27:12 +01:00
Thomas Geymayer
0587db3b1e
Update for nasal::Ghost changes
2013-03-03 19:30:16 +01:00
James Turner
88a4435cef
Remove isReciprocal from FGRunway.
...
This was a bogus concept, either runways have a reciprocal or not (if singled-ended), really this was simply exposing an artefact of the apt.dat encoding. Change to an API which gives what is actually wanted - the ability to extract an airport's runways without any reciprocals included.
2013-02-28 18:21:29 +00:00
Thomas Geymayer
3ea69785d9
CanvasWidget: automatically set auto-viewport.
...
If no viewport dimensions are given the viewport
will now automatically resize, otherwise it stays
unchanged.
2013-02-25 15:39:30 +01:00
Thomas Geymayer
045fc5b4ae
CanvasWidget: add auto-viewport property.
...
The auto-viewport property allows to disable automatic
update of the canvas viewport update upon resizing
the PUI canvas widget.
2013-02-25 15:32:07 +01:00
James Turner
1eb8ae1fbf
Give the FGAirport class a sane filename.
...
simple.[cxx|hxx] -> airport.[cxx|hxx]
2013-02-21 11:32:02 +00:00
Christian Schmitt
11c00afaec
Add support for helipads from apt.dat 850+
2013-02-21 00:01:36 +01:00
James Turner
7b663cd7f7
Split huge NasalSys header apart.
2013-02-09 15:33:05 +00:00
James Turner
ce9afecdbd
Support a log-list widget in PUI.
...
Add a puaListBox which can show the contents of a log-buffer. Currently only two buffer sources are supported more to follow (and the dialog XML updates).
2013-02-08 19:39:41 +00:00
Frederic Bouvier
7cc3ffb30f
Fix build for windows after logstream changes
2013-02-08 08:46:34 +01:00
James Turner
7cf4aa2d86
Make various PUI widgets private.
2013-02-07 12:02:52 +00:00
James Turner
11f15a9b36
Joystick/dialog caches, commit the transactions.
2013-01-25 09:30:31 +01:00
James Turner
37900e22a8
Wrap dialog and joystick stat-cache in a transaction.
...
Should improve startup times when the cache is rebuilt.
2013-01-24 09:27:09 +01:00
James Turner
a31c2d519c
Tolerate old blocks support in 10.6 compiler.
2013-01-22 18:33:16 +01:00
James Turner
980105385d
Use the aircraft position helper.
2013-01-22 18:15:05 +01:00
James Turner
c70bd65922
Tweaking syntax for 10.6 block locals.
2013-01-19 18:05:35 +00:00
James Turner
008a2d65f1
Make it all work with existing FileSelector API.
2013-01-19 16:23:05 +00:00
James Turner
9f8c66fbf9
Cocoa: use a window-sheet, and fire the callback.
2013-01-19 14:41:45 +00:00
James Turner
2e1fb7972e
Initial work on native file dialog support.
...
Add an abstract interface, version that forwards to the existing PUI dialog, and a Cocoa-native version.
2013-01-19 14:41:45 +00:00
James Turner
1e8cdd5829
Support partial all-within-range spatial queries.
...
As an opt-in API, allow clients to request partial results, with a time-bounded cutoff. Use this to keep the MapWidget responsive even when many airports are being added to the cache (e.g., zooming out or panning rapidly when zoomed out)
2012-12-18 10:23:44 +00:00
Thomas Geymayer
41d285a821
Canvas: remove old event handling code
2012-12-16 19:04:38 +01:00
James Turner
433af2b51a
Flight-path-history.
...
Record the historical flight-path (by default, since last takeoff). Optionally display the flight-path in the map; other visualisations (e.g., an 'in-world' view) could also be created. Nasal API to follow so Canvas-map or FMS can show the same data.
Altitude and attitude (Euler angles) are currently recorded but not used anywhere.
2012-12-10 18:11:44 +00:00
Thomas Geymayer
e62649e075
CanvasWidget: Retrieve texture id every frame.
...
If the size of a Canvas changes also the texture id
changes. We now retrieve the texture id for the CanvasWidget
every frame to ensure it uses the latest texture instance.
2012-12-09 23:15:49 +01:00
Thomas Geymayer
13cec7bd99
Canvas MouseEvent now provides client and screen position
2012-12-08 15:02:15 +01:00