UI cleanup.
-Added ui-local transformation matrix. -Gutted legacy commitcallbacks throughout ui widget ctors. -Created filter_editor ui widget which issues commit on keypress -search_editor commits on focus loss/enter press -search_editor and filter_editor now have a built in 'x' button to clear text. -LLComboBox::setPrearrangeCallback now uses boost::function -LLComboBox::setTextEntryCallback now uses boost::function -LLLineEditor::setKeystrokeCallback now uses boost::function -LLLineEditor::setPrevalidate now uses boost::function -LLPanel::childSetKeystrokeCallback removed -LLPanel::childSetPrevalidate removed -LLPanel::childSetActionTextbox now uses boost::function -LLTextBox::setClickedCallback now uses boost::function -LLTextEditor::setKeystrokeCallback added. -Cleaned up JCFloaterAreaSearch
This commit is contained in:
@@ -61,8 +61,8 @@ S32 BTN_HEIGHT = 0;
|
||||
S32 BTN_GRID = 12;
|
||||
S32 BORDER_SIZE = 1;
|
||||
|
||||
LLButton::LLButton( const std::string& name, const LLRect& rect, const std::string& control_name, void (*click_callback)(void*), void *callback_data)
|
||||
: LLUICtrl(name, rect, TRUE, NULL, NULL),
|
||||
LLButton::LLButton( const std::string& name, const LLRect& rect, const std::string& control_name, commit_callback_t commit_callback)
|
||||
: LLUICtrl(name, rect, TRUE, commit_callback),
|
||||
|
||||
mMouseDownFrame( 0 ),
|
||||
mMouseHeldDownCount(0),
|
||||
@@ -120,7 +120,7 @@ LLButton::LLButton( const std::string& name, const LLRect& rect, const std::stri
|
||||
mButtonFlashRate(LLUI::sConfigGroup->getF32("ButtonFlashRate")),
|
||||
mAlpha(1.f)
|
||||
{
|
||||
init(click_callback, callback_data, control_name);
|
||||
init(control_name);
|
||||
}
|
||||
|
||||
|
||||
@@ -128,12 +128,11 @@ LLButton::LLButton(const std::string& name, const LLRect& rect,
|
||||
const std::string &unselected_image_name,
|
||||
const std::string &selected_image_name,
|
||||
const std::string& control_name,
|
||||
void (*click_callback)(void*),
|
||||
void *callback_data,
|
||||
commit_callback_t commit_callback,
|
||||
const LLFontGL *font,
|
||||
const std::string& unselected_label,
|
||||
const std::string& selected_label )
|
||||
: LLUICtrl(name, rect, TRUE, NULL, NULL),
|
||||
: LLUICtrl(name, rect, TRUE, commit_callback),
|
||||
mMouseDownFrame( 0 ),
|
||||
mMouseHeldDownCount(0),
|
||||
mBorderEnabled( FALSE ),
|
||||
@@ -215,10 +214,10 @@ LLButton::LLButton(const std::string& name, const LLRect& rect,
|
||||
mImagePressed = mImageSelected;
|
||||
}
|
||||
|
||||
init(click_callback, callback_data, control_name);
|
||||
init(control_name);
|
||||
}
|
||||
|
||||
void LLButton::init(void (*click_callback)(void*), void *callback_data, const std::string& control_name)
|
||||
void LLButton::init(const std::string& control_name)
|
||||
{
|
||||
// Hack to make sure there is space for at least one character
|
||||
if (getRect().getWidth() - (mRightHPad + mLeftHPad) < mGLFont->getWidth(std::string(" ")))
|
||||
@@ -230,11 +229,7 @@ void LLButton::init(void (*click_callback)(void*), void *callback_data, const st
|
||||
|
||||
mMouseDownTimer.stop();
|
||||
|
||||
if(click_callback)
|
||||
setClickedCallback(click_callback, callback_data);
|
||||
|
||||
setControlName(control_name, NULL);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1219,7 +1214,6 @@ LLView* LLButton::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *fa
|
||||
image_selected,
|
||||
LLStringUtil::null,
|
||||
NULL,
|
||||
parent,
|
||||
font,
|
||||
label,
|
||||
label_selected);
|
||||
|
||||
Reference in New Issue
Block a user