cvui 1.1.0 is out!

I am pleased to inform that version 1.1.0 of cvui is out! cvui is a simple UI lib built on top of OpenCV drawing primitives. Here is an image to show the new features:

cvui

This release is backward compatible, so users of the lib should be able to upgrade by just dropping the new files into their projects. There ara few bug fixes as well as some pretty cool new features.

One of the most annoying tasks when building UI is to calculate where each component should be placed on the screen. Version 1.1.0 brings a set of methods that abstract the process of positioning components, so you don’t have to think about assigning a X and Y coordinate. Instead you just add components and cvui will place them as you go.

An example is the beginRow() function to start a group of elements. After beginRow() has been called, all subsequent component calls don’t have to specify the frame where the component should be rendered nor its position. The position of the component will be automatically calculated by cvui based on the components within the group.

All components are placed side by side, from left to right. E.g.

beginRow(frame, x, y, width, height);

text("test");
button("btn");

endRow();

Rows and columns can be nested, so you can create columns/rows within columns/rows as much as you want:

beginRow(frame, x, y, width, height);

text("test");
button("btn");

beginColumn();
text("column1");
text("column2");
endColumn();

endRow();

I am pretty happy with the new API and the possibilities it brings, specially because it means less code to achieve more things. That’s always a thing to celebrate =)