mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 04:57:00 -04:00
Choice images recomputed less often;
Implemented GraphType for choosing different layouts on the stats panel; Added option to define order of graph groups; Added busy cursor when loading recent file; Parentheses in FOR_EACH macro git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@351 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
+16
-9
@@ -29,10 +29,14 @@ StatsDimension::StatsDimension(const Field& field)
|
||||
, numeric (false)
|
||||
, show_empty (false)
|
||||
{
|
||||
// choice colors?
|
||||
// choice field?
|
||||
const ChoiceField* choice_field = dynamic_cast<const ChoiceField*>(&field);
|
||||
if (choice_field) {
|
||||
colors = choice_field->choice_colors;
|
||||
int count = choice_field->choices->lastId();
|
||||
for (int i = 0 ; i < count ; ++i) {
|
||||
groups.push_back(choice_field->choices->choiceName(i));
|
||||
}
|
||||
}
|
||||
// initialize script, card.{field_name}
|
||||
Script& s = script.getScript();
|
||||
@@ -50,6 +54,7 @@ IMPLEMENT_REFLECTION_NO_GET_MEMBER(StatsDimension) {
|
||||
REFLECT(numeric);
|
||||
REFLECT(show_empty);
|
||||
REFLECT(colors);
|
||||
REFLECT(groups);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -69,13 +74,6 @@ StatsCategory::StatsCategory(const StatsDimensionP& dim)
|
||||
, type(GRAPH_TYPE_BAR)
|
||||
{}
|
||||
|
||||
IMPLEMENT_REFLECTION_ENUM(GraphType) {
|
||||
VALUE_N("bar", GRAPH_TYPE_BAR);
|
||||
VALUE_N("stack", GRAPH_TYPE_STACK);
|
||||
VALUE_N("pie", GRAPH_TYPE_PIE);
|
||||
VALUE_N("scatter", GRAPH_TYPE_SCATTER);
|
||||
}
|
||||
|
||||
IMPLEMENT_REFLECTION_NO_GET_MEMBER(StatsCategory) {
|
||||
if (!automatic) {
|
||||
REFLECT(name);
|
||||
@@ -102,4 +100,13 @@ void StatsCategory::find_dimensions(const vector<StatsDimensionP>& available) {
|
||||
dimensions.push_back(dim);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------- : GraphType (from graph_type.hpp)
|
||||
|
||||
IMPLEMENT_REFLECTION_ENUM(GraphType) {
|
||||
VALUE_N("bar", GRAPH_TYPE_BAR);
|
||||
VALUE_N("pie", GRAPH_TYPE_PIE);
|
||||
VALUE_N("stack", GRAPH_TYPE_STACK);
|
||||
VALUE_N("scatter", GRAPH_TYPE_SCATTER);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user