mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-11 05:07:00 -04:00
Added value actions for common value types; drop down list is now correctly aligned
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@92 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
#include <gui/value/color.hpp>
|
||||
#include <gui/drop_down_list.hpp>
|
||||
#include <gui/util.hpp>
|
||||
#include <data/action/value.hpp>
|
||||
#include <wx/colordlg.h>
|
||||
|
||||
DECLARE_TYPEOF_COLLECTION(ColorField::ChoiceP);
|
||||
@@ -141,7 +142,7 @@ void ColorValueEditor::determineSize() {
|
||||
}
|
||||
|
||||
void ColorValueEditor::change(const Defaultable<Color>& c) {
|
||||
// getSet().actions.add(new ColorChangeAction(value(), c));
|
||||
getSet().actions.add(value_action(static_pointer_cast<ColorValue>(valueP), c));
|
||||
}
|
||||
void ColorValueEditor::changeCustom() {
|
||||
Color c = wxGetColourFromUser(0, value().value());
|
||||
|
||||
@@ -47,7 +47,7 @@ class ValueEditor {
|
||||
virtual void onMouseWheel (const RealPoint& pos, wxMouseEvent& ev) {}
|
||||
|
||||
/// Key events
|
||||
virtual void onChar(wxKeyEvent ev) {}
|
||||
virtual void onChar(wxKeyEvent& ev) {}
|
||||
|
||||
/// a context menu is requested, add extra items to the menu m
|
||||
/** return false to suppress menu */
|
||||
|
||||
Reference in New Issue
Block a user