Board index FlightGear Development Canvas

Aircraft Center | pui2canvas parser (devel-list follow-up)

Canvas is FlightGear's new fully scriptable 2D drawing system that will allow you to easily create new instruments, HUDs and even GUI dialogs and custom GUI widgets, without having to write C++ code and without having to rebuild FlightGear.

Re: Aircraft Center | pui2canvas parser (devel-list follow-u

Postby Hooray » Mon Sep 05, 2022 3:50 pm

wow, kudos for understanding that so quickly !
It's exactly like that: https://wiki.flightgear.org/Howto:Proce ... s#Approach

We do have an API to register new fgcommands that are implemented in Nasal, and that API can also be used to override built-in APIs.
The pui2canvas module used a separate/new fgcommand, not to conflict with the built-in PUI related fgcommands, but could easily override those, too.

Yes, it's all been planned and figured out 7+ years ago - it was just put on the back burner, because of the Qt5 effort - but now it seems that this is being discarded in favor of the Canvas approach.
Thus, with "official" endorsement from James himself, it might make sense to read up on the original concept.

The original idea can be looked up here: https://wiki.flightgear.org/Canvas_widgets

Given that there is now support from the C++ side as well, things are actually easier than before - there really isn't much missing, basically just a handful of widgets: https://wiki.flightgear.org/Canvas_widget_matrix

If in doubt, it might be a good idea to get involved in James's work and maybe use the upcoming hackathon to prototype a few missing widgets - however, the first step might be to review/update our wiki docs to better document how to create such Canvas widgets: https://wiki.flightgear.org/Howto:Creat ... GUI_Widget

I suppose, once that's fixed up, more people could get involved in creating the handful of missing Canvas widgets, so that James could focus on the C++ side.

Again, the hackathon would seem like an ideal opportunity to get rid of PUI that way

Finally, pui2canvas was just meant to be proof-of-concept at the time (it took a few weekends to prototype the parser), James has now been working on a new parser, that's already in $FG_ROOT - so if in doubt, please get involved in his effort.
The pui2canvas article was only kept for future reference (hoping it would never be needed ... but alas :wink: )
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 12707
Joined: Tue Mar 25, 2008 9:40 am
Pronouns: THOU

Re: Aircraft Center | pui2canvas parser (devel-list follow-u

Postby Hooray » Tue Sep 06, 2022 4:04 pm

Based on merspieler's posting, there's now a dedicated proposal for the upcoming 2022 Hackathon to help prototype a few more widgets to finally get rid of PUI: https://wiki.flightgear.org/Hackathon_P ... as_Widgets
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 12707
Joined: Tue Mar 25, 2008 9:40 am
Pronouns: THOU

Re: Aircraft Center | pui2canvas parser (devel-list follow-u

Postby TheEagle » Tue Sep 06, 2022 4:45 pm

I'll see if I can find a few hours to help at the Hackathon, so definitely send me the link for joining once there is one ! :)
Cessna 210 (Wiki)
My other aircraft: my wiki profile !
Other: FGTools (GitHub)
World tour: View on SkyVector
Please consider donating $1 / €1 to help me finance a new camera !
User avatar
TheEagle
 
Posts: 3411
Joined: Sat May 01, 2021 3:27 pm
Location: France
Pronouns: You, he
Callsign: F-EAGLE
IRC name: none
Version: Git next
OS: Ubuntu Studio 22.04

Re: Aircraft Center | pui2canvas parser (devel-list follow-u

Postby merspieler » Tue Sep 06, 2022 5:19 pm

Well we haven't decided on a date yet... and only thing I've got back so far was a vague "not on the WE before or after fsweekend"...
If I'd manage to fix my survey site (actually reinstall it) I'd post a survey for folks to just click the dates...

so spread the word, idk, maybe we should do a forum post???

also thanks @hooray for doing the wiki work
Nia (you&, she/her)

Please use gender neutral terms when referring to a group of people!

Be the change you wish to see in the world, be an ally to all!

Join the official matrix space
merspieler
 
Posts: 2241
Joined: Thu Oct 26, 2017 11:43 am
Location: Wish to be in YBCS
Pronouns: you&, she/her
Callsign: you&, she/her
IRC name: merspieler
Version: next
OS: NixOS

Re: Aircraft Center | pui2canvas parser (devel-list follow-u

Postby TheEagle » Tue Sep 06, 2022 5:20 pm

merspieler wrote in Tue Sep 06, 2022 5:19 pm:so spread the word, idk, maybe we should do a forum post???

Definitely, pin it at the top, too ! :)
Cessna 210 (Wiki)
My other aircraft: my wiki profile !
Other: FGTools (GitHub)
World tour: View on SkyVector
Please consider donating $1 / €1 to help me finance a new camera !
User avatar
TheEagle
 
Posts: 3411
Joined: Sat May 01, 2021 3:27 pm
Location: France
Pronouns: You, he
Callsign: F-EAGLE
IRC name: none
Version: Git next
OS: Ubuntu Studio 22.04

Re: Aircraft Center | pui2canvas parser (devel-list follow-u

Postby Hooray » Tue Sep 06, 2022 5:30 pm

TheEagle wrote in Tue Sep 06, 2022 4:45 pm:I'll see if I can find a few hours to help at the Hackathon, so definitely send me the link for joining once there is one ! :)


It seems, based on James's posting, he's primarily looking for help with the visual/artistic side of things - so there probably isn't much needed coding wise.
As a matter of fact, folks familiar with HTML5/CSS would apparently come in handy right now.
The other thing to keep in mind is that the existing artwork of the Canvas UI was indeed borrowed from Ubuntu/Gtk (?) 10 yrs ago - I believe the style was called "AmbianceClassic", it should be located somewhere in $FG_ROOT: https://sourceforge.net/p/flightgear/fg ... ceClassic/

This is based on the docs found here: https://wiki.flightgear.org/Howto:Creat ... ing_colors

In other words, even folks with zero coding experience should consider getting involved to help those not wanting to do artwork.

Obviously, folks already familiar with Nasal/Canvas or maybe even familiar with the Canvas GUI system (widgets) should definitely consider getting involved to help with the creation of widgets.
Some widgets are particularly straightforward to create, for instance the vrule/hrule widgets (totally inactive, no event handling required)

One of the most important widget classes to create, would be a "list" widget, because that could then be use for the various combo/select implementations respectively, including the menubar specifically (as well as sub-menus !)

For testing purposes, it does help to have such a list dialog, with a list of all local dialog files, to preview those and see how well layouting/widgets are supported with the current XMLDialog parser:
Image
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 12707
Joined: Tue Mar 25, 2008 9:40 am
Pronouns: THOU

Re: Aircraft Center | pui2canvas parser (devel-list follow-u

Postby TheEagle » Tue Sep 06, 2022 5:57 pm

HTML5/CSS ? Perfect ! :) I made a little website as a private coding experiment, which was never hosted anywhere, and got lost … but I accumulated quite a bit of styling experience, definitely. But we ain't gonna use CSS, right ? Just some Nasal derivation !
Cessna 210 (Wiki)
My other aircraft: my wiki profile !
Other: FGTools (GitHub)
World tour: View on SkyVector
Please consider donating $1 / €1 to help me finance a new camera !
User avatar
TheEagle
 
Posts: 3411
Joined: Sat May 01, 2021 3:27 pm
Location: France
Pronouns: You, he
Callsign: F-EAGLE
IRC name: none
Version: Git next
OS: Ubuntu Studio 22.04

Re: Aircraft Center | pui2canvas parser (devel-list follow-u

Postby Hooray » Thu Sep 08, 2022 9:32 am

Right, it's not exactly html5/Css but rather a subset of that - just like scripting in flightgear isn't exactly Javascript or ECMAScript, but rather a subset of that - so related expertise comes in handy, but you really only need a tiny fraction of the whole thing
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 12707
Joined: Tue Mar 25, 2008 9:40 am
Pronouns: THOU

Re: Aircraft Center | pui2canvas parser (devel-list follow-u

Postby Hooray » Fri Sep 09, 2022 1:30 pm

People wanting to help with the visual/artwork side of things, should download the AmbianceClassic tarball and check out the CSS/image files found there:

https://wiki.flightgear.org/Hackathon_P ... as_Widgets
Image

So, pretty much all the artwork required for the missing widgets can be easily reused.

Obviously, the next question is, just how good/bad is the existing tutorial to get people started writing simple widgets for the Canvas GUI system.

The corresponding docs should probably be reviewed/updated as needed, so that experienced people with working Nasal/Canvas knowledge, can indeed prototype their own widgets without too much effort.

https://wiki.flightgear.org/Canvas_MessageBox
Image
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 12707
Joined: Tue Mar 25, 2008 9:40 am
Pronouns: THOU

Re: Aircraft Center | pui2canvas parser (devel-list follow-u

Postby Hooray » Mon Sep 26, 2022 5:27 pm

TheEagle wrote in Sun Sep 04, 2022 3:04 pm:In fact, I started working on a slider widget some time ago, for the ground towing dialog of my C210, which I wanted to implement in Nasal - but then, my focus shifted onto the new 3D model (and I did some work on two other aircraft as well) so it was never finished. I could finish that in the near future - so, maybe implement the other widgets first ! ;)


James has now started adding some of the work he's been doing behind the scenes to git, including a slider widget specifically:

https://sourceforge.net/p/flightgear/fg ... d1fce6daa/
https://sourceforge.net/p/flightgear/fg ... 840a7cbe7/
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 12707
Joined: Tue Mar 25, 2008 9:40 am
Pronouns: THOU

Re: Aircraft Center | pui2canvas parser (devel-list follow-u

Postby TheEagle » Mon Sep 26, 2022 5:30 pm

Ohh, very great ! :D
Cessna 210 (Wiki)
My other aircraft: my wiki profile !
Other: FGTools (GitHub)
World tour: View on SkyVector
Please consider donating $1 / €1 to help me finance a new camera !
User avatar
TheEagle
 
Posts: 3411
Joined: Sat May 01, 2021 3:27 pm
Location: France
Pronouns: You, he
Callsign: F-EAGLE
IRC name: none
Version: Git next
OS: Ubuntu Studio 22.04

Re: Aircraft Center | pui2canvas parser (devel-list follow-u

Postby Hooray » Sat Apr 22, 2023 11:47 am

For those not following the devel-list, or not able to build from source, here's the current state of affairs regarding the new XMLDialog.nas parser created by James to interpret PUI/XML dialogs by mapping those to Canvas widgets (the majority of which have recently been completed/created by TheEagle), the parser will make it possible to get rid of PUI, and help migrate to OpenGL Core Profile in the process - and therefore also help people on Mac OS or those interested in using HDR:

https://wiki.flightgear.org/PUI#Canvas_Emulation
Image
Image
Image
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 12707
Joined: Tue Mar 25, 2008 9:40 am
Pronouns: THOU

Previous

Return to Canvas

Who is online

Users browsing this forum: No registered users and 2 guests