Whoops, missing AO files

This commit is contained in:
Siana Gearz
2011-03-01 05:04:55 +01:00
parent a5a5beea1d
commit 9efef67ddf
9 changed files with 307 additions and 22 deletions

View File

@@ -0,0 +1,122 @@
/**
* @file aoremotectrl.cpp
* @brief toolbar remote for toggling the viewer AO
*
* $LicenseInfo:firstyear=2009&license=viewergpl$
*
* Copyright (c) 2010, McCabe Maxsted
*
* Imprudence Viewer Source Code
* The source code in this file ("Source Code") is provided to you
* under the terms of the GNU General Public License, version 2.0
* ("GPL"). Terms of the GPL can be found in doc/GPL-license.txt in
* this distribution, or online at
* http://secondlifegrid.net/programs/open_source/licensing/gplv2
*
* There are special exceptions to the terms and conditions of the GPL as
* it is applied to this Source Code. View the full text of the exception
* in the file doc/FLOSS-exception.txt in this software distribution, or
* online at http://secondlifegrid.net/programs/open_source/licensing/flossexception
*
* By copying, modifying or distributing this software, you acknowledge
* that you have read and understood your obligations described above,
* and agree to abide by those obligations.
*
* ALL SOURCE CODE IS PROVIDED "AS IS." THE AUTHOR MAKES NO
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
* COMPLETENESS OR PERFORMANCE.
* $/LicenseInfo$
*/
#include "llviewerprecompiledheaders.h"
#include "aoremotectrl.h"
#include "floaterao.h"
#include "llbutton.h"
#include "lloverlaybar.h"
#include "lluictrlfactory.h"
#include "llviewercontrol.h"
AORemoteCtrl::AORemoteCtrl()
{
setIsChrome(TRUE);
build();
setFocusRoot(TRUE);
}
AORemoteCtrl::~AORemoteCtrl()
{
}
void AORemoteCtrl::draw()
{
LLButton* expand_button = getChild<LLButton>("popup_btn");
if (expand_button)
{
if (expand_button->getToggleState())
{
expand_button->setImageOverlay("arrow_down.tga");
}
else
{
expand_button->setImageOverlay("arrow_up.tga");
}
}
LLPanel::draw();
}
void AORemoteCtrl::build()
{
if (gSavedSettings.getBOOL("ShowAOSitPopup"))
{
LLUICtrlFactory::getInstance()->buildPanel(this, "panel_ao_remote_expanded.xml");
}
else
{
LLUICtrlFactory::getInstance()->buildPanel(this, "panel_ao_remote.xml");
}
}
BOOL AORemoteCtrl::postBuild()
{
childSetAction("ao_btn", onClickToggleAO, this);
childSetAction("ao_sit_btn", onClickToggleAOSit, this);
childSetAction("ao_show_btn", onClickShowAO, this);
childSetAction("popup_btn", onClickPopupBtn, this);
return TRUE;
}
// static
void AORemoteCtrl::onClickToggleAO(void* data)
{
BOOL ao_enable = gSavedSettings.getBOOL("AOEnabled");
gSavedSettings.setBOOL("AOEnabled", !ao_enable);
}
//static
void AORemoteCtrl::onClickToggleAOSit(void* data)
{
BOOL sit_enable = gSavedSettings.getBOOL("AOSitsEnabled");
gSavedSettings.setBOOL("AOSitsEnabled", !sit_enable);
}
//static
void AORemoteCtrl::onClickShowAO(void* data)
{
LLFloaterAO::show(NULL);
}
//static
void AORemoteCtrl::onClickPopupBtn(void* data)
{
AORemoteCtrl* remotep = (AORemoteCtrl*)data;
remotep->deleteAllChildren();
remotep->build();
gOverlayBar->layoutButtons();
}

View File

