Canvas MapStructure: Difference between revisions

Jump to navigation Jump to search
m (Some layout fixes)
Line 990: Line 990:
* we may also want to support optional mouse-panning (see airport-select dialog)
* we may also want to support optional mouse-panning (see airport-select dialog)
* we may also want to support optional tooltips for layer elements
* we may also want to support optional tooltips for layer elements
== Styling ==
{{WIP}}
You can find more sophisticated examples in the Airbus style created by  Artix, he also had to touch a bunch of MapStructure files to make that work.
The background info is here: [Canvas
In the drawVOR callback it is then using those variables (as per the hash).
<ref>{{cite web
  |url    =  https://forum.flightgear.org/viewtopic.php?p=297586#p297586
  |title  =  <nowiki> Re: [SOLVED] How to modify symbols in MapStructure layers </nowiki>
  |author =  <nowiki> Hooray </nowiki>
  |date  =  Oct 27th, 2016
  |added  =  Oct 27th, 2016
  |script_version = 0.40
  }}</ref>
<syntaxhighlight lang="nasal">
var cache = StyleableCacheable.new(
      name:name, draw_func: drawVOR,
      cache: SymbolCache32x32,
      draw_mode: SymbolCache.DRAW_CENTERED,
      relevant_keys: ["line_width", "color"],
    );
</syntaxhighlight>


== Example: Tutorial Layer TUT ==
== Example: Tutorial Layer TUT ==

Navigation menu