Re: [Flightgear-devel] FliteTuror (Was: Adding external nasal bindings & fgcommands)

2004-07-24 Thread Boris Koenig
Let's get back to this one :-)
Erik Hofman wrote:
Boris Koenig wrote:
I wouldn't have a problem, creating the authoring part of the
application as an external application - but THEN I would need
to be able to load FlightGear resources (aircraft/images/panels).

Ok. Lets start a *minimal* list of items that really are needed for this 
and skip the implementation part for now. This is what I think what 
would be needed (feel free to add your ideas).
Anything else (remember, this is the *absolute minimum*)?
Besides the things that I mentioned already in the original "short" ;-)
reply to your message, I think the two most important things would
currently be:
-   basic functionality to deal with XML files (using Nasal)
-   dynamic creation & population/modification of
controls/dialogs using Nasal
Also, some more customization of the current PUI XML-bindings might be
necessary, in order to be able to tailor dialogs/controls (i.e.
 transparency/movable flag) - Andy mentioned something like this already
- if you take a look at the  screenshot on the FliteTutor concept
webpage, you'll notice for example, that the combo box in the upper left
corner opens upwards, while it should -in this case- actually open
downwards (otherwise the menu contents aren't visible anymore).
Using PUI directly it's afaIk possible to specify such details -
hence it shouldn't be too complicated to add a corresponding option
to the XML<->PUI layer.
I would be willing to make the necessary modifications myself, also to
add things like basic font formatting - would these changes then be
accepted for the official CVS version ?
You know, that's the actual problem I was having, also regarding the
whole plugin stuff that I mentioned: making such modifications directly
to FlightGear sources would always require these things to be accepted
for FlightGear itself, while having a separate library taking care of
this stuff wouldn't require any direct access to FlightGear in most
cases, hence one wouldn't rely on a particular FlightGear release/build
to be able to use a new function, which is actually not even part of
FlightGear itself...
Regarding the standard FlightGear menubar, I think it might be useful
to optionally make it auto-hide/show - that way it would only be
displayed if the mouse is in the corresponding area, and fade out as
soon as the mouse leaves that area.
In the end, I don't mean to blow up Nasal, but rather use some scripts
as backend library to load & display a set of pages - but of course
this would still require some additions to the current command set.
But I don't think this would be too dramatic, on the other hand adding
a couple of new functions/bindings might also create new possibilites,
one might even start to create things like a FMC based on Nasal.
Hope this mail was short enough ;-)
-
Boris
___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel


Re: [Flightgear-devel] FliteTuror (Was: Adding external nasal bindings & fgcommands)

2004-07-15 Thread Boris Koenig
Erik: you are causing some trouble over here, actually I didn't want to
change the project's sourceforge name, but I appreciate you taking the
time to make even another suggestion ;-)
Erik Hofman wrote:
Boris Koenig wrote:
I wouldn't have a problem, creating the authoring part of the
application as an external application - but THEN I would need
to be able to load FlightGear resources (aircraft/images/panels).

