Move noAction to cLed since its purpose is mainly to prevent the default LED toggle-selected action without introducing any alternate behaviour.
This commit is contained in:
@@ -72,6 +72,7 @@ protected:
|
||||
class cLed : public cButton {
|
||||
public:
|
||||
static void init();
|
||||
static bool noAction(cDialog&,std::string,eKeyMod) {return true;}
|
||||
void attachClickHandler(click_callback_t f) throw();
|
||||
void attachFocusHandler(focus_callback_t f) throw();
|
||||
bool triggerClickHandler(cDialog& me, std::string id, eKeyMod mods);
|
||||
|
@@ -44,7 +44,6 @@ class cDialog {
|
||||
std::vector<std::pair<std::string,cTextField*>> tabOrder;
|
||||
public:
|
||||
static void init();
|
||||
static bool noAction(cDialog&,std::string,eKeyMod) {return true;}
|
||||
static const short BG_LIGHT, BG_DARK;
|
||||
static short defaultBackground;
|
||||
explicit cDialog(cDialog* p = NULL); // dialog with no items
|
||||
|
@@ -308,7 +308,7 @@ void display_alchemy(bool allowEdit)
|
||||
std::string id = "potion" + boost::lexical_cast<std::string>(i + 1);
|
||||
showAlch->addLabelFor(id, alch_names[i], LABEL_LEFT, 83, true);
|
||||
if(!allowEdit)
|
||||
showAlch->getControl(id).attachClickHandler(&cDialog::noAction);
|
||||
showAlch->getControl(id).attachClickHandler(&cLed::noAction);
|
||||
cLed& led = dynamic_cast<cLed&>(showAlch->getControl(id));
|
||||
if (univ.party.alchemy[i] > 0)
|
||||
led.setState(led_red);
|
||||
|
Reference in New Issue
Block a user