Commit Graph

1752 Commits

Author SHA1 Message Date
Twan van Laarhoven 26dd6e570b Fix reading of word lists 2020-04-26 23:43:04 +02:00
Twan van Laarhoven 0f2e7ac3fe Fix uxtheme stuff on windows 2020-04-26 22:30:00 +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 8698144ac4 Warn about parse errors in colors 2020-04-26 17:40:22 +02:00
Twan van Laarhoven c324c8bbbb to_code now adds quotes around strings.
to_code for map now includes keys.
This maans that the basic script-functions test passes.
2020-04-26 17:35:14 +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 42b7cf52b8 Don't write keys in canonical_name_form 2020-04-26 15:42:01 +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 7d06e903a4 Rename script function rotate -> rotate_image 2020-04-25 23:46:30 +02:00
Twan van Laarhoven bce298e2f0 Update changelog 2020-04-25 23:38:13 +02:00
Twan van Laarhoven b5f18ebec7 Take version number from Cmake file. This way the number is only in one place 2020-04-25 23:36:00 +02:00
Twan van Laarhoven 190d9c8ffa Clean up: remove unused code template stuff 2020-04-25 23:02:26 +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 0d42df1537 Fix type conversion errors in GCC/wxGTK 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 815df01ba5 Don't throw internal errors when built_in_image script function fails to find an image 2020-04-25 22:20:50 +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 1fe145864e Merge pull request #1 from fenhl/patch-1
Clarify build instructions
2020-04-25 20:50:55 +02:00
Fenhl 0cd0ac6737 Clarify build instructions
This adds some missing `vcpkg` commands I had to run to get the build to work, and adds info about what `$VCPATH` means.
2020-04-25 00:54:18 +00:00
Twan van Laarhoven 0ca2c70310 Add keyboard navigation and history to console panel. 2020-04-23 22:02:13 +02:00
Twan van Laarhoven 257c82ed90 Tweak spacing on keywords panel 2020-04-23 21:20:40 +02:00
Twan van Laarhoven 3e8dd98b45 Ignore .bak files 2020-04-23 20:23:19 +02:00
Twan van Laarhoven 8f8e2cea65 Expose the 'warning' function, and added a similar 'error' function.
Add documentation.
2020-04-23 20:22:43 +02:00
Twan van Laarhoven e9456eea86 Fix: refresh list also when changes are made to item 0 2020-04-23 19:59:47 +02:00
Twan van Laarhoven bad896898f Don't throw Char* 2020-04-23 19:56:46 +02:00
Twan van Laarhoven a585fc40cc Remove some useless "typedef wxX X" 2020-04-22 23:58:01 +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 be4bb8d8ed Warning fix 2020-04-21 21:52:05 +02:00
Twan van Laarhoven a6cd6c2dd0 Spelling of canonical 2020-04-21 21:48:47 +02:00
Twan van Laarhoven 25345b86bd Fix: use radians instead of degrees 2020-04-21 21:42:44 +02:00
Twan van Laarhoven 39f504ad90 Sstrip special characters from set name before showing save file dialog 2020-04-21 01:13:11 +02:00
Twan van Laarhoven 3f8f9bef1a (typo) 2020-04-21 01:11:28 +02:00
Twan van Laarhoven 294c12b180 Remove space below tab bar, it has repaint issues and wastes space 2020-04-21 01:04:58 +02:00
Twan van Laarhoven 3c381a5de2 Slightly fancier dotted pen on wxMSW 2020-04-21 00:46:12 +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
Twan van Laarhoven 59d59e97fd fixed: write_image_file failed with --export with relative path, because the is-relative-to-target-dir check was wrong 2020-04-21 00:13:23 +02:00
Twan van Laarhoven e72909f430 Remember contents of filter control when switching tabs 2020-04-21 00:10:17 +02:00
Twan van Laarhoven 4889f0b7e8 Renamed --export to --export-image
Added new --export command line argument for exporting using a scripted/html export template.
2020-04-21 00:01:59 +02:00
Twan van Laarhoven 21e13c60c8 Fix: win32 cli wrapper: restore original console attributes 2020-04-20 23:27:00 +02:00
Twan van Laarhoven 52cb4284f1 Clean up command line argument handling a bit 2020-04-20 23:21:32 +02:00
Twan van Laarhoven b8c5a312e6 Move print_pending_errors to text_io_handler 2020-04-20 23:04:38 +02:00