Icon for random cards panel

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1124 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2008-08-09 18:32:48 +00:00
parent a10ca59cef
commit 4d674712d1
6 changed files with 24 additions and 6 deletions
+16 -4
View File
@@ -113,10 +113,10 @@ void PackTotalsPanel::draw(DC& dc) {
}
// draw total
dc.SetPen(wxSystemSettings::GetColour(wxSYS_COLOUR_3DSHADOW));
dc.DrawLine(0, y-4, size.x, y-4);
dc.SetPen(wxSystemSettings::GetColour(wxSYS_COLOUR_3DHIGHLIGHT));
dc.DrawLine(0, y-3, size.x, y-3);
y += 6;
dc.SetPen(wxSystemSettings::GetColour(wxSYS_COLOUR_3DHIGHLIGHT));
dc.DrawLine(0, y-2, size.x, y-2);
y += 7;
drawItem(dc, y, _LABEL_("total cards"), total);
}
@@ -334,6 +334,7 @@ void RandomPackPanel::generate() {
}
}
card_list->rebuild();
card_list->selectFirst();
}
// ----------------------------------------------------------------------------- : Selection
@@ -343,7 +344,12 @@ CardP RandomPackPanel::selectedCard() const {
}
void RandomPackPanel::selectCard(const CardP& card) {
preview->setCard(card);
// Don't change the card based on other panels
//preview->setCard(card);
}
void RandomPackPanel::onCardSelect(CardSelectEvent& ev) {
preview->setCard(ev.getCard());
ev.Skip(); // but do change other panels' selection
}
void RandomPackPanel::selectionChoices(ExportCardSelectionChoices& out) {
@@ -353,6 +359,12 @@ void RandomPackPanel::selectionChoices(ExportCardSelectionChoices& out) {
));
}
BEGIN_EVENT_TABLE(RandomPackPanel, wxPanel)
EVT_CARD_SELECT(wxID_ANY, RandomPackPanel::onCardSelect)
END_EVENT_TABLE ()
// ----------------------------------------------------------------------------- : Clipboard
bool RandomPackPanel::canCopy() const { return card_list->canCopy(); }