mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-11 13:17:00 -04:00
- Added 'package list' field type
- Some refactoring of the other field types git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@790 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
//+----------------------------------------------------------------------------+
|
||||
//| Description: Magic Set Editor - Program to make Magic (tm) cards |
|
||||
//| Copyright: (C) 2001 - 2007 Twan van Laarhoven |
|
||||
//| License: GNU General Public License 2 or later (see file COPYING) |
|
||||
//+----------------------------------------------------------------------------+
|
||||
|
||||
#ifndef HEADER_RENDER_VALUE_PACKAGE_CHOICE
|
||||
#define HEADER_RENDER_VALUE_PACKAGE_CHOICE
|
||||
|
||||
// ----------------------------------------------------------------------------- : Includes
|
||||
|
||||
#include <util/prec.hpp>
|
||||
#include <render/value/viewer.hpp>
|
||||
#include <data/field/package_choice.hpp>
|
||||
|
||||
// ----------------------------------------------------------------------------- : PackageChoiceValueViewer
|
||||
|
||||
/// Viewer that displays a package choice value
|
||||
class PackageChoiceValueViewer : public ValueViewer {
|
||||
public:
|
||||
DECLARE_VALUE_VIEWER(PackageChoice) : ValueViewer(parent,style) { initItems(); }
|
||||
|
||||
virtual void draw(RotatedDC& dc);
|
||||
|
||||
struct Item{
|
||||
String package_name;
|
||||
String name;
|
||||
Bitmap image;
|
||||
};
|
||||
protected:
|
||||
vector<Item> items;
|
||||
private:
|
||||
void initItems();
|
||||
struct ComparePackagePosHint;
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------- : EOF
|
||||
#endif
|
||||
Reference in New Issue
Block a user