mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 21:06:59 -04:00
added SymbolValueEditor + minor fixes
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@96 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -112,5 +112,5 @@ void ChoiceValueEditor::determineSize() {
|
||||
}
|
||||
|
||||
void ChoiceValueEditor::change(const Defaultable<String>& c) {
|
||||
getSet().actions.add(value_action(static_pointer_cast<ChoiceValue>(valueP), c));
|
||||
getSet().actions.add(value_action(valueP(), c));
|
||||
}
|
||||
|
||||
@@ -148,7 +148,7 @@ void ColorValueEditor::determineSize() {
|
||||
}
|
||||
|
||||
void ColorValueEditor::change(const Defaultable<Color>& c) {
|
||||
getSet().actions.add(value_action(static_pointer_cast<ColorValue>(valueP), c));
|
||||
getSet().actions.add(value_action(valueP(), c));
|
||||
}
|
||||
void ColorValueEditor::changeCustom() {
|
||||
Color c = wxGetColourFromUser(0, value().value());
|
||||
|
||||
@@ -7,7 +7,18 @@
|
||||
// ----------------------------------------------------------------------------- : Includes
|
||||
|
||||
#include <gui/value/symbol.hpp>
|
||||
#include <gui/symbol/window.hpp>
|
||||
|
||||
// ----------------------------------------------------------------------------- :
|
||||
// ----------------------------------------------------------------------------- : SymbolValueEditor
|
||||
|
||||
IMPLEMENT_VALUE_EDITOR(Symbol) {}
|
||||
|
||||
void SymbolValueEditor::onLeftDClick(const RealPoint& pos, wxMouseEvent&) {
|
||||
// TODO : use SetWindow as parent? Maybe not, the symbol editor will stay open when mainwindow closes
|
||||
SymbolWindow* wnd = new SymbolWindow(nullptr, valueP(), viewer.getSet());
|
||||
wnd->Show();
|
||||
}
|
||||
|
||||
void SymbolValueEditor::determineSize() {
|
||||
style().height = 50;
|
||||
}
|
||||
|
||||
@@ -19,6 +19,9 @@
|
||||
class SymbolValueEditor : public SymbolValueViewer, public ValueEditor {
|
||||
public:
|
||||
DECLARE_VALUE_EDITOR(Symbol);
|
||||
|
||||
virtual void onLeftDClick(const RealPoint& pos, wxMouseEvent&);
|
||||
virtual void determineSize();
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------- : EOF
|
||||
|
||||
@@ -20,6 +20,7 @@ class TextValueEditor : public TextValueViewer, public ValueEditor {
|
||||
public:
|
||||
DECLARE_VALUE_EDITOR(Text);
|
||||
|
||||
// virtual void determineSize();
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------- : EOF
|
||||
|
||||
Reference in New Issue
Block a user