Commit Graph

85 Commits

Author SHA1 Message Date
GenevensiS c531b8aa74 Add option to download missing stylesheets on startup 2026-05-18 23:31:39 +02:00
GenevensiS 0baa73ae7d fix bugs
- dimensions_of should now work in all contexts
- import_image now works in style files, although should be avoided, since it reloads the file every time the code in run, it should be used in one shot scripts, like import scripts and bulk modification scripts
- process_english_hints now correctly processes <singular> and <plural> tags
2026-04-24 13:18:40 +02:00
GenevensiS fbf2023848 convert to CRLF line endings 2026-01-05 01:01:18 +01:00
GenevensiS 436c437189 add compiler directives
add compiler directives
2025-12-30 01:18:04 +01:00
GenevensiS 5c1b7b9dfc add download_image, refactor import_image 2025-12-28 13:59:23 +01:00
GenevensiS 3b7d4b617f nested folder error message 2025-12-13 21:00:23 +01:00
GenevensiS 04a3289755 Add dark icon property 2025-12-05 13:36:09 +01:00
GenevensiS cf0a84a8a7 Card data in images (minimum viable)
* remove wxEmptyString

* improve style tab carousel

* create web request window

* add drop target and drop source
2025-11-28 10:42:30 +01:00
GenevensiS 81e9a1e26f Card data in images (start)
* Add uuid implementation

* Simplify uid implementation

* Check for uid conflicts upon adding/copying cards

* Remove unnecessary checks

these are already checked as part of the first loop, since they were added to set.cards

* Implement card linking

* refactor to avoid triple loop

* Start link visualization

* Continue link visualization

* formatting

* add missing locale entries

* improve layout

* improve UI refresh

* copy links when copying cards

* implement second face editor

* refactor using macros

* get references

* pasting multiple cards and links

* start refactoring editors

* continue refactoring editors

* continue refactoring editors again

* finish refactoring editors

* refresh card list on link editor event

* tweak event handling

* Add insert_image script function

* change parameter type

* add script functions to get cards

* add dimensions_of script function

calculate both dimensions simultaneously while rendering the image only once.

* save value even if not editable

* add get_mse_locale script function

* Change zoom scale choices

* bug fixes

* Scale symbol spacing with font size

* sync locales

* standardize line ending

* handle links in new_card

* initial

waiting on wxWidgets 3.3.1

* update comment

* store rect in image filename

* store rect in temp file name

* Update package.cpp

