Skip to content
mdavisprog edited this page Jun 27, 2022 · 1 revision

June 2022

Here is a list of updates made during the month of June. Most of the progress this month was made in the system and library side with a few updates made to the controls.

Application

The initialization order has been updated to help support windowing and rendering interfaces which require at least one window to be created (e.g. SDL2+OpenGL).

Assertion

A custom 'Assert' function has been added to the library. This will help with better error messaging when an assertion occurs as it allows for custom messages to be printed with the assert.

Button

Buttons now support rounded corners. This is handled by a 'Radius' property which can either be a single number or an array of 4 numbers to denote the top left, top right, bottom left, and bottom right. This works for both flat and 3D styles.

CMake

The build system has been updated to now remove any direct paths to Frontend dependencies. Previously, either the SFML or SDL2 paths were specified in the build but have now been removed in favor of passing in these paths as arguments.

The system has also been updated to allow specifying which windowing and rendering libraries to use. More information can be found in the (Frontend)[#Frontend] section.

Combo Box

A 'SetSelected' API function has been introduced to allow setting what is displayed in the Input box. Useful for when no selection has been made and the control needs some text to be set.

An example of how this control can be used has been re-added to the Overview application.

Designer

A new application called 'Designer' has been introduced. This app is used to help visualize what a window may look like through a given Json string. The goal is to provide an editor that provides a live update as changes are made to a Json file. The editor will also provide errors whenever the Json is invalid.

Frontend

The Frontend interface has been rewritten to split the responsibilities of the windowing and rendering. This allows mixing and matching different windowing layers with a rendering layer.

Windowing

The Windowing interface handles the logic of the window in which the rendering occurs. This includes window creation, destruction, event handling, etc. To set which windowing interface to use, pass the '-DWINDOWING={}' argument to CMake. The interface currently supports the following systems:

  • SDL2 (All)
  • SFML (Linux, Windows)

The default on Windows is SFML and SDL2 is the default on Linux and Mac.

Rendering

The Rendering interface handles the painting of the GUI. Typically, this interface updates any GPU buffers with the new generated vertices if the interface takes advantage of hardware acceleration. To set which rendering interface to use, pass the '-DRENDERING={}' argument to CMake. The interface currently supports the following systems:

  • Metal (Mac)
  • OpenGL3+ (Linux, Windows)
  • SFML (Linux, Windows)

The default on Windows is SFML, SDL2 on Linux, and Mac only supports Metal.

Json

The Json library has been improved to be more error tolerant. The library now provides an error message whenever an error occurs while parsing. The line number and column number is also reported to aid in debugging.

Margin Container

This container is now set to not expand on both axis by default.

OpenGL

OpenGL 3+ is now supported on Windows and Linux.

Scrollable Container

A new 'ScrollIntoView' function has been added to ensure the desired control is visible if not within the viewable bounds.

TextEditor

The TextEditor control is a new control that inherits from TextInput. This control will handle more advanced features such as syntax highlighting, line coloring, auto-complete, etc. The Designer currently makes use of this control to highlight the line on which there was a Json parsing error.

Window

The internal logic of how invalidated controls are handled have been changed. Previously, raw pointers were used to store pending controls that needed to have their layouts updated. Controls will now pass a shared_ptr object instead. This allows the owning window to store these pending controls as weak_ptr objects. This helps in memory safety and preventing crashes when operating on invalid pointers.

Unit Tests

The following test suites have been added or updated.

  • Json
  • Radio Button
  • Scrollable Containers

Clone this wiki locally