Added CustomPackDialog for user constructed PackTypes.

There is no UI for using these custom types yet.

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1318 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2009-01-09 15:43:15 +00:00
parent be08fac89b
commit 6fdb7f92b1
5 changed files with 196 additions and 44 deletions
+15 -7
View File
@@ -20,6 +20,19 @@ class PackTotalsPanel;
struct CardSelectEvent;
DECLARE_POINTER_TYPE(PackType);
// ----------------------------------------------------------------------------- : Utility
// for lists of spin controls
struct PackAmountPicker {
PackTypeP pack;
wxStaticText* label;
wxSpinCtrl* value;
PackAmountPicker() {}
PackAmountPicker(wxWindow* parent, wxFlexGridSizer* sizer, const PackTypeP& pack);
void destroy(wxFlexGridSizer* sizer);
};
// ----------------------------------------------------------------------------- : RandomPackPanel
/// A SetWindowPanel for creating random booster packs
@@ -59,16 +72,11 @@ class RandomPackPanel : public SetWindowPanel {
wxButton* generate_button;
wxRadioButton* seed_random, *seed_fixed;
PackTotalsPanel* totals;
struct PackItem {
PackTypeP pack;
wxStaticText* label;
wxSpinCtrl* value;
};
vector<PackItem> packs;
vector<PackAmountPicker> pickers;
#if USE_NEW_PACK_SYSTEM
PackGenerator generator;
int last_seed;
#endif
/// Actual intialization of the controls