Commit Graph

185 Commits

Author SHA1 Message Date
twanvl 3d7367fc9d don't ignore line.top when aligning text
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1333 0fc631ac-6414-0410-93d0-97cfa31319b6
2009-01-10 14:13:20 +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 fee64d283f Cleaned up the Alignment type, it is now much more orthogonal.
Changed the behavior of justifying:
 - by default justify words instead of characters
 - only justify before soft line breaks, unless "alignment: force justify" is used.

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1251 0fc631ac-6414-0410-93d0-97cfa31319b6
2008-12-11 19:17:55 +00:00
twanvl fa3950d97b move towards per-line alignment
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1246 0fc631ac-6414-0410-93d0-97cfa31319b6
2008-12-11 17:21:10 +00:00
twanvl 9d1a23ad53 Use Regex instead of wxRegEx everywhere
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1199 0fc631ac-6414-0410-93d0-97cfa31319b6
2008-09-03 17:55:59 +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 ce906e83f8 Cleaned up the calculation of bounds of symbols, this fixes bounds calculation with symmetries.
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1178 0fc631ac-6414-0410-93d0-97cfa31319b6
2008-08-27 23:46:31 +00:00
twanvl 01a220f199 Made symbol font size and alignment scriptable.
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1091 0fc631ac-6414-0410-93d0-97cfa31319b6
2008-08-08 00:35:53 +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
coppro ebe26e0444 Minor updates that make things work!
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@945 0fc631ac-6414-0410-93d0-97cfa31319b6
2008-06-02 02:36:56 +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
twanvl bcfa07a724 Fixed some problems where AColor was not used correctly; documentation of AColor.
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@849 0fc631ac-6414-0410-93d0-97cfa31319b6
2008-05-16 20:22:39 +00:00
twanvl d70c3d6d74 Moved the AColor type to a gfx/ header, so other code can use it.
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@847 0fc631ac-6414-0410-93d0-97cfa31319b6
2008-05-16 19:49:14 +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 4defac43ff Added <color:???> and <size:???> tags for changing text color/size
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@831 0fc631ac-6414-0410-93d0-97cfa31319b6
2008-03-24 14:52:42 +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 17965eea73 Fixed: direction:vertical was putting characters on the next line, causing multi-char symbols to render incorrectly
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@805 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-12-30 13:42:29 +00:00
twanvl 3ceec52c1c - no longer try to draw fields with huge or negative size
- download icons of packages

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@799 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-12-29 23:51:19 +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 1580b8deaf Fixed bug in smart_less, strings ending in numbers were compared incorrectly;
Text viewer now doesn't scale when there is a line break inside a word;
Fixed: extra newline was inserted when there was a line break inside a word if there was padding.

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@743 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-09-22 13:10:51 +00:00
twanvl a46559ea01 Fixed: padding_top was added to the bottom instead of the top
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@737 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-09-21 18:13:25 +00:00
twanvl f1fe10462c stretch-overflow biw works with rotation and alignment.
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@733 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-09-21 17:53:53 +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 1dbdbd5786 with paragraph_height text now resizes if a single paragraph becomes full;
Fixed issue with reader looping when save_value=false;
Package manager will not contain packages that failed to load

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@681 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-09-09 18:12:55 +00:00
twanvl fc44560238 Added 'card' to value actions, this fixes a bug where extra fields get updated with the wrong context, and it should also speed things up.
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@673 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-09-09 00:39:01 +00:00
twanvl 54fdc78858 Added 'paragraph height' property to split a text field into multiple boxes.
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@666 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-09-02 21:00:49 +00:00
twanvl bdc1e12e95 Added <prefix> and <suffix> tags;
Added prefix and suffix support to combined_editor;
'always symbol' now checks if the symbols are available in the symbol font;
Fixed parser bug in spec_sort;
A first information field is no longer used as set identification

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@653 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-09-01 19:56:43 +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 790e55a35c Fixed 'use zoom and rotation settings when exporting';
Fixed: enabled was not used for default symbol in symbol font;

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@640 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-08-28 22:35:49 +00:00
twanvl 087af8360d Added <soft> tag that takes up no space for alignment purposes;
used this tag for magic creature types;
Added correct handling of Tribal sub types;
Fixed sort_index use by spoiler export template

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@637 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-08-28 20:49:25 +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