mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 13:06:59 -04:00
'Edit' and 'gallery' button for symbol editor
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@522 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
// ----------------------------------------------------------------------------- : InfoValueViewer
|
||||
|
||||
void InfoValueViewer::draw(RotatedDC& dc) {
|
||||
dc.SetPen(*wxTRANSPARENT_PEN);
|
||||
if (nativeLook()) {
|
||||
dc.SetTextForeground(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT));
|
||||
dc.SetBrush(wxSystemSettings::GetColour(wxSYS_COLOUR_APPWORKSPACE));
|
||||
|
||||
@@ -43,13 +43,6 @@ void SymbolValueViewer::draw(RotatedDC& dc) {
|
||||
// todo : labels?
|
||||
dc.DrawBitmap(symbols[i], style().getPos() + RealSize(i * (wh + 2), 0));
|
||||
}
|
||||
// draw helper text if there are no symbols
|
||||
if (symbols.empty()) {
|
||||
dc.SetFont(wxFont(10,wxSWISS,wxNORMAL,wxNORMAL));
|
||||
dc.SetTextForeground(*wxBLACK);
|
||||
RealSize text_size = dc.GetTextExtent(_("double click to edit symbol"));
|
||||
dc.DrawText(_("double click to edit symbol"), align_in_rect(ALIGN_MIDDLE_CENTER, text_size, style().getRect()));
|
||||
}
|
||||
}
|
||||
|
||||
void SymbolValueViewer::onValueChange() {
|
||||
|
||||
@@ -23,7 +23,7 @@ class SymbolValueViewer : public ValueViewer {
|
||||
virtual void draw(RotatedDC& dc);
|
||||
void onValueChange();
|
||||
|
||||
private:
|
||||
protected:
|
||||
vector<Bitmap> symbols; ///< Cached images
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user