@@ -0,0 +1,54 @@
/**
* @file aoremotectrl.h
* @brief toolbar remote for toggling the viewer AO
*
* $LicenseInfo:firstyear=2009&license=viewergpl$
*
* Copyright (c) 2010, McCabe Maxsted
*
* Imprudence Viewer Source Code
* The source code in this file ("Source Code") is provided to you
* under the terms of the GNU General Public License, version 2.0
* ("GPL"). Terms of the GPL can be found in doc/GPL-license.txt in
* this distribution, or online at
* http://secondlifegrid.net/programs/open_source/licensing/gplv2
*
* There are special exceptions to the terms and conditions of the GPL as
* it is applied to this Source Code. View the full text of the exception
* in the file doc/FLOSS-exception.txt in this software distribution, or
* online at http://secondlifegrid.net/programs/open_source/licensing/flossexception
*
* By copying, modifying or distributing this software, you acknowledge
* that you have read and understood your obligations described above,
* and agree to abide by those obligations.
*
* ALL SOURCE CODE IS PROVIDED "AS IS." THE AUTHOR MAKES NO
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
* COMPLETENESS OR PERFORMANCE.
* $/LicenseInfo$
*/
#ifndef AOREMOTECTRL_H
#define AOREMOTECTRL_H
#include "llpanel.h"
class AORemoteCtrl : public LLPanel
{
public:
AORemoteCtrl();
virtual ~AORemoteCtrl();
/*virtual*/ BOOL postBuild();
/*virtual*/ void draw();
private:
void build();
static void onClickToggleAO(void* data);
static void onClickToggleAOSit(void* data);
static void onClickShowAO(void* data);
static void onClickPopupBtn(void* data);
};
#endif // AOREMOTECTRL_H

View File

@@ -0,0 +1,103 @@
############################################################
############################################################
##
## IMPRUDENCE AO TEMPLATE
##
############################################################
##
## INSTRUCTIONS:
##
## 1. Detach any AO you are currently wearing or it will interfere.
##
## 2. Place all of the animations you want ot use into a folder in your inventory.
##
## 3. Place the notecard for the AO in the *SAME* folder.
##
## 4. Find the line that matches the animation you're changing.
## For example, if you're adding a walk animation,
## find the line that starts with [ Walking ]
##
## If the notecard already has walking animations, the line will look something like this:
## [ Walking ]SexyWalk1|SexyWalk2
##
## 5. Type the name of the new animation at the end of this line.
## If the line already contains some animations, type '|' before
## typing the animation name. Once you're done, the line should look like this:
## [ Walking ]NewWalkAnim
## or
## [ Walking ]SexyWalk1|SexyWalk2|NewWalkAnim
##
## 6. Once you're done, save the notecard.
##
## 7. Open the client AO window (CTRL-SHIFT-O) then drag the notecard onto the indicated spot.
##
## 8. Press the "Reload" button in the AO.
##
############################################################
############################################################
############################################################
##
## LIST YOUR ANIMATIONS HERE
##
############################################################
############################################################
[ Standing ]
[ Walking ]
[ Sitting ]
[ Sitting On Ground ]
[ Crouching ]
[ Crouch Walking ]
[ Landing ]
[ Standing Up ]
[ Falling ]
[ Flying Down ]
[ Flying Up ]
[ Flying ]
[ Flying Slow ]
[ Hovering ]
[ Jumping ]
[ Pre Jumping ]
[ Running ]
[ Turning Right ]
[ Turning Left ]
[ Floating ]
[ Swimming Forward ]
[ Swimming Up ]
[ Swimming Down ]
#############################################################
#############################################################
##
## FOR ADVANCED USERS ONLY
##
#############################################################
##
## Lines starting with a # are treated as comments and ignored. Blank lines are ignored. Valid lines look like this:
##
## [ Walking ]SexyWalk1|SexyWalk2|SexyWalk3
##
## The token (in this case, [ Walking ] - note the spaces inside the [ ]) identifies the animation to be overridden. The rest is a list of
## animations, separated by the '|' (pipe) character. You can specify multiple animations for Stands, Walks, Sits, and GroundSits.
## Multiple animations on any other line are invalid. You can list as many animations as you want.
##
## You can repeat tokens, so you can split the Stands up across multiple lines. Use the [ Standing ] token in each line, and
## the viewer will add the animation lists together.
##
## Each 'animation name' can be a comma-separated list of animations, which will be played together. For example:
## [ Walking ]SexyWalk1UpperBody,SexyWalk1LowerBody|SexyWalk2|SexyWalk3
##
## Note the ',' between SexyWalk1UpperBody and SexyWalk1LowerBody - this tells AO to treat these as a single
## 'animation' and play them together. The '|' between this 'animation' and SexyWalk2 tells AO to treat SexyWalk2 and
## SexyWalk3 as separate walk animations. You can use this to layer animations on top of each other.
##
## Do not add any spaces around animation names!!!
##
## If you have read and understood these instructions, feel free to delete these lines.
##
## Imprudence's AO notecard system is based on the ZHAO-II HUD by Second Life resident Ziggy Puff.
##
############################################################

