Changes

Jump to navigation Jump to search
Line 5: Line 5:        +
* [[Canvas Image]]
 +
* [[Howto:Using raster images and nested canvases]]
 +
* [[Canvas Event Handling]] <ref>{{cite web  |url    =  https://forum.flightgear.org/viewtopic.php?p=325378#p325378  |title  =  <nowiki> Re: Plot2D and graph helpers </nowiki>  |author =  <nowiki> Hooray </nowiki>  |date  =  Dec 28th, 2017  |added  =  Dec 28th, 2017  |script_version = 0.36  }}</ref>
    
this way of setting up the skin using a hash with arguments is pretty elegant - I forgot to mention that you can obtain the coordinates for the hotspot by using a global event  listener on the canvas/group and make that print the coordinates for drag/drop to the console. That way, it is easy to come up with the coordinates for all widgets, but also for the inner screen region - i.e. where you'd probably use clipping and/or a canvas image child to reference the actual graph canvas.If you are planning on adding such a skin also to your GCA addon, my suggestion would be to come up with a helper class, e.g. something like "Skinnable", using an outer image and an inner one (potentially, even a vector of images). The helper class could also contain support for setting up hot-spots specific tooltips. I've been in touch with Stuart about this, mainly in the context of his recent FG1000 work, so if you should come up with such a helper class (or even just a wiki tutorial demonstrating the approach), that may be helpful in and of itself.<ref>{{cite web  |url    =  https://forum.flightgear.org/viewtopic.php?p=325986&sid=65fb3d1c5549ac1c3d8e0d0295887457#p325986  |title  =  <nowiki> Re: Spoken GCA </nowiki>  |author =  <nowiki> Hooray </nowiki>  |date  =  Jan 7th, 2018  |added  =  Jan 7th, 2018  |script_version = 0.36  }}</ref>
 
this way of setting up the skin using a hash with arguments is pretty elegant - I forgot to mention that you can obtain the coordinates for the hotspot by using a global event  listener on the canvas/group and make that print the coordinates for drag/drop to the console. That way, it is easy to come up with the coordinates for all widgets, but also for the inner screen region - i.e. where you'd probably use clipping and/or a canvas image child to reference the actual graph canvas.If you are planning on adding such a skin also to your GCA addon, my suggestion would be to come up with a helper class, e.g. something like "Skinnable", using an outer image and an inner one (potentially, even a vector of images). The helper class could also contain support for setting up hot-spots specific tooltips. I've been in touch with Stuart about this, mainly in the context of his recent FG1000 work, so if you should come up with such a helper class (or even just a wiki tutorial demonstrating the approach), that may be helpful in and of itself.<ref>{{cite web  |url    =  https://forum.flightgear.org/viewtopic.php?p=325986&sid=65fb3d1c5549ac1c3d8e0d0295887457#p325986  |title  =  <nowiki> Re: Spoken GCA </nowiki>  |author =  <nowiki> Hooray </nowiki>  |date  =  Jan 7th, 2018  |added  =  Jan 7th, 2018  |script_version = 0.36  }}</ref>

Navigation menu