Made IM tabs and tabs in general flashable again

master
Ansariel 2013-07-07 03:01:03 +02:00
parent 0decd49ca8
commit fac89fcebd
1 changed files with 45 additions and 1 deletions

View File

@ -1156,6 +1156,12 @@ void LLTabContainer::addTabPanel(const TabPanelParams& panel)
p.pad_left( mLabelPadLeft );
p.pad_right(2);
}
// <FS:Ansariel> Enable tab flashing
p.button_flash_enable(LLUI::sSettingGroups["config"]->getBOOL("EnableButtonFlashing"));
p.button_flash_count(LLUI::sSettingGroups["config"]->getS32("FSButtonFlashCount"));
p.button_flash_rate(LLUI::sSettingGroups["config"]->getF32("FSButtonFlashRate"));
// </FS:Ansariel>
// *TODO : It seems wrong not to use p in both cases considering the way p is initialized
if (mCustomIconCtrlUsed)
@ -1893,6 +1899,13 @@ void LLTabContainer::initButtons()
prev_btn_params.image_unselected.name("scrollbutton_up_out_blue.tga");
prev_btn_params.image_selected.name("scrollbutton_up_in_blue.tga");
prev_btn_params.click_callback.function(boost::bind(&LLTabContainer::onPrevBtn, this, _2));
// <FS:Ansariel> Enable tab flashing
prev_btn_params.button_flash_enable(LLUI::sSettingGroups["config"]->getBOOL("EnableButtonFlashing"));
prev_btn_params.button_flash_count(LLUI::sSettingGroups["config"]->getS32("FSButtonFlashCount"));
prev_btn_params.button_flash_rate(LLUI::sSettingGroups["config"]->getF32("FSButtonFlashRate"));
// </FS:Ansariel>
mPrevArrowBtn = LLUICtrlFactory::create<LLButton>(prev_btn_params);
LLButton::Params next_btn_params;
@ -1902,6 +1915,13 @@ void LLTabContainer::initButtons()
next_btn_params.image_unselected.name("scrollbutton_down_out_blue.tga");
next_btn_params.image_selected.name("scrollbutton_down_in_blue.tga");
next_btn_params.click_callback.function(boost::bind(&LLTabContainer::onNextBtn, this, _2));
// <FS:Ansariel> Enable tab flashing
next_btn_params.button_flash_enable(LLUI::sSettingGroups["config"]->getBOOL("EnableButtonFlashing"));
next_btn_params.button_flash_count(LLUI::sSettingGroups["config"]->getS32("FSButtonFlashCount"));
next_btn_params.button_flash_rate(LLUI::sSettingGroups["config"]->getF32("FSButtonFlashRate"));
// </FS:Ansariel>
mNextArrowBtn = LLUICtrlFactory::create<LLButton>(next_btn_params);
}
else // Horizontal
@ -1938,7 +1958,13 @@ void LLTabContainer::initButtons()
p.click_callback.function(boost::bind(&LLTabContainer::onJumpFirstBtn, this, _2));
p.rect(jump_left_arrow_btn_rect);
p.follows.flags(FOLLOWS_LEFT);
// <FS:Ansariel> Enable tab flashing
p.button_flash_enable(LLUI::sSettingGroups["config"]->getBOOL("EnableButtonFlashing"));
p.button_flash_count(LLUI::sSettingGroups["config"]->getS32("FSButtonFlashCount"));
p.button_flash_rate(LLUI::sSettingGroups["config"]->getF32("FSButtonFlashRate"));
// </FS:Ansariel>
mJumpPrevArrowBtn = LLUICtrlFactory::create<LLButton>(p);
p = LLButton::Params();
@ -1949,6 +1975,12 @@ void LLTabContainer::initButtons()
p.image_selected.name("scrollbutton_left_in_blue.tga");
p.click_callback.function(boost::bind(&LLTabContainer::onPrevBtn, this, _2));
p.mouse_held_callback.function(boost::bind(&LLTabContainer::onPrevBtnHeld, this, _2));
// <FS:Ansariel> Enable tab flashing
p.button_flash_enable(LLUI::sSettingGroups["config"]->getBOOL("EnableButtonFlashing"));
p.button_flash_count(LLUI::sSettingGroups["config"]->getS32("FSButtonFlashCount"));
p.button_flash_rate(LLUI::sSettingGroups["config"]->getF32("FSButtonFlashRate"));
// </FS:Ansariel>
mPrevArrowBtn = LLUICtrlFactory::create<LLButton>(p);
@ -1960,6 +1992,12 @@ void LLTabContainer::initButtons()
p.image_selected.name("jump_right_in.tga");
p.click_callback.function(boost::bind(&LLTabContainer::onJumpLastBtn, this, _2));
// <FS:Ansariel> Enable tab flashing
p.button_flash_enable(LLUI::sSettingGroups["config"]->getBOOL("EnableButtonFlashing"));
p.button_flash_count(LLUI::sSettingGroups["config"]->getS32("FSButtonFlashCount"));
p.button_flash_rate(LLUI::sSettingGroups["config"]->getF32("FSButtonFlashRate"));
// </FS:Ansariel>
mJumpNextArrowBtn = LLUICtrlFactory::create<LLButton>(p);
p = LLButton::Params();
@ -1971,6 +2009,12 @@ void LLTabContainer::initButtons()
p.click_callback.function(boost::bind(&LLTabContainer::onNextBtn, this, _2));
p.mouse_held_callback.function(boost::bind(&LLTabContainer::onNextBtnHeld, this, _2));
// <FS:Ansariel> Enable tab flashing
p.button_flash_enable(LLUI::sSettingGroups["config"]->getBOOL("EnableButtonFlashing"));
p.button_flash_count(LLUI::sSettingGroups["config"]->getS32("FSButtonFlashCount"));
p.button_flash_rate(LLUI::sSettingGroups["config"]->getF32("FSButtonFlashRate"));
// </FS:Ansariel>
mNextArrowBtn = LLUICtrlFactory::create<LLButton>(p);
if( getTabPosition() == TOP )