Binary file not shown.

Binary file not shown.

View File

@@ -1,22 +0,0 @@
Copyright Information Regarding Fonts, Disclaimer of Warranties
This license applies to the files named MtBkLfRg.ttf and MtBdLfRg.ttf
in this directory, referred to hereafter as "Meta font software files".
The Meta font software files contained in this folder are the
copyrighted property of FSI FontShop International ("FSI") and are
licensed by FSI solely for use by Linden Research, Inc. and by
residents or users of Second Life in the Second Life environment,
subject to the Second Life Terms of Service. These Meta font software
files may not be copied by residents or developers of Second Life or
used by them for any other purpose whatsoever.
FSI and its suppliers make no warranties express or implied relating
to the Meta font software, including without limitation, warranties as
to non-infringement of third party rights, merchantability, or fitness
for any particular purpose. In no event will FSI or its suppliers be
liable to you for any damages, including without limitation,
consequential, incidental or special damages, including any lost
profits or lost savings, even if a FSI representative has been advised
of the possibility of such damages, or for any claim by any third
party.

View File

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<panel bg_visible="false" border="false" border_visible="false" bottom="0"
enabled="true" follows="right|bottom" height="20" left="0" mouse_opaque="true"
name="ao_remote" use_bounding_rect="true" width="96">
<panel bottom="1" filename="panel_bg_tab.xml" name="panel_bg_tab" height="22" left="0" width="96" />
<panel bottom="3" filename="panel_ao_remote_controls.xml" name="panel_ao_controls" height="20" left="0" width="96" />
</panel>

View File

@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<panel bg_visible="false" border="false" border_visible="false" bottom="1"
enabled="true" follows="right|bottom" height="20" left="0"
name="ao_controls" width="96">
<button bottom="-22" follows="left|bottom" font="SansSerif" halign="center" height="22"
label="AO Off" label_selected="AO On" left="3" name="ao_btn" control_name="AOEnabled"
tool_tip="Click here to toggle the Animation Overrider" width="66" />
<button bottom="-22" follows="left|bottom" font="SansSerif" halign="center" height="22" toggle="true"
label="" left_delta="68" name="popup_btn" scale_image="true" control_name="ShowAOSitPopup"
tool_tip="Click here for more options" width="22" />
</panel>

View File

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<panel bg_visible="false" border="false" border_visible="false" bottom="0"
enabled="true" follows="right|bottom" height="45" left="0" mouse_opaque="true"
name="ao_remote" use_bounding_rect="true" width="96">
<panel bottom="1" filename="panel_bg_tab.xml" name="panel_bg_tab" height="47" left="0" width="96" />
<button bottom="-20" control_name="AOSitsEnabled" enabled="true"
follows="left|top" font="SansSerif" height="22" label="AO Sits Off" label_selected="AO Sits On"
mouse_opaque="true" name="ao_sit_btn" width="92" left="3" />
<panel bottom="13" filename="panel_ao_remote_controls.xml" name="panel_ao_controls" left="0" width="96" />
</panel>