I've committed CVS changes to begin an XML-configurable GUI.  It's far
from ready for end-users, but I need early implementors to start
playing with what's there so far and to try making their own, simple
dialogs using XML markup.

To see an XML-configured dialog for a fancy FlightGear hello world,
type Ctrl-D.  The XML configuration is in $FG_ROOT/gui.xml.  There is
a new subsystem named "gui", and a new command "gui" which takes the
argument "name" for the name of the dialog to run, like this:

 <key n="4">
  <name>Ctrl-D</name>
  <desc>Dummy dialog</desc>
  <binding>
   <command>gui</command>
   <name>hello</name>
  </binding>
 </key>

So you can already bind a dialog to any keystroke, mouse action, panel
action, joystick button, etc. etc.

Only a few components are present so far:

  group

    An invisible container holding a group of child components.

  dialog

    A group that will appear centred on the screen, with a visible
    background.  The 'modal' subproperty controls whether the dialog
    is modal (puDialogBox) or non-modal (puPopup).
  
  input

    A text input field that can display the value of a property
    specified in the 'default-value-prop' subproperty (current
    read-only, but soon it will allow you to change the property
    value).

  text

    An uneditable text field.  The text appears in the 'label'
    subproperty.

  button

    A push-button widget, with its text in the 'legend' subproperty.
    Currently, pushing any button simply closes the dialog, but soon
    other types of actions will be available.  The 'default'
    subproperty controls whether the button is the default when the
    user presses Return, and the 'one-shot' subproperty controls
    whether the button pops back up on its own.

Here is a rough outline of my future plans:

1. Allow users to modify property values and to add user-assigned
   actions to buttons.

2. Add more widgets, including at least sliders and check boxes,
   linked to property values.

3. Integrate the XML-configurable menu system into the new system.

4. Completely replace the existing GUI code with the new GUI
   subsystem and delete the old GUI code.

5. Allow dialogs to invoke other dialogs recursively.

6. Integrate Steve Baker's new PSL (PLIB Scripting Language) into the
   dialogs to allow complex, scripted behaviour.

7. Allow eye candy like icons and different fonts and colours.

8. Maybe introduce some simplistic layout managers to make it easier
   to design dialogs and place sub-components.


All the best,


David

-- 
David Megginson, [EMAIL PROTECTED], http://www.megginson.com/

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

Reply via email to