* change line endings
2025-08-11 16:57:04 +02:00
GenevensiS 3bf9de18b1 Implement unique IDs and card linking 2025-08-11 16:17:13 +02:00
GenevensiS 70e44474a5 fix "referencing nonexistant file" bug
improve internal error message
2025-07-15 02:30:11 +02:00
GenevensiS 337f463b9a expose folder_name package property 2025-06-12 22:59:36 +02:00
GenevensiS 96fd385962 exempt symbol-fonts from dependency checks (#92) 2024-09-26 22:04:02 -04:00
GenevensiS e72ee85525 Add exists_in_package script function (#86)
* add exists_in_package script function

* Update index.txt
2024-09-26 22:03:27 -04:00
Twan van Laarhoven c9c708dfbe Fix #63: don't use reference arguments in openFileInPackage 2020-05-27 22:16:48 +02:00
Twan van Laarhoven 749de23eb0 Fix error when using saveAs 2020-05-22 00:25:35 +02:00
Twan van Laarhoven 6b6306fc86 Don't use wxMkDir, it shows stupid error messages 2020-05-16 20:12:04 +02:00
Twan van Laarhoven 968b8eabca Add "Save as directory" 2020-05-09 13:26:33 +02:00
Twan van Laarhoven 6edba0c5c0 Move buffering to Reader 2020-05-02 01:04:35 +02:00
Twan van Laarhoven a1d54f36fc Use LocalFileName class for file names inside a package. 2020-04-30 00:20:32 +02:00
Twan van Laarhoven d64dee7834 Fix: images were not being loaded from zip files.
wxImage::LoadFile requires the file to be seekable to peek at the header.
We work around this by buffering the header in a wrapper class.
2020-04-28 22:46:34 +02:00
Twan van Laarhoven 5f615b3117 Fix #5. Use our own function instead of wxRemoveFile, because the latter shows an error when the file doesn't exist. 2020-04-28 21:25:05 +02:00
Twan van Laarhoven 40d78edf0f Cleaned up the reflection code a bit
* Renamed 'tag' variable to 'handler'
* Removed addAlias stuff, instead check for matching names with if statements
* Added after_reading function that is called by Reader after reading a complete object. This generalizes Packaged::validate, which is now also called via this mechanism.
* Removed some backwards compatibility with <0.3.0 for templates
2020-04-26 15:33:59 +02:00
Twan van Laarhoven bad9981ad9 Cleaned up copyright block.
Removed the year so we don't get tempted to change this ever again.
2020-04-26 01:11:14 +02:00
Twan van Laarhoven 4327abb803 Remove DECLARE_TYPEOF
It is no longer needed since C++11
2020-04-26 00:51:16 +02:00
Twan van Laarhoven 37c8641641 Replace scoped_ptr by unique_ptr 2020-04-25 22:28:32 +02:00
Twan van Laarhoven 64ea1d7322 Clean up pointer use:
* Use unique_ptr for Actions instead of manual memory management
 * Use unique_ptr in KeywordDatabase
 * Use unique_ptr instead of shared_ptr for file formats
 * Don't pass shared_ptr to Reader/Writer, use references instead
Also
 * Switch to C++17 so we can use map::try_emplace
2020-04-25 22:20:51 +02:00
Twan van Laarhoven 708b4389a0 Use make_intrusive/make_shared for smart pointer construction. 2020-04-25 22:20:51 +02:00
Twan van Laarhoven 713a9e4a40 Use underscores instead of spaces for all internal names. And renamed some script functions at the same time.
* cannocial_name_form now outputs "_", where it used to use " "
* this simplifies reflectio and scripting code, because now C++ names are also MSE internal names
* added 'caption' property to fields. This is used instead of the name in NativeLookEditor, since the latter will now contain underscores.
* renamed text related script functions for consistency, since we were touching that part of the code anyway.
2020-04-22 23:48:26 +02:00
Twan van Laarhoven 35a89676b4 CMake file
Update to C++ 11: std::shared_ptr, for each loops
Update to wxWidgets 3.0+
2020-04-08 01:10:01 +02:00
Lymia Aluysia 1d912a6853 Update copyright strings. 2017-01-18 08:52:57 -06:00
Lymia Aluysia d2c635f739 Change tabs to two spaces. 2017-01-18 08:43:21 -06:00
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 f9e8bb88e3 profile package open timing
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1541 0fc631ac-6414-0410-93d0-97cfa31319b6
2010-12-07 21:14:10 +00:00
twanvl bcc582f912 added 'file_modified_time' function, which should be faster than using wxFileName
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1519 0fc631ac-6414-0410-93d0-97cfa31319b6
2010-10-03 16:47:38 +00:00
twanvl 4defd52aa2 allow reading images from the current directory in the CLI interface
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1475 0fc631ac-6414-0410-93d0-97cfa31319b6
2010-08-03 18:25:35 +00:00
twanvl 864cabb590 fixed nullptr exception when opening a stylesheet without a game twice, the solution is to re-load when loading/validating fails the first time
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1451 0fc631ac-6414-0410-93d0-97cfa31319b6
2010-07-21 18:49:12 +00:00
twanvl 51dfed69b4 Instead of the new_intrusive<T>() functions, use intrusive(new T)
This means we no longer need 8 different functions for different numbers of arguments, and non-const references can now also be passed to constructors without problems.

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1443 0fc631ac-6414-0410-93d0-97cfa31319b6
2010-07-21 14:32:28 +00:00
coppro 85854b1bd2 Fix warnings
Semi-fix bug #6 (does not work if the zipfile was loaded from a directory)


git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1439 0fc631ac-6414-0410-93d0-97cfa31319b6
2010-03-04 01:46:04 +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 f2d6714da9 (sorry for making this all one commit)
Fiddled with the backbone for scripts some more.
VCS are now suppported in sets but configuration/non-svn-systems missing
Linux build now uses precompiled headers (build time--)
A couple warning fixes too.


git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1427 0fc631ac-6414-0410-93d0-97cfa31319b6
2009-09-16 23:40:44 +00:00
coppro 7af4cd4bd0 Lots of miscellaneous fixes, also added basic VCS framework
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1416 0fc631ac-6414-0410-93d0-97cfa31319b6
2009-08-01 22:34:04 +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
coppro 4c9f3afb05 MSE can now save cards in separate files (needs manual config editing still).
Trailing slashes are stripped from commandline arguments (because directory.mse-set/ should be accepted)


git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1386 0fc631ac-6414-0410-93d0-97cfa31319b6
2009-06-18 02:18:23 +00:00
twanvl 42d40dbd1e Added Package::saveCopy, which is used to implement the write_set_file script function.
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1169 0fc631ac-6414-0410-93d0-97cfa31319b6
2008-08-24 19:48:51 +00:00
twanvl 64b7912835 Incremented version number to 0.3.7
When saving files an older version number is used if that version of MSE would be able to open the set

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1011 0fc631ac-6414-0410-93d0-97cfa31319b6
2008-06-28 16:31:40 +00:00
twanvl ecb5477958 Work around bug in wx path conversion from filenames in zip files for files with strange (unicode) names
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1001 0fc631ac-6414-0410-93d0-97cfa31319b6
2008-06-25 12:40:21 +00:00
twanvl 3267ac0cad Fixed bug caused by case sensitivity of filenames in newFileName
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@978 0fc631ac-6414-0410-93d0-97cfa31319b6
2008-06-06 19:03:30 +00:00
twanvl 7a38986171 Installing and removing packages from an installer now WORKS
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@908 0fc631ac-6414-0410-93d0-97cfa31319b6
2008-05-31 16:42:15 +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