Xorph


Navigation
  • about
  • features
  • examples
  • requirements
  • download
  • installation
  • contact
  • SourceForge

  • SourceForge Logo

    example :: wizard-like dialog


    I assume that you have already taken a look at the simple dialog example, so I won't bore you with the details of assembling a test frame and compiling again. Here is the source of our wizard example:

    Xorph source code

    <?xml version="1.0" encoding="UTF-8"?>
    <xorph:environment name="SimpleWizardEnvironment" 
                       prefix="XorphSimpleWizardEnvironment" 
                       xmlns:xorph="http://xorph.sourceforge.net/" 
                       xmlns:x0="http://www.w3.org/2001/XMLSchema">
        <options>
            <group label="Player Information" name="PlayerInfo">
                <option label="Player Name" name="Name">
                    <text case="any" defaultValue="Player 1"/>
                    <description>Enter the name of your in-game character here.</description>
                </option>
                <option label="Real Name" name="RealName">
                    <text case="any" defaultValue="Your Real Name Here"/>
                    <description>Enter your real name here.</description>
                </option>
                <option label="Password" name="Password">
                    <text case="any" password="true"/>
                    <description>Please enter your game password here.</description>
                </option>
            </group>
            <group label="Game Settings" name="GameSettings">
                <option label="Skill Level" name="SkillLevel">
                    <selectNumeric standardDisplay="radiobuttons" defaultValue="2">
                        <values>
                            <value label="Beginner" value="1"/>
                            <value label="Intermediate" value="2"/>
                            <value label="Expert" value="3"/>
                        </values>
                    </selectNumeric>
                    <description>Select your experience level.</description>
                </option>
                <option label="Start Level" name="StartLevel">
                	<numeric minValue="1" maxValue="50" />
                	<description>Select the level you'd like the game to start with.</description>
                </option>
            </group>
        </options>
        <interface name="SetupWizard" title="Game Setup Wizard">
            <wizardDialog>
                <page name="WizPlayer" label="Player Information">
                    <text>Please enter the following information in order to start the game.</text>
                    <includeGroup name="PlayerInfo" withFrame="false"/>
                </page>
                <page name="WizGame" label="Game Settings">
                    <text>Now select your preferred game settings.</text>
                    <includeOption name="StartLevel" />
                    <includeOption name="SkillLevel" display="listbox" />
                </page>
                <page name="WizFinal" label="Game Setup Completed">
                    <text>Good luck!</text>
                </page>
            </wizardDialog>
        </interface>
    </xorph:environment>

    Screenshots

    The generated wizard consists of three pages that look like this:

    first page
    second page
    third page

    © 2005 Volker Wegert