Ok. Lets start a *minimal* list of items that really are needed for this 
and skip the implementation part for now. 
Okay, no problem - so you are now only talking of the "Player"
part, right ?
This is what I think what would be needed (feel free to add your ideas).
okay, then I'll write down those things that I'd like to be able to
do *interactively* using Nasal (i.e. don't want to rely on static files)
* A configurable, interactive menu system.
yes, this could easily be done by making the menu system available
via a set of nodes in a corresponding property tree.
*But this is currently NOT essential* - the menu(bar) itself is less
likely to be changed that often - compared to other GUI elements.
So, I would not even add it to the "minimal list" right now - but IF
it gets implemented it would make sense to add some kind of
Nasal function to globally register Nasal based addons, that way
I would not have to use a certain Menu named "FliteTutor" but rather
could register FliteTutor to be loaded within a menu called "Addons"
or something like that.
* The ability to load a set of "sheets", one after each other.
right, I have looked into the sources and think that should be also
possible to be achieved using some specific node in a property
tree (I gave some examples in one of my last eMails).
What I am now using - for testing purposes is:
/addons/FliteTutor/player/pages
and
/addons/FliteTutor/player/currentpage
While the former is an object that contains all necessary properties
for a specific page, like:
pages[0]/position/x
pages[0]/position/y
etc.
And the latter property specifies which of the pages in player/pages
is currently being displayed and hence should be read from the prop tree.
(Since, I don't yet know how to save & load this stuff using Nasal, I am
setting it up each time in order to have some stuff available)
* Be able to add the following to these sheets:
  - Dynamic text at a static location (*)
...also DYNAMIC positioning - this could be also implemented using
a specific node in the property tree.
text = setprop("/subsystem/../createTextWidget",1);
setprop(text,"position/x[0]",100);
setprop(text,"position/y[0]",200);
and if possible, some simple formatting would also come in handy-
like 2-3 different font sizes, BOLD and UNDERLINED text:
setprop(text,"font/format/size[0]","LARGE");
setprop(text,"font/format/bold[0]",1);
This would probably already be sufficient regarding font handling.
  - Static images (*)
yes, images won't get created on the fly, for any other dynamic
image based contents I would make use of animations.
But it would be useful if I could not only specify their
position in some XML file but rather do this dynamically -
I think I did also provide  a pseudo (nasal) code example
in of my last mails.
Something like:
//Create Image
img = setprop("/subsystem/createImg[0]",1);
//file
setprop(img,"filename[0]","sample.gif");
/*OPTIONALLY, it might be useful if I could directly provide a
binary or hex-encoded buffer to that function, in order to
enable storing of images WITHIN a XML file:

0xFF,0xFF,0xFF,0xFF,0xFF .

And load this then by doing the following in Nasal:
readXML = func {
// function to retrieve contents of a section within a
// particular XML file
}
data = readXML();
setprop(img,"buffer[0]",data);
Even though that's not particularly elegant,
it would enable EASY exchange of modules, since
these wouldn't have any external dependencies
but could rather store all resources (e.g. images,
 sound) within a module, EVEN if these are binary.
*/
//Position
setprop(img,"position/x[0]",100);
setprop(img,"position/y[0]",200);
//Dimensions
setprop(img,"dimensions/x[0]",100);
setprop(img,"dimensions/y[0]",100);
  - Animated instruments that react to actions of the user(*)
yep, as well as being animated by the "player" - for illustrative
purposes, but this isn't a problem I think, as I got an example to
work already.
But again, I don't want to rely on external XML files :-)
* Pop-up screens to guide a user.
right, I'm currently using a statically defined dialog with
a fixed width, what I considered being useful AND powerful
(also for FlightGear itself!) would be a template based
dial

Re: [Flightgear-devel] FliteTuror (Was: Adding external nasal bindings & fgcommands)

2004-07-15 Thread Erik Hofman
Andy Ross wrote:
Erik Hofman wrote:
* The ability to load a set of "sheets", one after each other.
* Be able to add the following to these sheets:
  - Dynamic text at a static location (*)
  - Static images (*)
  - Animated instruments that react to actions of the user(*)

Most of this sounds like the existing GUI layer.  I was thinking a
while back about writing a Pui widget that allows you to put a 2D
instrument (with hotspots) onto a GUI dialog.
Yes. An alternative would be to load different panels as sheets, one 
after each other.

Erik
___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel


Re: [Flightgear-devel] FliteTuror (Was: Adding external nasal bindings & fgcommands)

2004-07-15 Thread Andy Ross
Erik Hofman wrote:
> * The ability to load a set of "sheets", one after each other.
> * Be able to add the following to these sheets:
>- Dynamic text at a static location (*)
>- Static images (*)
>- Animated instruments that react to actions of the user(*)

Most of this sounds like the existing GUI layer.  I was thinking a
while back about writing a Pui widget that allows you to put a 2D
instrument (with hotspots) onto a GUI dialog.

Andy


___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel