mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 13:06:59 -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:
@@ -57,6 +57,12 @@ wxPen DataViewer::borderPen(bool) const { return wxPen(); }
|
||||
ValueViewer* DataViewer::focusedViewer() const { return nullptr; }
|
||||
Context& DataViewer::getContext() const { return set->getContext(); }
|
||||
|
||||
Rotation DataViewer::getRotation() const {
|
||||
StyleSheetP stylesheet = set->stylesheetFor(card);
|
||||
StyleSheetSettings& ss = settings.stylesheetSettingsFor(*stylesheet);
|
||||
return Rotation(ss.card_angle(), stylesheet->getCardRect(), ss.card_zoom());
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------- : Setting data
|
||||
|
||||
void DataViewer::setCard(const CardP& card) {
|
||||
|
||||
@@ -52,6 +52,8 @@ class DataViewer : public SetView {
|
||||
virtual ValueViewer* focusedViewer() const;
|
||||
/// Get a script context to use for scripts in the viewers
|
||||
Context& getContext() const;
|
||||
/// The rotation to use
|
||||
virtual Rotation getRotation() const;
|
||||
|
||||
// --------------------------------------------------- : Setting data
|
||||
|
||||
|
||||
@@ -58,8 +58,8 @@ class ValueViewer {
|
||||
/// Convert this viewer to an editor, if possible
|
||||
virtual ValueEditor* getEditor() { return 0; }
|
||||
|
||||
protected:
|
||||
DataViewer& viewer; ///< Our parent object
|
||||
protected:
|
||||
StyleP styleP; ///< The style of this viewer
|
||||
ValueP valueP; ///< The value we are currently viewing
|
||||
|
||||
|
||||
Reference in New Issue
Block a user