mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 21:06:59 -04:00
Implemented ImageValueViewer, and more of the related classes
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@54 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -211,4 +211,4 @@ CardP CardsPanel::selectedCard() const {
|
||||
void CardsPanel::selectCard(const CardP& card) {
|
||||
card_list->setCard(card);
|
||||
editor->setCard(*card);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -68,7 +68,7 @@ class SetWindowPanel : public wxPanel, public SetView {
|
||||
|
||||
// --------------------------------------------------- : Selection
|
||||
virtual CardP selectedCard() const { return CardP(); } ///< Return the currently selected card, or CardP()
|
||||
virtual void selectCard(CardP card) {} ///< Switch the view to another card
|
||||
virtual void selectCard(const CardP& card) {} ///< Switch the view to another card
|
||||
|
||||
protected:
|
||||
// --------------------------------------------------- : Helper functions for UI
|
||||
|
||||
+4
-11
@@ -246,11 +246,10 @@ void SetWindow::onAction(const Action& action, bool undone) {
|
||||
}
|
||||
|
||||
|
||||
void SetWindow::onCardSelect(wxCommandEvent& ev) {
|
||||
// CardP card = static_cast<CardSelectEvent&>(ev).card;
|
||||
// FOR_EACH(p, panels) {
|
||||
// p->selectCard(card);
|
||||
// }
|
||||
void SetWindow::onCardSelect(CardSelectEvent& ev) {
|
||||
FOR_EACH(p, panels) {
|
||||
p->selectCard(ev.card);
|
||||
}
|
||||
fixMinWindowSize();
|
||||
}
|
||||
|
||||
@@ -547,12 +546,6 @@ void SetWindow::onChildMenu(wxCommandEvent& ev) {
|
||||
current_panel->onCommand(ev.GetId());
|
||||
}
|
||||
|
||||
void SetWindow::onCardSelect(CardSelectEvent& ev) {
|
||||
FOR_EACH(p, panels) {
|
||||
p->selectCard(ev.card);
|
||||
}
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------- : Event table
|
||||
|
||||
BEGIN_EVENT_TABLE(SetWindow, wxFrame)
|
||||
|
||||
@@ -85,7 +85,7 @@ class SetWindow : public wxFrame, public SetView {
|
||||
|
||||
private:
|
||||
/// A different card has been selected
|
||||
void onCardSelect(wxCommandEvent&);
|
||||
void onCardSelect(CardSelectEvent&);
|
||||
|
||||
/// Render settings have changed (because of editing of preferences)
|
||||
void onRenderSettingsChange();
|
||||
@@ -154,8 +154,6 @@ class SetWindow : public wxFrame, public SetView {
|
||||
// --------------------------------------------------- : Window events - other
|
||||
|
||||
void onChildMenu (wxCommandEvent&);
|
||||
|
||||
void onCardSelect (CardSelectEvent&);
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------- : EOF
|
||||
|
||||
Reference in New Issue
Block a user