Skip to content

Commit

Permalink
changelog, calendar now reference type, form fix.
Browse files Browse the repository at this point in the history
* Fix form issue introduced in #68 that caused enter to not click default button in a text field.

* The calendar object is now registered as a reference type for backward compatibility, this resulted in the angelscript_refcounted_duplicating_method template to be added.

* Though it may still be updated a bit, finally composed the changelog in preparation for the next release!
  • Loading branch information
samtupy committed Oct 5, 2024
1 parent 9a221d4 commit 6cf8640
Show file tree
Hide file tree
Showing 7 changed files with 128 additions and 11 deletions.
91 changes: 91 additions & 0 deletions doc/src/appendix/Changelog.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,97 @@
# Changelog
This document lists all major changes that have taken place in NVGT since we started keeping track.

## New in 0.89.0-alpha (unreleased):
* The calendar object is now registered as a reference type with Angelscript meaning it now supports handles, for BGT backwards compatibility. The other datetime classes are still value types.
* Added bool sdl_set_hint(const string&in hint, const string&in value, sdl_hint_priority priority = SDL_HINT_NORMAL) and string sdl_get_hint() functions, allowing the user to customize over 200 different SDL options from screen orientation to the video backend used and many more.
* Adds atomic types, or in other words more concurrency primatives.
* The array class can now work with negative indicies to access elements starting at the end of arrays, For example `array[1]` now returns the last element in the array.
* Registered SYSTEM_PERFORMANCE_COUNTER and SYSTEM_PERFORMANCE_FREQUENCY properties as well as nanosleep and nanoticks functions, still needs documentation.
* ini.nvgt include is now free of bgt_compat! Added quick test for it.
* Fixed a bug in instance.nvgt include regarding automatic mutex name generation.
* The compiler now includes a status window that continues getting updated with messages reporting what is currently happening during compilation.
* Adds refresh_window() function.
* Adds input_forms.nvgt include with functions to quicly retrieve information using an audio form, test/example in test/interact/test_input_forms.nvgt.
* Introduce new menu system based on audio form, in menu.nvgt. As a result, the old dynamic menu has been renamed to bgt_dynamic_menu.nvgt to make it clear what one is legacy.
* Registered some new vector functions such as cross, length2, distance and distance2 etc.
* datastream.available is now an uint64 rather than int.
* The ghost settings object in bgt_compat.nvgt was removed, as a new settings.nvgt include was contributed to the project! While the new settings object does not currently support the windows registry, this is made up for by several useful features such as encryption, data format selection, default values and more. You can read the top of settings.nvgt for a full list of changes. The new settings.nvgt script is `#included` by default in bgt_compat to avoid any compatibility issues.
* Though this effort is still somewhat on going, most parameters of NVGT's builtin functions and methods have been properly named. Not only does this mean that passing named arguments works, but it is also a small step closer to a VSCode or similar plugin.
* screen_reader_output/speak now have their interrupt booleans set to true by default.
* Though a more advanced (multi-selection / non-blocking) API for this will be added in the future, simple open_file_dialog, save_file_dialog, and select_folder_dialog functions have now been added.
* There are now 2 new functions which have yet to be documented, bool simulate_key_down(uint key) and bool simulate_key_up(uint key). These directly post SDL keydown/up events to the event queue.
* Any key_up events with matching keycodes as any key_down event in the same frame will now be moved to the next frame. This previously only happened with a few specialized events (namely voice over arrow keys and windows clipboard history), but now this is done in all sanarios meaning that the Mac touch bar and other on screen or touch based keyboards should now function properly.
* adds is_console_available function.
* Fixed a serious bug in pack::add_memory that caused adding large files to usually fail.
* Adds the `string generate_custom_token(int token_length, string characters);` function to token_gen.nvgt include.
* Add virtual_dialogs.nvgt include.
* Add datastream.sync_rw_cursors property (true by default).
* tts_dump_config and tts_load_config in speech.nvgt include can now save screen reader usage settting.
* ADDED ANDROID PLATFORM SUPPORT, NVGT RUNS ON MOBILE! This includes gesture detection (touch.nvgt include or query_touch_device function), screen reader speech through Android's accessibility event API, and android TextToSpeech engine support through the tts_voice class! The support is still young and there are many improvements still to be made (only the default tts voice can be used right now for example), but even running small nvgt scripts from source is possible at this point with NVGT's Android runner application, and one-click APK bundling is possible!
* NVGT now has a bundling facility! It can create .apk packages for android (assuming the needed android tools are available), it can create MacOS app bundles on all platforms though only a .dmg on Mac (.app.zip on other platforms), and it can copy Windows/Linux libraries into place as well as bundle your asset files like sounds, readme and changelog all to create a fully distributable package in one click! It can even run custom prebuild and postbuild shell commands encase the bundling facility isn't quite doing enough for your needs. More information is in the compiling for distribution document. This means as an aside that NVGT's compiler application is significantly larger, as it must include the MacOS and Linux libraries on windows, the Windows and Linux libraries on Mac etc for the purposes of creating a fully functional app bundle no matter what platform it is compiled on.
* The compile script submenu has changed, it now contains options to compile for all platforms you have stubs for!
* Trying to embed a pack that doesn't exist no longer makes NVGTW.exe silently exit.
* Added the is_window_hidden function.
* NVGT's UI application now has a launcher dialog instead of informing the user that no input file was provided. You can run scripts, compile scripts including platform selection, or do a few other things such as viewing the command line arguments/version information.
* The directory_delete function now includes a recursive boolean argument.
* Upgrades NVGT to SDL3!
* Switched to UniversalSpeech static, no more Tolk.dll required for screen reader output!
* form.nvgt modifications:
* The `form::is_disallowed_char` method will now always return true if the character is not allowed. This also automatically checks whether the control index is being used as either blacklist or whitelist, the `use_only_disallowed_characters` parameter.
* Pasting text will now fail if the clipboard contains disallowed characters.
* Fixes a bug regarding the go to line dialog and the column being set 1 character to the left from where it should be.
* Adds the ability to create custom control type labels.
* Added Link control type.
* If you alt tab to the application from another program while in an audio form, it reannounces the current focus control.
* Added Floating points support in sliders and Fixed home/end bug with sliders.
* Adds set_list_properties method.
* Added word deletion.
* You can now serialize the `audioform_keyboard_echo` property.
* Once an input field is popped out, You can use the F2 key to change between echo modes. The changed echo mode will be spoken out loud, as well as updating the `audioform_keyboard_echo` property.
* The `reset` method now takes a new parameter, true by default, which resets the form's echo mode to default. This is useful to retrieve the value of the `audioform_keyboard_echo` property.
* The go to line functionality can now be used on non multiline input fields as well. In non multiline fields, the line number field will be invisible.
* Added a new method that allows you to toggle the go to line functionality. `bool set_enable_go_to_index(int control_index, bool enabled);`
* sound_pool.nvgt modifications:
* Added a new parameter in `update_listener_3d` function called `refresh_y_is_elevation` (bool) which toggles whether the sound pool should refresh the global `sound_pool_default_y_is_elevation` property. This makes it possible to constantly change the global property for the sound elevation.
* token_gen.nvgt can now generate different token types, see the `token_gen_flag` enum.
* Add string::is_whitespace method.
* Fix small memory leak in pathfinder due to not releasing callback data reference on path calculation failure.
* Add SCRIPT_BUILD_TIME property.
* Fixes missing const qualifier in mixer::set_fx which was causing random memory corruption on some systems and in some situations.
* Slightly improves include path resolution when running nvgt scripts on Macos.
* Speed improvements to find_files and find_directories especially on windows.
* Datastreams can now be implicitly created from strings.
* Add var::opCmp method.
* Documentation:
* Updates compiling for distribution tutorial to talk about bundling facility.
* Talk about Angelscript addons and delayed dll loading in plugin creation tutorial.
* Documents TIMEZONE_* properties and refresh_window() function, update wait.nvgt to indicate that it calls refresh_window().
* Document settings.nvgt include.
* Document the number_speaker.nvgt include.
* Partially document timestamp class, still needs operators and maybe a couple other things.
* Completely documented thread_event class as well as concurrency enums.
* update datetime property examples to say "set thing" instead of "current thing," document julian_day property.
* Documents timestamp_from_UTC_time function.
* Documents thread_current_id and thread_yield.
* documents sound_global_pack property.
* Various minor polishing for a few functions in data manipulation, audio, and user interface.
* documented set_application_name, focus_window, is_window_hidden, and get_window_text. Also removed joystick_count from the documentation as it was an old SDL2 function.
* Update pack documentation to note a confusion with get_file_offset vs. offset parameter as well as fixing inconsistent parameter name in read_file.
* Added many more docs for the pack object, documented file_copy function.
* Updates toolkit configuration tutorial to include all new options.
* Added a note in the introduction topic that indicates the incomplete state of the docs.
* Update contributors.
* Array: `insert_at`, `remove_at`, most other methods with their examples.
* dictionary, almost everything accept the indexing operator.
* Environment global properties: `PLATFORM`, `PLATFORM_DISPLAY_NAME`, `PLATFORM_VERSION`, `system_node_name`, and `system_node_id`.
* file datastream, including write method in the datastream documentation.
* Token Gen documentation updated, including its enum constants.
* Adds a not yet complete memory management tutorial.
* Todo updated.
* Fixed return type of network::connect and resolve syntax error in tts_voice constructor reference, other various syntax and formatting.
* Audio game development tutorial has been slightly updated.
* audio_form documentation is now mostly complete.

