CHUI-488 ADD. fIX Clean up code

master
AlexanderP ProductEngine 2012-11-19 17:40:46 +02:00
parent c48f8c2b28
commit 48a683af70
2 changed files with 6 additions and 5 deletions

View File

@ -174,9 +174,10 @@ LLButton::LLButton(const LLButton::Params& p)
{
// If optional parameter "p.button_flash_count" is not provided, LLFlashTimer will be
// used instead it a "default" value from gSavedSettings.getS32("FlashCount")).
// Likewise, missing "p.button_flash_rate" is replaced by gSavedSettings.getF32("FlashPeriod");
S32 flash_count = p.button_flash_count || 0;
F32 flash_rate = p.button_flash_rate || 0.0; //
// Likewise, missing "p.button_flash_rate" is replaced by gSavedSettings.getF32("FlashPeriod").
// Note: flashing should be allowed in settings.xml (boolean key "EnableButtonFlashing").
S32 flash_count = p.button_flash_count.isProvided()? p.button_flash_count : 0;
F32 flash_rate = p.button_flash_rate.isProvided()? p.button_flash_rate : 0.0;
mFlashingTimer = new LLFlashTimer ((LLFlashTimer::callback_t)NULL, flash_count, flash_rate);
static LLUICachedControl<S32> llbutton_orig_h_pad ("UIButtonOrigHPad", 0);

View File

@ -30,8 +30,8 @@
image_overlay_alignment="left"
use_ellipses="true"
auto_resize="true"
button_flash_count="99999"
button_flash_rate="1.0"
button_flash_count="3"
button_flash_rate="0.25"
flash_color="EmphasisColor"/>
<button_icon pad_left="10"
pad_right="10"