Added 'position hint' to packages, used to specify the order of the packages in a package list;

Added 'pack type', intended for playtesting (random boosters/starters);
Added 'default(_image)' property to ImageStyle, and added the frame fillers for magic;
Added blurring and bold printing (rather hacky) to the text rendering functions (used for "double click to add image" text);
Added 'symmetric overlay' combine mode, which will look really nice for hybrids;
Moved the watermark choices from the game to an include file in magic-watermarks;
Working on a replacement for the image scripting system that plays nicer with the rest of the code. In particular, it will be possible to compare generated images quickly, so they can be updated continuously. This is a work in progress, currently there are two versions of everything.

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@327 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2007-05-09 21:41:15 +00:00
parent 6f7db851a7
commit 3c4729aaa2
63 changed files with 964 additions and 134 deletions
+12
View File
@@ -44,6 +44,16 @@ void PackageList::drawItem(DC& dc, int x, int y, size_t item, bool selected) {
dc.DrawText(d.package->full_name, (int)text_pos.x, (int)text_pos.y + 130);
}
struct PackageList::ComparePackagePosHint {
bool operator () (const PackageData& a, const PackageData& b) {
// use position_hints to determine order
if (a.package->position_hint < b.package->position_hint) return true;
if (a.package->position_hint > b.package->position_hint) return false;
// ensure a deterministic order: use the names
return a.package->name() < b.package->name();
}
};
void PackageList::showData(const String& pattern) {
// clear
packages.clear();
@@ -75,6 +85,8 @@ void PackageList::showData(const String& pattern) {
// Next package
f = wxFindNextFile();
}
// sort list
sort(packages.begin(), packages.end(), ComparePackagePosHint());
// update list
update();
}