## New in 0.88.0-beta (07/01/2024):
* several improvements to the audio form:
* fix the go to line dialog, it had broken a few versions ago when converting the form to no longer need bgt_compat.
Expand Down
1 change: 1 addition & 0 deletions doc/src/manual/-BGT Upgrading+.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@ our goal is to make the transition as seamless as possible from BGT to NVGT, but
* When splitting a string, matching against \r\n is advised as BGT handles this differently. This will result in not having spurious line breaks at the ends of split text.
* The settings object no longer writes to the registry, but instead has been replaced by the settings.nvgt include which wraps the previous settings object API, but instead writes to configuration files in various formats.
* The joystick object is a ghost object and does not currently function.
* The dynamic_menu.bgt include is now called bgt_dynamic_menu.nvgt. This is because NVGT now includes it's own menu class called menu.nvgt.
* There is a type called `var` in the engine now, so you may need to be careful if your project contains any variables named var.
* It's worth noting that unlike BGT, NVGT by default attempts to fully package your game for you including sounds, libraries, documents and any other assets into a .zip file or similar on other platforms intended for distrobution. If you don't like this behavior, you can create a file next to nvgt.exe called config.properties and add the line build.windows_bundle = 0 which will cause NVGT to just produce a standalone executable like BGT did, though you now may need to copy some libraries from the lib folder for the compiled product to run.
2 changes: 1 addition & 1 deletion release/include/form.nvgt
Original file line number Diff line number Diff line change
Expand Up @@ -669,7 +669,7 @@ class audio_form {
if (subform)
return 2;
}
if ((focused < 0 || c_form[focused].type != ct_keyboard_area) && (focused < 0 || ((c_form[focused].multiline_enter && c_form[focused].multiline && c_form[focused].type == ct_input || c_form[focused].type == ct_button) && (key_up(KEY_LCTRL)) && (key_up(KEY_RCTRL)) && (key_up(KEY_LSHIFT)) && (key_up(KEY_RSHIFT)))) && ((key_pressed(KEY_RETURN)) || (key_pressed(KEY_NUMPAD_ENTER)) || (autotab == 3))) {
if ((focused < 0 || c_form[focused].type != ct_keyboard_area) && (focused < 0 || ((!c_form[focused].multiline_enter || !c_form[focused].multiline) && c_form[focused].type == ct_input || c_form[focused].type == ct_button) && key_up(KEY_LCTRL) && key_up(KEY_RCTRL) && key_up(KEY_LSHIFT) && key_up(KEY_RSHIFT)) && (key_pressed(KEY_RETURN) || key_pressed(KEY_NUMPAD_ENTER) || (autotab == 3))) {
stop_speech();
if ((defaults == -1) && (focused > -1)) {
if (c_form[focused].type == ct_button || c_form[focused].type == ct_link)
Expand Down
2 changes: 2 additions & 0 deletions src/pocostuff.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,5 +100,7 @@ template <class T> inline void angelscript_refcounted_register(asIScriptEngine*

// This is a template constructor that generally stops one from needing to create factory functions for each object that uses this angelscript_refcounted mechanism.
template <class T, typename... A> T* angelscript_refcounted_factory(A... args) { return new (angelscript_refcounted_create<T>()) T(args...); }
// And similarly, a common trait of value typed objects is returning new versions of themselves, so handle functions that do that here too.
template <class T, auto F, typename... A> T* angelscript_refcounted_duplicating_method(T* obj, A... args) { return new (angelscript_refcounted_create<T>()) T((obj->*F)(args...)); }

void RegisterPocostuff(asIScriptEngine* engine);
Loading

0 comments on commit 6cf8640

Please sign in to comment.