WorldForge Theme Chart v.000000003
Revised Sun Mar 17 08:36:56 2002 PST
Widgetp/fElementState
CheckBox pEnabledn/a
fBoxChecked
fBoxUnchecked
fBoxDisabled
Fonts pDefault Face Namen/a
fDefault Face
Meta pTheme Namen/a
pTheme Versionn/a
pTheme Descriptionn/a
pAuthor Namen/a
pAuthor Emailn/a
pCopyrightn/a
Pointer pNamen/a
fPointer Image(Any)
ProgressBar fLeftEnd
fRightEnd
fHorizSpan
fTopEnd
fBottomEnd
fVertSpan
PushButton fBackgroundReleased
fBackgroundPressed
fBackgroundDisabled
fIcon(Any)
fClick Sound
RadioButton fButtonChecked
fButtonUnchecked
fButtonDisabled
ScrollBar fBackground(Any)
fUpButtonPressed
fUpButtonReleased
fDownButtonPressed
fDownButtonReleased
fLeftButtonPressed
fLeftButtonReleased
fRightButtonPressed
fRightButtonReleased
fThumbPressed
fThumbReleased
Sounds fDefault Click
fDefault Question
fDefault Error
SpinnerBox fUpButtonReleased
fUpButtonPressed
fUpButtonDisabled
fDownButtonReleased
fDownButtonPressed
fDownButtonDisabled

Notes:
  • This document is a collection of first thoughts on the subject of themes. It's incomplete and needs to be fleshed out.
  • What's "p/f", you ask? A component can be a widget or a piece of information. Components are considered to have (informational) properties and filenames which refer to binary data.
  • Themes may not be simply lists of required files. In order for WorldForge games to have consistent interfaces, the common widgets should have common behaviors. A checkbox in one client should not only look like a checkbox in another client, it should behave like one.
  • Need to work out terminology, so there isn't any confusion about what is what. Words like "component" and "widget" should be used consistently across projects.
  • Widgets inherit things like fonts, so a checkbox would render its text in the "default" font unless it specifically overrode that font with a different one. Should the theme widget specify the default to use?
  • I've included a "Sounds" section because different themes may have different sounds associated with them. If I have a wood-theme, I want to hear woody sounds. If my theme looks like it's made of granite, I want to hear stony sounds, not wood. And so on.
  • The format for expressing this info will be XML. The paragui theme file is a good model to look at, though I don't like all the free-floating entries.
    Sample:

    <?xml version="1.0"?>
    <theme>
       <meta>
          <ThemeName value="default"/>
          <ThemeDescription value="WorldForge default theme"/>
          <ThemeVersion value="1.0.0"/>
          <AuthorName value="Your Name Here"/>
          <AuthorEmail value="themes@worldforge.org"/>
       </meta>

       <widget>
          <type value="Pointer"/>
             <object>
                <name value="Arrow"/>
                <filename value="default/arrow.png"/>
             </object>
       </widget>

       <widget>
          <type value="Pointer"/>
             <object>
                <name value="Crosshairs"/>
                <filename value="default/crosshairs.png"/>
             </object>
       </widget>

       (... and so on ...)

    </theme>


  • Should things like fonts be expressed as a series of <Font> objects, each with a name, or should there be a single <Font> entry, listing all the property/file pairs?
    This would be expressed as:

    <font>
       <name value="default">
       <filename value="bigfont.ttf">
       <size value="10">
    </font>

    <font>
       <name value="decorative">
       <filename value="fancyfont.ttf">
       <size value="11">
    </font>

    or

    <font>
       <default>
          <name value="default">
          <filename value="bigfont.ttf">
          <size value="10">
       </default>
       <decorative>
          <name value="decorative">
          <filename value="fancyfont.ttf">
          <size value="11">
       </decorative>
    </font>



    Send feedback or abuse to eclangel2000 at yahoo.com