EXP-23 FIX Tail for chat box hint should be slantways instead of horizontal

master
Richard Nelson 2010-09-10 18:06:42 -07:00
parent db538aa945
commit fbcde28736
6 changed files with 28 additions and 4 deletions

View File

@ -470,6 +470,8 @@ BOOL LLBottomTray::postBuild()
gMenuHolder->addChild(mBottomTrayContextMenu);
mNearbyChatBar = findChild<LLNearbyChatBar>("chat_bar");
LLHints::registerHintTarget("chat_bar", mNearbyChatBar->LLView::getHandle());
mChatBarContainer = getChild<LLLayoutPanel>("chat_bar_layout_panel");
mToolbarStack = getChild<LLLayoutStack>("toolbar_stack");

View File

@ -74,7 +74,7 @@ void LLFirstUse::resetFirstUse()
// static
void LLFirstUse::otherAvatarChatFirst(bool enable)
{
firstUseNotification("FirstOtherChatBeforeUser", enable, "HintChat", LLSD(), LLSD().with("target", "incoming_chat").with("direction", "right"));
firstUseNotification("FirstOtherChatBeforeUser", enable, "HintChat", LLSD(), LLSD().with("target", "chat_bar").with("direction", "top_right").with("distance", 24));
}
// static

View File

@ -43,7 +43,8 @@ public:
LEFT,
TOP,
RIGHT,
BOTTOM
BOTTOM,
TOP_RIGHT
} EPopupDirection;
struct PopupDirections : public LLInitParam::TypeValuesHelper<LLHintPopup::EPopupDirection, PopupDirections>
@ -54,6 +55,7 @@ public:
declare("right", LLHintPopup::RIGHT);
declare("top", LLHintPopup::TOP);
declare("bottom", LLHintPopup::BOTTOM);
declare("top_right", LLHintPopup::TOP_RIGHT);
}
};
@ -76,7 +78,9 @@ public:
Optional<LLUIImage*> left_arrow,
up_arrow,
right_arrow,
down_arrow;
down_arrow,
lower_left_arrow;
Optional<S32> left_arrow_offset,
up_arrow_offset,
right_arrow_offset,
@ -90,6 +94,7 @@ public:
up_arrow("up_arrow"),
right_arrow("right_arrow"),
down_arrow("down_arrow"),
lower_left_arrow("lower_left_arrow"),
left_arrow_offset("left_arrow_offset"),
up_arrow_offset("up_arrow_offset"),
right_arrow_offset("right_arrow_offset"),
@ -115,7 +120,8 @@ private:
LLUIImagePtr mArrowLeft,
mArrowUp,
mArrowRight,
mArrowDown;
mArrowDown,
mArrowDownAndLeft;
S32 mArrowLeftOffset,
mArrowUpOffset,
mArrowRightOffset,
@ -137,6 +143,7 @@ LLHintPopup::LLHintPopup(const LLHintPopup::Params& p)
mArrowUp(p.up_arrow),
mArrowRight(p.right_arrow),
mArrowDown(p.down_arrow),
mArrowDownAndLeft(p.lower_left_arrow),
mArrowLeftOffset(p.left_arrow_offset),
mArrowUpOffset(p.up_arrow_offset),
mArrowRightOffset(p.right_arrow_offset),
@ -272,6 +279,19 @@ void LLHintPopup::draw()
arrow_imagep = mArrowUp;
}
break;
case TOP_RIGHT:
my_rect.setCenterAndSize( target_rect.mRight + (my_local_rect.getWidth() / 2),
target_rect.mTop + (my_local_rect.getHeight() / 2 + mDistance),
my_local_rect.getWidth(),
my_local_rect.getHeight());
if (mArrowDownAndLeft)
{
arrow_rect.setCenterAndSize(my_local_rect.mLeft + mArrowDownAndLeft->getWidth() / 2 + mArrowLeftOffset,
my_local_rect.mBottom - mArrowDownAndLeft->getHeight() / 2 + mArrowDownOffset,
mArrowDownAndLeft->getWidth(),
mArrowDownAndLeft->getHeight());
arrow_imagep = mArrowDownAndLeft;
}
}
setShape(my_rect);
LLPanel::draw();

View File

@ -651,6 +651,7 @@ with the same filename but different name
<texture name="hint_arrow_right" file_name="windows/hint_arrow_right.png" preload="false"/>
<texture name="hint_arrow_up" file_name="windows/hint_arrow_up.png" preload="false"/>
<texture name="hint_arrow_down" file_name="windows/hint_arrow_down.png" preload="false"/>
<texture name="hint_arrow_lower_left" file_name="windows/hint_arrow_lower_left.png" preload="false"/>
<texture name="Yellow_Gradient" file_name="windows/yellow_gradient.png"/>
<texture name="Popup_Caution" file_name="icons/pop_up_caution.png"/>

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

View File

@ -11,6 +11,7 @@
up_arrow="hint_arrow_up"
right_arrow="hint_arrow_right"
down_arrow="hint_arrow_down"
lower_left_arrow="hint_arrow_lower_left"
left_arrow_offset="3"
up_arrow_offset="-2"
right_arrow_offset="-3"