NewOpts v0.965: with HudMover, Autoload and FovStack
----------------------------------------------------

To install:

0. IMPORTANT: You have to have Presto v0.93 (or later) installed first!

1. Unzip NewOpts965.zip into the <Tribes>\config directory.

   If you already have installed NewOpts 0.95 or earlier, you can delete
   the NewOpts directory from <Tribes>\config, and you can delete the
   Option.gui file from <Tribes>\gui.

2. In your <tribes>\config\autoexec.cs file, IMMEDIATELY after the line
        exec("presto\\install.cs");
   add the line
        Include("Autoload.cs");

   If you have the line
        Include("NewOpts\\Install.cs");
   go ahead and remove it.

3. (Re)Start Tribes

Don't forget to check out the new prefs on the Option Screen!

Regards,

Tim '[SS-12]Zear' Hammock
zear@planetstarsiege.com

*** Visit Zear's Client-side Scripting at *** http://www.planetstarsiege.com/zear

============================================================================

About Autoload:

    Autoload will automatically search for files (in the search path) with the
    extensions '.acs.cs' and '.avl.vol' and execute those scripts. By default,
    the search path contains the directories:

        config
        base
        base\missions
        base\fonts
        base\skins
        base\voices
        base\scripts
        recordings
        temp
    
    In the case of an '.avl.vol' file, autoload will assume it contains a file
    with the same base name and '.cs' extension (and located at the root of the
    .vol file), and will execute that script file. For instance, if it finds a
    file named 'example.avl.vol', autoload will load the volume, and attempt an
    'Include("example.cs");' call.
    
    If a file contained inside the .vol file exists as a bare file (outside of
    the .vol file), that file will be Include()'ed instead.
    
    This should make future script installations a snap, since the script
    could be entirely contained within the .vol file and would require no editing
    of autoexec.cs at all. Simply drop the new script's .vol file into the config
    directory and the install is complete.
    
    Preventing autoload of a script:
    --------------------------------

    Once a file has been autoloaded at least once, you can disable autoloading for
    that file by editing '<Tribes>\config\AutoloadPrefs.cs'. Within that file
    you will find lines similar to:
    
            $Autoload::doAutoload["example.avl.vol"] = "true";
            
    By changing the "true" to a "false" and saving the file, the file
    "example.avl.vol" will be ignored on startup until the "false" is changed back
    to a "true". Of course, you could simply move the offending file elsewhere,
    which will prevent it from being loaded (naturally).
    
    In the future I plan to move this operation to an in-game gui interface.
    
    Note to scripters:
    ------------------
    
    To add a directory to the search path, append it to the end of
    $ConsoleWorld::DefaultSearchPath. For instance:
	
	$ConsoleWorld::DefaultSearchPath = $ConsoleWorld::DefaultSearchPath@";MyDirectory"

    When naming files, be aware and try not to pick a name that is in use anywhere
    else. The autoload routines work on a first-found first-loaded basis. I intend
    to create an API document to cover all of the NewOpts package, including
    Autoload (time is a wee bit precious lately). Patience please...

============================================================================

Using HudMover:

    The 'default' position for a HUD is the position specified (by
    the HUD's script) when the HUD was created. The 'reset'
    position is the last position it occupied before HudMover was
    activated.

    HudMover will save the position to which you moved each HUD,
    and upon restarting Tribes, it will restore each HUD to the
    new position.

    To activate HudMover:

    1. Make sure you have assigned a key or key combination to
       HudMover on the NewPrefs Play options screen.

    2. Go to the screen where the hud (you wish to move) appears.
       If you wish to move an in-game HUD, and you are not
       currently connected to a server and in a game, you can use
       a practice map.

    3. Press the key(s) assigned in step 1.

    4. Move and save the HUD using the following keys:

        + Click on a HUD to select it.

        + Tab & shift-tab to cycle the selection through the HUDs.

        + Up, down, left & right arrow keys to move the selected
          HUD.

        + Number pad keys 5, 2, 1 & 3 to resize the selected HUD.

        + Holding 'shift' while moving or resizing increases the
          speed of change.
    
        + 'r' key to reset the selected HUD to its last position.

        + shift-'r' key to reset all HUDs to their last positions.
    
        + 'd' key to reset the selected HUD to its default
          position.

        + shift-'d' key to reset all HUDs to their default
          positions.
    
        + Spacebar to open the positioning dialog (see below) for
          the selected HUD.
    
        + 's' key to shift the status bar position (this window).

        + 'i' key to toggle the display of these instruction on or
          off.

        + ESC or 'q' key to quit HudMover.

	New:

	+ 'h' key to hide/show the selected hud (while in HudMover).

	+ shift-'h' key to hide/show all huds (while in HudMover).

    NOTE:
    Standard Tribes HUDs can be repositioned by dragging while
    HudMover is active.



Using HudMover's positioning dialog:

   Note: For information on valid strings for specifying HUD
         coordinates, see Presto's comments at the beginning
         of HUD.cs (in the config/Presto directory).

   Click on a coord name ("Left" for example) to edit that coord.
   Choose a 'Type' and, if applicable, a 'Rel. To' and 'Edge'.
   Complex type allows direct editing.

   There are now 4 ways to specify the exact location of the
   selected HUD:

    + Pixel    - exact pixel placement
               - ex. "100 100 200 200"

    + Adaptive - placement by percentages
               - ex. "0% 0% 75% 25%"

    + Offset Relative - placement by percentages or hud relative,
                 with an offset in pixels
               - ex. "0%+5 bottom(hudX)+5 75% 25%"

    + Complex  - anything with more than 2 operands (or anything
                 HudMover can't/won't parse, like * and /)
               - ex. "left(hudX)*2 bottom(hudX)+10-3 width(hudX)/2 20"

    When the dialog is brought up, the selected HUD's position is
    interpreted and EACH COORDINATE is assigned to one of those four
    categories. If the HUD coord consists of digits only, it is 
    determined to be a pixel placement. If the HUD coord consists 
    of digits and percentage signs only it is categorized as adaptive
    placement. Any hud or screen relative coord will be categorized
    as offset relative. Any other content in the HUD's coord will 
    cause it to be classified as complex.
   
    There are some positioning issues introduced by changing the
    placement type:

    When you change the placement type,
    the dialog will convert the values to be appropriate for the
    new type. When converting from pixel to adaptive, the HUD may
    be moved slightly. This is because there are more pixel
    positions than adaptive positions. For instance, on a 640x480
    screen, there are 6.4 pixels across for every percent of the
    screen, so the HUD position could shift up to 6 pixels. The
    HUD will retain this new position when changing the type back
    to pixel.
  
    When you change the placement type from complex to one of the
    other types, the position will be recalculated for the new
    type. When changing back, this calculation cannot be reversed,
    so the new complex position will be the same as the previous
    pixel or adaptive placement.

    In this dialog (only) the 'reset' position is the last
    position the HUD occupied before the positioning dialog was
    opened. These buttons will allow you to reset back to one of
    those two positions when the conversion process produces
    unwanted results.

Scripters:
----------

Restricting options page registration:

    To make life easier when you want to create a new options gui,
    set:

        $NewPrefs::doregister = "<your page name>";

    in config\NewPrefsPrefs.cs, where <your page name> is the name
    under which you intend to register your new options page. All
    other pages' registration attempts will fail, leaving you with
    a clean slate to begin with, and only your page loaded after that.

    Set:

        $NewPrefs::doregister = "ALL";

    to register them all again.

Constraining HudMover:

    By making a call to

	HudMover::constrainHud(%hud, %constraints)

    a script can prevent a coord from being changed by HudMover.
    This should come in handy for huds that shouldn't be resized,
    etc. %hud should be the name of the hud as passed to HUD:New()
    (or whatever you used to create the hud via Presto). %constraints
    should be a string specifying which coords HudMover should not
    change, and can be any of the following:

        "x", "y", "w", "h", or and combo of these four chars
	    - ex. "xh" prevents changes to x and w

        "all" will prevent ANY changes (the hud will not even be
            selectable)

        "position" is the same as "xy"

        "size" is the same as "wh"

        A bitmask where:
	    x = 1
            y = 2
            w = 4
            h = 8
	Choose the coords to exclude, and add the values.
            - ex. 13 is 1+4+8, is the same as "xwh"

    Only the individual letter settings retain state for the other coords.
    All other settings will reset the mask to no constraints, then apply
    those specified.

    **** IMPORTANT ****    

    To keep HudMover in sync with whatever position options you may have
    created, you should initialize your options with the value you
    recieve from a call to

	HUD::GetPosition(%hud);

    and set the new position with

	HUD::SetPosition(%hud, %pos);
	$Hud::prefs::default::[%hud] = %pos;

    Any time you move your hud you should follow that position setting
    routine - that will make sure that your hud is always created in
    the last place it was set to (whether by your script or by the user).

=================================================================


Changes for v0.965

    + Autoload now 'mounts' all .avl.vol files before loading any .cs files

Changes for v0.9643

    + Autoload now reports proper number of files actually loaded
    + You may exclude registration for all options pages except one
    + Other bugs flushed and now forgotten, mostly in SenseStack

Changes for v0.9642

    + Fixed an Autoload bug (no files being loaded)

Changes for v0.964

    + Fixed an Autoload bug (get list then exec) - Autoload.cs now at v1.11

Changes for v0.963

    + Fixed a sensitivity bug (I hope).

Changes for v0.962

    + Removed Diagnose
    + Moved everything to a .vol file (including Options.gui)
    + autoexec.cs became Autoload.cs
    + Removed Install.cs
    

Changes for v0.96 (unreleased)

    + Added check for misplaced .gui files when loaded by NewOpts
    + Added FovStack
    + Added Autoloader
    + Added Diagnose
    + Added version and load-verification for all .cs files
    + Added SenseStack::getSensitivity() and SenseStack::getCurrentScript()
    + Fixed a SenseStack out-of-order reassignment bug
    + Fixed a bug that could possibly lead to sensitivity escalation
    + Fixed a bug that could possibly lead to FOV escalation
    + Moved installer to a local autoexec.cs file
    + Updated file version numbers, currently at:
          - autoexec.cs (installer) 2.0
          - DialogOpts.cs           1.0
          - FovStack.cs             1.1
          - HudMover.cs             1.0
          - HudMoverConfig.cs       1.0
          - HudPos.cs               1.0
          - MoreString              1.51
          - NewOpts                 0.96
          - NewPrefs                1.03
          - NewPrefsHelp            1.0
          - SenseStack              1.1

Changes for v0.95 final (all HudMover and HudPos):

    + Fixed a coord translation bug
    + Added a message to let the user know if there are no HUDs
          to position in the current gui
    + Fixed a bug that locked the HUDs in the HudMover state (not to
          mention screwing up the keymap) when the mission changes
          while HudMover is active
    + Fixed an ugly little bug that popped up when setting 'Edge'
          when 'Rel. To' is set to '<Screen>'

Changes for v0.95 beta 2 (all HudMover and HudPos):

    + New coord categories
    + Separate category for each coord
    + New coord conversion routines
    + Updated instructions and coord display
    + Hide/show huds (for when they are in the way)
    + Position dialog completely reworked
    + Coord exclusion (see above)
    + Automatic dependent updates
    + Updated event code a-la Presto's suggestions
    + Esc key cancel from dialog works now
    + Choice boxes in dialog (was murder to get working)
    + Probably more I forgot about...

Changes for v0.95 beta 1:

    + Added HudMover
    + Lots of little tweaks
    + Updated file version numbers:
          - Install.cs       0.95
          - NewOpts.cs       0.95
          - NewPrefs.cs      1.02
          - NewPrefsHelp.cs  1.02

Changes for v0.91:

    + Removed two extraneous lines from install.cs, one of which
            was causing an error.
    + Fixed Player Zoom Time - it works now (NewPrefs 1.01)
    + Fixed problem with persistent labels (NewPrefs 1.01)
