mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 04:57:00 -04:00
make pack type labels clickable (based on HoverButton).
use set_help_text instead of the previous thing in SetWindow. git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1327 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -245,32 +245,6 @@ void SetWindow::selectPanel(int id) {
|
||||
current_panel->SetFocus();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------- : Status text for controls
|
||||
|
||||
void SetWindow::setControlStatusText(wxWindow* control, const String& text) {
|
||||
for (size_t i = 0 ; i < control_status_texts.size() ; ++i) {
|
||||
if (control_status_texts[i].first == control) {
|
||||
control_status_texts[i].second = text;
|
||||
return;
|
||||
}
|
||||
}
|
||||
control_status_texts.push_back(make_pair(control,text));
|
||||
control->Connect(wxEVT_ENTER_WINDOW,wxMouseEventHandler(SetWindow::onControlEnter),nullptr,this);
|
||||
control->Connect(wxEVT_LEAVE_WINDOW,wxMouseEventHandler(SetWindow::onControlLeave),nullptr,this);
|
||||
}
|
||||
void SetWindow::onControlEnter(wxMouseEvent& ev) {
|
||||
for (size_t i = 0 ; i < control_status_texts.size() ; ++i) {
|
||||
if (control_status_texts[i].first == ev.GetEventObject()) {
|
||||
SetStatusText(control_status_texts[i].second);
|
||||
}
|
||||
}
|
||||
ev.Skip();
|
||||
}
|
||||
void SetWindow::onControlLeave(wxMouseEvent& ev) {
|
||||
SetStatusText(wxEmptyString);
|
||||
ev.Skip();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------- : Window managment
|
||||
|
||||
vector<SetWindow*> SetWindow::set_windows;
|
||||
|
||||
Reference in New Issue
Block a user