Commit Graph

481 Commits

Author SHA1 Message Date
Twan van Laarhoven 386ddb40b9 Remove old code 2020-05-24 21:30:34 +02:00
Twan van Laarhoven 83448a1667 Fix #28: correctly track dependencies on card_style._.content / ..layout 2020-05-23 13:57:04 +02:00
Twan van Laarhoven 22b1c2604b Remove reader_pragma_handler hack 2020-05-22 01:23:53 +02:00
Twan van Laarhoven be3e8b1e6b Fix reflection of TextStyle::layout 2020-05-21 19:34:39 +02:00
Twan van Laarhoven 1a0e17221b Added StringView type (similar to std::string_view) 2020-05-21 19:29:42 +02:00
Twan van Laarhoven 6a299dfe41 Fix #48 2020-05-20 13:10:39 +02:00
Twan van Laarhoven 641acff92a Add game and stylesheet version numbers to set files. Closes #39 2020-05-19 23:56:23 +02:00
Twan van Laarhoven 09139128e1 Fix in_tag and is_tag calls, fixes #47 2020-05-19 22:59:38 +02:00
Twan van Laarhoven b3ddb295fc Rewrite of keyword matching code. This fixes #20
Uses new iterator based tagged string functions.
2020-05-17 22:00:59 +02:00
Twan van Laarhoven 0b653938cc Use unordered_map in KeywordTrie 2020-05-16 21:57:28 +02:00
Twan van Laarhoven e7c5a0fe32 Use '-' for negation in quick filter (closes #43) 2020-05-16 13:52:25 +02:00
Twan van Laarhoven ab2adf7e70 In quick filter, treat ! and : as literal characters when inside quotes (#43) 2020-05-16 13:25:25 +02:00
Twan van Laarhoven 5deaeeeb3e Cleanup: use override specifier everywhere, and enable gcc warning to check for it. 2020-05-16 00:23:18 +02:00
Twan van Laarhoven a7c47729c1 Clean up old style angle brackets in nested templates 2020-05-15 02:15:58 +02:00
Twan van Laarhoven dbb6d34bb3 Add <font:$family> tag, closes #24 2020-05-12 22:30:04 +02:00
Twan van Laarhoven 0c3712b61a Cleanup: indentation of public/protected/private keywords 2020-05-12 21:57:37 +02:00
Twan van Laarhoven 86aec577a2 Use enum class 2020-05-12 21:29:11 +02:00
Twan van Laarhoven 7781a428f6 Add constant for escaped < 2020-05-12 21:10:01 +02:00
Twan van Laarhoven cc56aec430 Settings filename 2020-05-12 18:54:04 +02:00
Twan van Laarhoven e6af772ebd Fix reading of symbols: perform after_reading for derived classes 2020-05-12 15:41:10 +02:00
Twan van Laarhoven e36dc69ca6 Fix: crash caused by keywords with empty parameter matches (partial fix for #33) 2020-05-12 14:45:54 +02:00
Twan van Laarhoven e8eacac5e7 Expose more information about text layout. 2020-05-10 14:16:10 +02:00
Twan van Laarhoven 1c35183839 Consistent order of style property updates.
See #4 (which is mostly fixed by this commit)
2020-05-10 00:20:37 +02:00
Twan van Laarhoven 0a0dd72e36 Fix null dereference when stylesheets are missing, added an error message 2020-05-09 13:33:41 +02:00
Twan van Laarhoven 968b8eabca Add "Save as directory" 2020-05-09 13:26:33 +02:00
Twan van Laarhoven 8b25815f72 Re-enabled intrusive_ptr 2020-05-07 22:25:02 +02:00
Twan van Laarhoven e005d47d56 Use std::enable_shared_from_this instead of thisP parameters. 2020-05-06 22:59:10 +02:00
Twan van Laarhoven b4435e5e57 Themed checkboxes
Slightly larger items in (multiple) choice viewers
2020-05-06 02:47:02 +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 7ef0b885bb Allow "field:query" in the quick filter bar 2020-04-27 13:16:56 +02:00
Twan van Laarhoven 1a39b85b73 (fix comment) 2020-04-27 01:21:18 +02:00
Twan van Laarhoven 26dd6e570b Fix reading of word lists 2020-04-26 23:43:04 +02:00
Twan van Laarhoven af7e8c9d39 Switch (back) to our own Color type instead of using wxColour.
The reason is that wxColour's default constructor creates an invalid color (what is that even?). It is nicer to just have default be transparent.
2020-04-26 21:41:35 +02:00
Twan van Laarhoven 2e897edbbf Use toSomeType() instead of operator SomeType in ScriptValue.
This means that we are more explicit about type conversions.
Also use override specifiers for overriden virtual functions in ScriptValue.
2020-04-26 17:03:43 +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 4bebd48786 Moved tab_index to Style (instead of Field), it makes more sense there, since it pertains to the layout of stuff on the card.
Also don't precalculate list of fields sorted by tab order, just find the next/previous ones on the fly.
2020-04-26 02:16:39 +02:00
Twan van Laarhoven 54a3cbfde3 Replace include guards by #pragma once 2020-04-26 01:25:16 +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 5e92d9455c Code cleanup: remove messy spaces before line continuation (\) in macros 2020-04-26 00:37:13 +02:00
Twan van Laarhoven 5d4c3402df Added fancy mouseover effect to field borders.
This might be slow, if this becomes a problem I could add a setting to disable it.
2020-04-25 23:59:56 +02:00
Twan van Laarhoven 37c8641641 Replace scoped_ptr by unique_ptr 2020-04-25 22:28:32 +02:00
Twan van Laarhoven b7ed93cd02 Remove dependency on boost::random, since that is now in std 2020-04-25 22:22:15 +02:00
Twan van Laarhoven 787a707900 Use std::shuffle instead of std::random_shuffle, since the latter is removed in C++17 2020-04-25 22:20:51 +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 4258ce1c6c Remove AColor class, because wxColour now supports alpha values. 2020-04-25 22:20:50 +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 3f8f9bef1a (typo) 2020-04-21 01:11:28 +02:00
Twan van Laarhoven e8e7e10fa0 Make extension optional in --export command.
Added add_extension function
Added ExportTemplate::byName
Use ExportTemplate::byName in main
2020-04-21 00:23:42 +02:00