mirror of
https://github.com/vcmi/vcmi.git
synced 2025-07-03 00:46:55 +02:00
- migrated boost::function/ref/bind to std:: variants
This commit is contained in:
@ -541,7 +541,7 @@ void CHighlightableButtonsGroup::addButton(CHighlightableButton* bt)
|
||||
addChild(bt);
|
||||
bt->recActions = defActions;//FIXME: not needed?
|
||||
|
||||
bt->callback += boost::bind(&CHighlightableButtonsGroup::selectionChanged,this,bt->ID);
|
||||
bt->callback += std::bind(&CHighlightableButtonsGroup::selectionChanged,this,bt->ID);
|
||||
bt->onlyOn = true;
|
||||
buttons.push_back(bt);
|
||||
}
|
||||
@ -555,7 +555,7 @@ void CHighlightableButtonsGroup::addButton(const std::map<int,std::string> &tool
|
||||
bt->setOffset(buttons.size()-3);
|
||||
}
|
||||
bt->ID = uid;
|
||||
bt->callback += boost::bind(&CHighlightableButtonsGroup::selectionChanged,this,bt->ID);
|
||||
bt->callback += std::bind(&CHighlightableButtonsGroup::selectionChanged,this,bt->ID);
|
||||
bt->onlyOn = true;
|
||||
buttons.push_back(bt);
|
||||
}
|
||||
@ -784,9 +784,9 @@ CSlider::CSlider(int x, int y, int totalw, std::function<void(int)> Moved, int C
|
||||
right->pos.y = pos.y + totalw - 16;
|
||||
}
|
||||
|
||||
left->callback = boost::bind(&CSlider::moveLeft,this);
|
||||
right->callback = boost::bind(&CSlider::moveRight,this);
|
||||
slider->callback = boost::bind(&CSlider::sliderClicked,this);
|
||||
left->callback = std::bind(&CSlider::moveLeft,this);
|
||||
right->callback = std::bind(&CSlider::moveRight,this);
|
||||
slider->callback = std::bind(&CSlider::sliderClicked,this);
|
||||
left->pos.w = left->pos.h = right->pos.w = right->pos.h = slider->pos.w = slider->pos.h = 16;
|
||||
if(horizontal)
|
||||
{
|
||||
@ -979,7 +979,7 @@ CListBox::CListBox(CreateFunc create, DestroyFunc destroy, Point Pos, Point Item
|
||||
if (Slider & 1)
|
||||
{
|
||||
OBJ_CONSTRUCTION_CAPTURING_ALL;
|
||||
slider = new CSlider(SliderPos.x, SliderPos.y, SliderPos.w, boost::bind(&CListBox::moveToPos, this, _1),
|
||||
slider = new CSlider(SliderPos.x, SliderPos.y, SliderPos.w, std::bind(&CListBox::moveToPos, this, _1),
|
||||
VisibleSize, TotalSize, InitialPos, Slider & 2, Slider & 4);
|
||||
}
|
||||
reset();
|
||||
@ -1457,7 +1457,7 @@ void CTextBox::setText(const std::string &text)
|
||||
label->setText(text);
|
||||
|
||||
OBJ_CONSTRUCTION_CAPTURING_ALL;
|
||||
slider = new CSlider(pos.w - 32, 0, pos.h, boost::bind(&CTextBox::sliderMoved, this, _1),
|
||||
slider = new CSlider(pos.w - 32, 0, pos.h, std::bind(&CTextBox::sliderMoved, this, _1),
|
||||
label->pos.h, label->textSize.y, 0, false, sliderStyle);
|
||||
slider->scrollStep = graphics->fonts[label->font]->getLineHeight();
|
||||
}
|
||||
|
Reference in New Issue
Block a user