Skip to content
Snippets Groups Projects
Commit d23f7df8 authored by Andrew Meadows's avatar Andrew Meadows
Browse files

merge

parents cf64ecb4 c132d20a
No related branches found
No related tags found
No related merge requests found
Showing
with 293 additions and 78 deletions
/**
* @file llnotificationvisibility.h
* @brief Rules for
* @author Monroe
*
* $LicenseInfo:firstyear=2010&license=viewerlgpl$
* Second Life Viewer Source Code
* Copyright (C) 2010, Linden Research, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation;
* version 2.1 of the License only.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
#ifndef LL_LLNOTIFICATION_VISIBILITY_RULE_H
#define LL_LLNOTIFICATION_VISIBILITY_RULE_H
#include "llinitparam.h"
//#include "llnotifications.h"
// This is the class of object read from the XML file (notification_visibility.xml,
// from the appropriate local language directory).
struct LLNotificationVisibilityRule
{
struct Filter : public LLInitParam::Block<Filter>
{
Optional<std::string> type,
tag,
name;
Filter()
: type("type"),
tag("tag"),
name("name")
{}
};
struct Respond : public LLInitParam::Block<Respond, Filter>
{
Mandatory<std::string> response;
Respond()
: response("response")
{}
};
struct Rule : public LLInitParam::Choice<Rule>
{
Alternative<Filter> show;
Alternative<Filter> hide;
Alternative<Respond> respond;
Rule()
: show("show"),
hide("hide"),
respond("respond")
{}
};
struct Rules : public LLInitParam::Block<Rules>
{
Multiple<Rule> rules;
Rules()
: rules("")
{}
};
LLNotificationVisibilityRule(const Rule& p);
// If true, this rule makes matching notifications visible. Otherwise, it makes them invisible.
bool mVisible;
// Which response to give when making a notification invisible. An empty string means the notification should be cancelled instead of responded to.
std::string mResponse;
// String to match against the notification's "type". An empty string matches all notifications.
std::string mType;
// String to match against the notification's tag(s). An empty string matches all notifications.
std::string mTag;
// String to match against the notification's name. An empty string matches all notifications.
std::string mName;
};
#endif //LL_LLNOTIFICATION_VISIBILITY_RULE_H
...@@ -194,6 +194,8 @@ void LLPanel::draw() ...@@ -194,6 +194,8 @@ void LLPanel::draw()
// draw background // draw background
if( mBgVisible ) if( mBgVisible )
{ {
alpha = getCurrentTransparency();
LLRect local_rect = getLocalRect(); LLRect local_rect = getLocalRect();
if (mBgOpaque ) if (mBgOpaque )
{ {
...@@ -434,7 +436,7 @@ void LLPanel::initFromParams(const LLPanel::Params& p) ...@@ -434,7 +436,7 @@ void LLPanel::initFromParams(const LLPanel::Params& p)
//and LLView::initFromParams will use them to set visible and enabled //and LLView::initFromParams will use them to set visible and enabled
setVisible(p.visible); setVisible(p.visible);
setEnabled(p.enabled); setEnabled(p.enabled);
setFocusRoot(p.focus_root);
setSoundFlags(p.sound_flags); setSoundFlags(p.sound_flags);
// control_name, tab_stop, focus_lost_callback, initial_value, rect, enabled, visible // control_name, tab_stop, focus_lost_callback, initial_value, rect, enabled, visible
......
...@@ -50,7 +50,7 @@ LLProgressBar::Params::Params() ...@@ -50,7 +50,7 @@ LLProgressBar::Params::Params()
LLProgressBar::LLProgressBar(const LLProgressBar::Params& p) LLProgressBar::LLProgressBar(const LLProgressBar::Params& p)
: LLView(p), : LLUICtrl(p),
mImageBar(p.image_bar), mImageBar(p.image_bar),
mImageFill(p.image_fill), mImageFill(p.image_fill),
mColorBackground(p.color_bg()), mColorBackground(p.color_bg()),
...@@ -80,7 +80,7 @@ void LLProgressBar::draw() ...@@ -80,7 +80,7 @@ void LLProgressBar::draw()
mImageFill->draw(progress_rect, bar_color); mImageFill->draw(progress_rect, bar_color);
} }
void LLProgressBar::setPercent(const F32 percent) void LLProgressBar::setValue(const LLSD& value)
{ {
mPercentDone = llclamp(percent, 0.f, 100.f); mPercentDone = llclamp((F32)value.asReal(), 0.f, 100.f);
} }
...@@ -27,14 +27,14 @@ ...@@ -27,14 +27,14 @@
#ifndef LL_LLPROGRESSBAR_H #ifndef LL_LLPROGRESSBAR_H
#define LL_LLPROGRESSBAR_H #define LL_LLPROGRESSBAR_H
#include "llview.h" #include "lluictrl.h"
#include "llframetimer.h" #include "llframetimer.h"
class LLProgressBar class LLProgressBar
: public LLView : public LLUICtrl
{ {
public: public:
struct Params : public LLInitParam::Block<Params, LLView::Params> struct Params : public LLInitParam::Block<Params, LLUICtrl::Params>
{ {
Optional<LLUIImage*> image_bar, Optional<LLUIImage*> image_bar,
image_fill; image_fill;
...@@ -47,7 +47,7 @@ class LLProgressBar ...@@ -47,7 +47,7 @@ class LLProgressBar
LLProgressBar(const Params&); LLProgressBar(const Params&);
virtual ~LLProgressBar(); virtual ~LLProgressBar();
void setPercent(const F32 percent); void setValue(const LLSD& value);
/*virtual*/ void draw(); /*virtual*/ void draw();
......
This diff is collapsed.
This diff is collapsed.
...@@ -422,9 +422,10 @@ void LLScrollContainer::draw() ...@@ -422,9 +422,10 @@ void LLScrollContainer::draw()
// Draw background // Draw background
if( mIsOpaque ) if( mIsOpaque )
{ {
F32 alpha = getCurrentTransparency();
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
gGL.color4fv( mBackgroundColor.get().mV ); gl_rect_2d(mInnerRect, mBackgroundColor.get() % alpha);
gl_rect_2d( mInnerRect );
} }
// Draw mScrolledViews and update scroll bars. // Draw mScrolledViews and update scroll bars.
......
...@@ -83,7 +83,14 @@ void LLScrollColumnHeader::draw() ...@@ -83,7 +83,14 @@ void LLScrollColumnHeader::draw()
&& (sort_column == mColumn->mSortingColumn || sort_column == mColumn->mName); && (sort_column == mColumn->mSortingColumn || sort_column == mColumn->mName);
BOOL is_ascending = mColumn->mParentCtrl->getSortAscending(); BOOL is_ascending = mColumn->mParentCtrl->getSortAscending();
setImageOverlay(is_ascending ? "up_arrow.tga" : "down_arrow.tga", LLFontGL::RIGHT, draw_arrow ? LLColor4::white : LLColor4::transparent); if (draw_arrow)
{
setImageOverlay(is_ascending ? "up_arrow.tga" : "down_arrow.tga", LLFontGL::RIGHT, LLColor4::white);
}
else
{
setImageOverlay(LLUUID::null);
}
// Draw children // Draw children
LLButton::draw(); LLButton::draw();
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment