-
Notifications
You must be signed in to change notification settings - Fork 13
July22
- Designer
- FlyString
- Keyboard
- Menu
- Mouse
- Overview
- Scripts
- String
- TextEditor
- TextInput
- Window
- WindowContainer

Here is a list of updates made during the month of July. Much of the progress this month has been made on the Designer app and controls that are associated with it. More tests have been added to increase coverage. Build scripts have also been provided. This allows for a quick way of building the project and a consistent process across machines and developers.
Some improvements have been made to the Designer App.
The designer by default now places a live preview panel next to the TextEditor control. The Json is compiled as the text is modified and if it is valid, will update the preview panel to reflect the given Json. This panel can be hidden and a separate window can be created to provide the preview if desired.

A new 'Font' menu option has been added. The menu contains a TextInput control that allows the font size of the document to be set.

A new string type has been introduced called FlyString. This type of string will store its hash and data into a global table and can be referenced if another FlyString object has the same hash. This lowers the amount of memory used when using the same strings over a series of frames. The Profiler system makes use of FlyStrings to store event names.
Left/Right Alt keys have been added and supported in all frontends.
Menus now support adding any kind of controls. An example of this can be seen in the Designer app. The 'Font' menu has a TextInput control where the font size can be set.
Double-click and Triple-click support has been added. The TextInput control takes advantage of this to select the hovered word with double-click and the hovered line with triple-click.
Initial support for different mouse cursors has been implemented. Current cursors supported are Arrow, IBeam, SizeWE, and SizeNS. More will be added in the future.
The Overview application has seen a few changes. The layout of some controls have changed to try and fit more per row. A ListBox example has also been added.
A Scripts folder has been introduced that provides shell scripts and batch files on building the library and apps. These scripts allow arguments to be given to alter how the library is built. The 'help' argument provides information on all possible arguments and a description for each. The initial set of arguments are provided below:
- release - Sets the configuration to Release. The default is Debug.
- tools - Compiles with tools enabled. This can be compiled in any configuration.
- ninja - Use the ninja build system instead of the default (make or msbuild). The path to the ninja build system must be added to the PATH environment variable.
- clean - Cleans the intermediate files before generating and building. This forces a full rebuild of the project.
- noapps - Only compiles the library.
- sfml - Builds the apps using the SFML library. The SFML_DIR variable must be set for the generator to locate the library.
- sdl2 - Builds the app using the SDL library. The SDL2 cmake and library paths must be locatable by the generator through either the environment variables or the SDL2_DIR and SDL2_MODULE_PATH variables.
- help - Displays this help message.
On Windows, a VCVars.bat file is called which will load Visual Studio tools into the current environment. This will attempt to load Visual Studio 2019 first, then 2017. More versions of Visual Studio will be added in the future.
A new String class has been introduced. Currently, this operates as a container for utility functions that operate on standard library string. This could be expanded in the future to replace the standard library string containers.
Below is a list of enhancements made to this control.
The TextEditor control will now auto-match the ending character based on the input. The current characters that are supported are the quote characters (', "), brackets, braces, and parenthesis ('[', '{', '('). If the matched character already exists, the editor will move the cursor but not add the additional character to the buffer.

Enhancements have been made to this control. The control now supports navigating the line by skipping words. The key modifier used is platform specific. On Mac it is the 'Option' key while Linux/Windows uses the 'Ctrl' key.

An initial implementation of a syntax highlighting interface has been introduced. The 'Highlighter' class is the base class for defining how a text span should be highlighted. A utility 'Lexer' class is available for lexing the span and looking for tokens to apply highlighters to. JsonHighlighter is the first built-in highlighter that the library provides which will highlight keys and string values differently.

TextInput controls that are singe-line input can have the 'Enter' key invoke the 'OnConfirm' callback function.
A new 'NumbersOnly' property has been introduced that restricts the input to only accept valid numbers. The valid characters are the digits '0-9', the '-' character and a '.' character.
The control now supports selecting the hovered word with mouse double-click and the hovered line with mouse triple-click.

Some enhancements have been made to the window system.
The Window will now detect when the mouse has left/entered the window. Any hovered control will be notified if the mouse has left.
New 'Resizable' property has been added to specify if a window can be resized. All windowing systems support this flag.
This new container has been introduced. This holds all the required containers needed for a Window, such as an optional MenuBar and the Body.
More test suites have been added to increase coverage of the testing framework. Below is a list of new test suites introduced:
- ListBox
- MenuBar
- Text
- TextInput