Skip to content

March22

mdavisprog edited this page Mar 30, 2022 · 2 revisions

March 2022

Here are a list of updates made during the month of March.

Theme

The Theme object has been improved to allow defining the properties through Json. The Overview application now supports the current dark theme as well as a classic theme. The classic theme resembles old Windows OS GUI interface such as Windows 95. In order to do this, various controls now have a 3D option to mirror the look of these classic controls.

The Overview application can switch between these two themes from the menu bar under 'Themes'.

ComboBox

A ComboBox control has been introduced.

Disable buttons

Buttons can now be disabled through the 'Disabled' flag or the 'SetDisabled' API function call.

Text

Text controls now support newline characters. The text will properly split and move to the next line when a newline character is detected.

There is also support for rendering text with various colors through a format API. Currently, there is no way to specify this through the Json stream, but will be supported in the future. This feature is mainly used for the TextInput selection logic.

A font and font size can also be specified through the Json per text control. This is done throught the 'Font' and 'FontSize' property respectively.

TextInput

TextInput controls now have the ability for multiline editing. The basic functions are available such as cursor movement, adding/deleting characters, and selection. When the text exceeds the bounds of the control, scrollbars are displayed and can be moved to show a portion of the text.

To enable, add a 'Multiline' property and set it to true. This will make the control larger for more editable area.

A 'ReadOnly' property has been introduced. This will allow for text to be set, but not modifiable. The ComboBox control makes use of this feature.

Unit Tests

A unit test framework has been introduced. Unit tests are made up of test suites with each suite having a number of test cases. This is built as an app and can be found under the Apps/Tests folder in the repository. Running the executable will run all test suites. The name of a test suite can be given to only run that single test suite.

Below are the current test suites implemented, with more to come in the future.

  • Button
  • CheckBox
  • Container
  • Json
  • Variant

TextureCache

A TextureCache object has been introduced to manage loading any textures used for Image controls.

Font

The Font system has been slightly improved. It now uses the more optimized stb_rect_pack features, but still needs more work to fully make use of this. Fonts being loaded will now attempt to load in the smallest possible size, but it is inefficient at the moment.

Json

The Json object has been improved to hold all data types inside of a union. This includes a boolean, float, string , array, and an object map. The parser is still very basic and not error tolerant, so malformed Json strings may cause a crash. It is planned to fix this in the future so that it will return a proper error if the parser runs into an issue.

Variant

The Variant object has been improved to hold data types that are commonly used throughout the system. It has support for reading data from a Json object. The Theme object holds variants for each theme property so that it can be overridden within each individual control.

Interface

SFML

The SFML interface was previously clipping by rendering to a separate texture that was converted to a sprite, then clipped and drawn. This has been changed to make use of the sf::View class to propertly clip contents. On Linux, this isn't ideal and will be moving over to an OpenGL implementation in the future.

Clone this wiki locally