Commit Graph

93 Commits

Author SHA1 Message Date
twanvl bd55326c7d * Added console panel for evaluating scripts and showing error messages.
* Rewrite of error queue code: errors are now pulled, instead of being turned into messageboxes automatically.

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1629 0fc631ac-6414-0410-93d0-97cfa31319b6
2011-01-21 13:26:03 +00:00
twanvl 53bbcfe9a9 Be explicit about type of angles: either Radians or Degrees.
Angles are always doubles.
Internally use radians as much as possible.

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1605 0fc631ac-6414-0410-93d0-97cfa31319b6
2011-01-09 14:49:59 +00:00
twanvl 463c3d9a81 (minor) use getAngle() instead of trAngle(0)
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1470 0fc631ac-6414-0410-93d0-97cfa31319b6
2010-08-03 14:53:30 +00:00
twanvl 2bc67b964f multiple choice checklists also work in non-native look
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1468 0fc631ac-6414-0410-93d0-97cfa31319b6
2010-08-03 14:50:30 +00:00
twanvl 0fc52a7952 alignment for choice fields rendered as text (#16)
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1463 0fc631ac-6414-0410-93d0-97cfa31319b6
2010-08-02 21:42:55 +00:00
twanvl e1d9437320 always draw checkerboard behind default image
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1462 0fc631ac-6414-0410-93d0-97cfa31319b6
2010-08-02 20:53:09 +00:00
coppro cf91f9c43b Update copryright date to 2010.
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1438 0fc631ac-6414-0410-93d0-97cfa31319b6
2010-03-01 23:33:25 +00:00
coppro 47aa7ce923 Rename 'cannocial_name_form' to 'canonical_name_form'
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1433 0fc631ac-6414-0410-93d0-97cfa31319b6
2009-12-04 06:04:57 +00:00
coppro b73f081b60 Updated copyright information (2009 + my real name)
MSE now handles opening more gracefully - can handle directories and failures
Changed behavior to always save cards to separate files with intent to add VCS later (note: shouldn't do this for zip, but can't see a good way to approach this)


git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1388 0fc631ac-6414-0410-93d0-97cfa31319b6
2009-06-19 03:09:05 +00:00
twanvl 4f969f7fe2 fixed text placement in multiple choice check lists
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1300 0fc631ac-6414-0410-93d0-97cfa31319b6
2009-01-08 14:37:06 +00:00
twanvl 1541d57c1a use font settings for drawing multiple choice text labels, spacing and direction are scriptable.
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1298 0fc631ac-6414-0410-93d0-97cfa31319b6
2009-01-08 14:19:17 +00:00
twanvl 56463a8806 Added empty_name to PackageChoiceField;
Package choice fields now reflect in scripts as "/:NO-WARN-DEP:packagename". This suppresses warnings when loading files in that package or using the package as a symbol font.

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1187 0fc631ac-6414-0410-93d0-97cfa31319b6
2008-08-31 19:42:30 +00:00
twanvl dc0fee0369 Fixed: CardViewers fighting over styles when multiple windows are open
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1184 0fc631ac-6414-0410-93d0-97cfa31319b6
2008-08-31 00:07:30 +00:00
twanvl a2af3211a4 Moved mask to Style and mask related drawing to ValueViewer.
Used the same mask also for TextStyles.
To keep the text selectable (since the mask is now also used for containsPoint), the future sight cost masks needed to be updated.

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1183 0fc631ac-6414-0410-93d0-97cfa31319b6
2008-08-30 23:49:12 +00:00
twanvl a183ecc9a6 New class CachedScriptableMask: like CachedScriptableImage, only containing an AlphaMask instead of an Image/Bitmap.
Use CachedScriptableMask for all masks.

TODO: This introduces some duplicate code in ValueViewers that could be fixed by moving mask to the Style base class.

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1182 0fc631ac-6414-0410-93d0-97cfa31319b6
2008-08-30 21:51:38 +00:00
twanvl acb3493b59 Merged behaviour from ContourMask into AlphaMask.
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1181 0fc631ac-6414-0410-93d0-97cfa31319b6
2008-08-30 17:15:22 +00:00
twanvl b586790421 Cleaned up handling of what things should be drawn by using the DrawWhat enumeration type.
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1072 0fc631ac-6414-0410-93d0-97cfa31319b6
2008-08-06 03:05:40 +00:00
twanvl 9a68c91635 Added 'combine' option to ColorStyle.
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1069 0fc631ac-6414-0410-93d0-97cfa31319b6
2008-08-05 20:43:11 +00:00
twanvl 08a913686c Content dependent scripted images of (multiple) choice values are now updated correctly
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1064 0fc631ac-6414-0410-93d0-97cfa31319b6
2008-08-05 17:04:03 +00:00
twanvl c476de0fa2 Fixed: containsPoint for color and image value viewers. They used the wrong Rotation.
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1029 0fc631ac-6414-0410-93d0-97cfa31319b6
2008-07-23 12:39:07 +00:00
twanvl ae14784fd6 Reduce coupling between ValueEditors/Viewers and Set and StyleSheet.
- Adding of actions is done with an addAction function
 - Files are read from
     - getStylePackage for styling stuff (this is stylesheet)
     - getLocalPackage for symbol and image values (this was the set)


git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@970 0fc631ac-6414-0410-93d0-97cfa31319b6
2008-06-04 00:21:06 +00:00
twanvl 13fa92ea9c Fixed: Cut out from color fields is incorrect.
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@950 0fc631ac-6414-0410-93d0-97cfa31319b6
2008-06-02 17:39:50 +00:00
twanvl f3ff6f22ae Renamed global PackageManager object to package_manager to reduce confusion
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@907 0fc631ac-6414-0410-93d0-97cfa31319b6
2008-05-31 14:45:04 +00:00
twanvl d45a14b869 Fixed: The separator line between rule text and reminder text is not drawn when the text contains atoms.
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@890 0fc631ac-6414-0410-93d0-97cfa31319b6
2008-05-30 18:22:15 +00:00
twanvl c3a7a350bb Some more margin
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@864 0fc631ac-6414-0410-93d0-97cfa31319b6
2008-05-18 20:14:47 +00:00
coppro 26562e03e3 Updated copyright information - added my name and also changed 2007 to 2008
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@837 0fc631ac-6414-0410-93d0-97cfa31319b6
2008-04-06 18:16:32 +00:00
coppro e6f466933d More warnings/minor fixes
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@836 0fc631ac-6414-0410-93d0-97cfa31319b6
2008-04-06 18:08:32 +00:00
twanvl ed060aeb04 nicer options for defaults in localization tr() functions
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@808 0fc631ac-6414-0410-93d0-97cfa31319b6
2008-01-01 16:06:58 +00:00
twanvl 5fc06663b1 Added icon for MSE in packages window;
Added resample(image,width,height), instead of always passing in images

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@806 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-12-30 23:48:26 +00:00
twanvl e49f2eebcb fixed: errors in templates could cause program to hang/crash
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@796 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-12-29 21:12:11 +00:00
twanvl d2196eea09 Finally got precompiled headers to work.
Now all C++ files need to #include <util/prec.hpp>
 That is why all .cpp files are touched by this commit

Many changes to installers and update checking:
     - the window is now called PackagesWindow, in a new source file
     - update checking is now independent from the PackagesWindow. For update checking only a list of package versions are needed (vector<PackageDependency>). This is much less information to download at each startup.
     - the list of available packages is now a list of available Installers, since an installer can contain multiple packages.
     - moved the logic of dependency checking etc. to data/installer
     - moved the actual installation to util/io/package_manager
     - moved directory iteration/creation logic to util/file_utils
     - added PackageDirectory: the local and global package directory now have their own object (was part of PackageManager)
     - added PackageVersion: for detecting if a package has been modified after it was installed.
     - added PackageDescription: description/header of a package. Basicly the same as what Packaged provides.
     - added DownloadableInstaller: where to find an insaller, what does it contain?
     - added InstallablePackage: brining it all together: installer, package, status, action.

Current status: the insaller is currently broken in a few places, more on that soon.

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@792 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-12-29 18:30:41 +00:00
twanvl d493394519 - 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
2007-12-26 23:37:45 +00:00
twanvl 8d86e4a25c A bit of refactoring:
- common code of ChoiceValueViewer and MultipleChoiceValueViewer put into functions
 - RotatedDC can now draw text with shadow.
 - DECLARE_STYLE_TYPE macro and friends do slightly more.

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@788 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-12-26 17:46:40 +00:00
twanvl 547a48b98d - Optimization: common parameters to built in functions are no longer looked up as a string at each call, instead their integer ids are global constants
- Optimization: some other minor tweaks.
 - Nicer --help message

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@783 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-12-24 02:04:45 +00:00
twanvl b79f52db84 New rotation system (see forum thread).
Major changes:
  - when rotating, the top left corner of the rectangle stays in place.
  - ValueViewers get a dc that is pre-rotated/translated for them, i.e. (0,0) is the top-left of the viewer (with ValueViewer::getRotation).
  - moved 'angle' from individual Styles to the Style base class.
  - any rotation angle is now possible. angle is still an int for now.

This warrants a version bump

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@782 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-12-23 21:58:58 +00:00
twanvl f60e929d78 Fixed zoom crash;
Fixed crash when mising symbol font

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@725 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-09-21 10:13:57 +00:00
twanvl 322e8715fc Fixed: choice images were generated with the wrong context from invalidate()
Choice thumbnails are now checked to not be 'local' before reading from cache, fixes issue with wrong rarity symbol in the drop down list;
Disabled unimplemented menu items;
Multiple choice items for RENDER_LIST are now zoomed, and positioning is on rotated cards is fixed.

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@650 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-08-29 22:52:56 +00:00
twanvl 52ec7b38c0 Images are now cached as wxBitmap, not wxImage. This should improve performance.
Fixed some more corner cases of rotation+zoom.

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@630 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-08-25 21:24:28 +00:00
twanvl 741b987d54 Fixed alignment of images when zoom != 1
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@629 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-08-25 01:09:46 +00:00
twanvl f12bc70425 Improved search algorithm for determining text size:
- check using previous scale, often gives correct answer when typing
 - binary search + bound estimation otherwise
This allows the step size to be decreased, giving a better fit.

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@624 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-08-24 20:04:26 +00:00
twanvl bdd3429479 Symbol resizing using aspect ratio;
TODO: copy code for rarity box to other styles

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@622 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-08-24 02:05:50 +00:00
twanvl d68f73edfc Various tweaks and fixes, mostly to the drop down lists
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@620 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-08-23 23:29:20 +00:00
twanvl d590819762 Removed last of the BeginDrawing/EndDrawing calls;
Added english_number_ordinal script function;
Working on symbols with a different aspect ratio (i.e. wider/smaller symbols)

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@558 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-07-12 17:01:07 +00:00
twanvl d4e46e06d8 'Edit' and 'gallery' button for symbol editor
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@522 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-07-07 18:04:02 +00:00
twanvl 9f567a512e Rotation can now zoom in x and y directions separatly; text can be scaled stretched/compressed horizontally.
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@520 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-07-07 16:19:17 +00:00
twanvl 470fbcb9a7 Fixed: failed to re-prepare text after content dependent script changed
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@482 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-07-04 22:23:09 +00:00
twanvl b3d04fe192 Scripts depending on content_something are re-updating after updating the content properties
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@480 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-07-04 17:15:08 +00:00
twanvl 2868e014cf Script errors now have information on where the error occureed (what value);
Script operator "int + object" now uses string concatenation instead of converting the object to integer;
Html export window uses a dummy set for editing options, so we don't pollute the set's undo stack;
Choice rendererer in nativelook 'both' style always leaves room for the icon;
Version bump

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@438 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-06-27 12:18:54 +00:00
twanvl 11b8242816 Implemented export functions;
Choice viewer uses font when rendering text.

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@433 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-06-25 20:40:22 +00:00
twanvl e46cbe66b2 Cleaned up Set::Styling/Card::Styling by spliting that functionality into a 'DelayedIndexMaps' class;
Added 'right' and 'bottom' properties to style as an alternative way of specifying width/height;
Added content_width, content_height and content_lines properties that give feedback on text rendering;
Always show warnings when showing errors and vice-versa, this prevents script errors from appearing before the reader/parse error that caused them;
Finally some preliminairy work on export templates

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@428 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-06-22 23:12:41 +00:00