Commit Graph

67 Commits

Author SHA1 Message Date
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
twanvl 97e0e8d6d6 Choice rendering now uses "style.image()" instead of "style.choice_images[value]";
Added script functions for working with multiple choice values;
Added in_context support for filter_rule;
Optimized toUpper/toLower because they are slow on windows (they use thread local storage and mutexes)

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@427 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-06-17 13:13:56 +00:00
twanvl 8b11433cbd Reader now warns about invalid UTF-8 files;
Fixed possible hang when reading multiline strings with incorrect indentation;
Warnings from reading are shown also in NewSetWindow;
Script parse errors get reported with the correct line number;

Added support for showing multiple choice fields as a single image;
Added 'line_below' to ChoiceField::Choice, for putting a line below menu items.

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@420 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-06-12 19:35:24 +00:00
twanvl 33fd2b5e18 default smart pointer type switched to intrusive_ptr
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@337 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-05-11 21:34:53 +00:00
twanvl 00b3e3a3cd Conversion to new ScriptableImage complete, this affected quite a bit, including the evil thumbnail thread;
Added StyleListener, so style changes are only propagated to interested viewers.

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@329 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-05-10 00:47:27 +00:00
twanvl 3c4729aaa2 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
2007-05-09 21:41:15 +00:00
twanvl efa1992f4a Support for masks for color fields
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@325 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-05-06 18:15:18 +00:00
twanvl 5c910e3059 Added 'angle' property for choice fields
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@315 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-04-30 23:16:38 +00:00
twanvl e4500ce490 Font name can now be scripted
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@291 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-04-22 22:37:20 +00:00
twanvl a2e709d86b It is 2007 by now
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@275 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-04-21 17:06:29 +00:00
twanvl f915a491a8 fixed: "Double click to select image" text now always shown when editing;
Correct control used for clipboard actions in CardsPanel

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@253 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-04-12 19:39:08 +00:00
twanvl 958da421d9 Implemented ContourMask (mask for text fields)
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@251 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-04-12 18:11:41 +00:00
twanvl 42ab8c84c0 Fixed TextCtrl to work for keyword properties;
Added wrapping of <> around parameters to TextElement;
Added colors for keyword parameters;
Added menu & toolbar for keyword panel;
Fixed bug in package, save/save-as was the wrong way around;
Added third quality setting to RotatedDC: using SetUserScale, this gets you more precise positioning.

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@250 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-04-12 17:35:00 +00:00
twanvl f1c5a8b974 Fixed Actions for TextCtrl, actions used to apply to the wrong value.
Changed some TABs to spaces in macros, that should end the conflicts because we use different tab sizes (4 vs 8)

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@234 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-03-24 20:27:38 +00:00
coppro 851799d1b6 Fixed some bugs to make GCC work. I needed to change SimpleValueAction to take the function as a variable as opposed to a template parameter - GCC won't accept pointers from a base class in templates.
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@231 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-03-23 00:57:06 +00:00
twanvl f5de36057c Working MultipleChoiceValueEditor for checklist style
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@228 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-03-22 15:36:07 +00:00
twanvl 3f0c284a50 added scrollbar to NativeLookEditor
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@223 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-03-21 23:40:17 +00:00
twanvl 0c6068d6a2 paritially implemented MultipleChoice viewer/editor
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@222 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-03-21 18:04:09 +00:00
twanvl 332f17e543 minor cleanup of comments and includes
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@215 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-03-18 15:24:33 +00:00
twanvl d30e0f7bc5 Added support for informational headings in native look editor.
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@212 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-03-18 14:50:44 +00:00
twanvl 3d9181e5f6 Eliminated most build errors (gcc,linux,wxGTK).
What is left is mostly:
 - warning: converting double to int
     -> add a cast/to_int or ignore
 - wrong initialization order in ctor
     -> just swap the order to match the class
 - errors about wxCursors
     -> add a function loadResourceCursor


git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@183 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-01-29 00:04:20 +00:00
twanvl 439dbfce6b rewritten retrying part of reader, it is now implemented how it should have been from the start.
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@175 0fc631ac-6414-0410-93d0-97cfa31319b6
2006-12-25 16:52:07 +00:00
twanvl d5db3f46ff numeric statistics dimensions; minor tweaks of graph
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@150 0fc631ac-6414-0410-93d0-97cfa31319b6
2006-12-22 22:47:48 +00:00
twanvl 3eece6eb61 support for masks in choice styles
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@148 0fc631ac-6414-0410-93d0-97cfa31319b6
2006-12-22 19:29:51 +00:00
twanvl cf39deec24 combined_editor function, and improved dependency handling (removing duplicates), viewer refreshes on events from script manager
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@147 0fc631ac-6414-0410-93d0-97cfa31319b6
2006-12-22 19:05:52 +00:00
twanvl 274cb1117f rotation and style changing works
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@144 0fc631ac-6414-0410-93d0-97cfa31319b6
2006-12-22 15:08:49 +00:00
twanvl c3ae5dfa1b rendering of <atom>
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@127 0fc631ac-6414-0410-93d0-97cfa31319b6
2006-12-19 17:27:38 +00:00