Added support for scripts to determine word lists;

Added 'trim' and 'remove_tags' script functions;
Simplified safety improvements of locale checker;
Added 'is_targeted' function to magic game to replace the contains(..) calls

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@635 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2007-08-28 18:33:38 +00:00
parent ccaea98a67
commit fcc89b64d6
16 changed files with 479 additions and 225 deletions
+1
View File
@@ -30,6 +30,7 @@ void ActionStack::add(Action* action, bool allow_merge) {
action->perform(false); // TODO: delete action if perform throws
tellListeners(*action, false);
// clear redo list
if (!redo_actions.empty()) allow_merge = false; // don't merge after undo
FOR_EACH(a, redo_actions) delete a;
redo_actions.clear();
// try to merge?
+12
View File
@@ -286,3 +286,15 @@ void RotatedDC::SetClippingRegion(const RealRect& rect) {
void RotatedDC::DestroyClippingRegion() {
dc.DestroyClippingRegion();
}
// ----------------------------------------------------------------------------- : Other
Bitmap RotatedDC::GetBackground(const RealRect& r) {
wxRect wr = trNoNeg(r);
Bitmap background(wr.width, wr.height);
wxMemoryDC mdc;
mdc.SelectObject(background);
mdc.Blit(0, 0, wr.width, wr.height, &dc, wr.x, wr.y);
mdc.SelectObject(wxNullBitmap);
return background;
}
+6 -1
View File
@@ -172,7 +172,7 @@ class RotatedDC : public Rotation {
// Fill the dc with the color of the current brush
void Fill();
// --------------------------------------------------- : Forwarded properties
// --------------------------------------------------- : Properties
/// Sets the pen for the dc, does not scale the line width
void SetPen(const wxPen&);
@@ -193,6 +193,11 @@ class RotatedDC : public Rotation {
void SetClippingRegion(const RealRect& rect);
void DestroyClippingRegion();
// --------------------------------------------------- : Other
/// Get the current contents of the given ractangle, for later restoring
Bitmap GetBackground(const RealRect& r);
inline wxDC& getDC() { return dc; }
private: