Go Summarize

Make Beautiful Desktop Applications in C++

The Cherno2023-07-21
thecherno#thechernoproject#cherno#c++#programming#gamedev#game development#learn c++#c++ tutorial#game engine#how to make a game engine#Make Beautiful Desktop Applications in C++#walnut#hazel#custom titlebar#custom frame#win32#glfw#imgui#dear imgui
414K views|1 years ago
💫 Short Summary

The video showcases the creation of a desktop application framework called Walnut in C++, highlighting features like custom title bars and hardware rendering with Vulcan. It demonstrates the customization of title bars in applications, introduces Walnut chat, and discusses merging updates to the master branch. The video also covers resizing windows in user interfaces, embedding images in code, and customizing user interfaces in applications. Walnut offers flexibility for tailored app workflows and enhanced user experience, with plans for easier code injection. Viewers are encouraged to explore Walnut's benefits for app development.

✨ Highlights
📊 Transcript
✦
Creation of Walnut desktop application framework in C++ for UI apps.
00:00
Walnut aims to provide a clean and lightweight platform without relying on Hazel as a dependency.
Utilizes hardware rendering with Vulcan for graphics compatibility, especially for GPU-rendered applications.
Speaker enjoys working on Walnut, adding features based on user requests, and open-sourcing code from Hazel.
Notable feature includes custom title bars, a highly requested addition since Walnut's early stages.
✦
Customization of title bars in applications is discussed, with examples from Visual Studio and Unreal Engine.
02:43
The ability to control every pixel rendered in the client area using I'm gooey is explained.
Custom title bars can expand over the title bar and decorate windows, as shown in the Hazel application.
Setting a custom title bar is described as simple, requiring only a specific parameter.
The video promises to demonstrate creating an application with a custom title bar using Walnut.
✦
Creating a custom title bar using I'm GUI and introducing Walnut chat application.
04:56
Walnut chat utilizes the custom title bar created using I'm GUI on Windows.
Sponsored by Nordpass Business, a password manager for securing sensitive information in businesses.
Nordpass Business allows secure storage and sharing of passwords and sensitive data within a company.
Walnut can be acquired from the GitHub repository, with new features in the dev branch for further development.
✦
Updates to the master branch are merged to emphasize stability and superiority of the current version.
08:08
A Walnut app template is available for setting up external Walnut apps.
Optional Walnut networking module is mentioned, with future Linux support hinted at.
A Walnut example application is demonstrated, showcasing features like an about dialog box and custom title bar.
The process of setting up and running the application in Visual Studio is highlighted, with excitement about seeing the application functionality in action.
✦
Customizing title bars in Windows with custom logos and resizing options.
09:35
Explanation of using Zoom It for zooming in on pixels and aligning elements in Photoshop.
Discussion on the usefulness of Zoom It for drawing on the screen and adjusting pixel placement.
Brief overview of the Walnut application.
Mention of accessing the source code for implementation details.
✦
Implementation of headless and GUI applications in Walnut chat system.
12:05
Running the server using Walnut on Linux in a terminal without GUI components like glfw or Vulcan.
Cleaning up the code, especially resource storage and handling in the application class.
Details on custom title bar implementation using glfw and modifications to the Fork of JFW are discussed.
Viewers are encouraged to explore the code differences for a better understanding.
✦
Implementation of a custom title bar in a Win32 window application.
14:31
The segment explains handling messaging functions and window events, detailing event types and custom frame event handling.
Resizing the client area by adjusting border thickness is discussed.
Challenges such as handling top borders differently and encountering issues with Windows 10 drawing additional native title bars are mentioned.
Insights into customizing window appearance and event handling in Win32 applications are provided.
✦
Resizing windows in a user interface involves understanding the client area, title bar, and borders.
18:16
Implementing a custom callback function is crucial for determining the location of the mouse cursor for resizing.
Basic logic and math help identify specific areas like corners and diagonals for accurate resizing.
Failure to detect cursor location properly can lead to the inability to resize windows in certain directions.
✦
Importance of understanding title bar hit test for window movement functionality.
19:28
Implementing hit test functionality using system features is recommended over building from scratch.
Callbacks like test gel FW set Title play a key role in setting window positions.
Drawing functions like UI draw title bar handle visual elements.
Debug boundaries and drawing title bar bounds help visualize draggable areas.
✦
Embedding images in code to avoid external files using a Python script to generate C++ code.
23:45
Images are represented as compressed PNGs in byte arrays, decoded and unloaded in the code.
The process of exporting images from Photoshop is highlighted, along with the benefits of shipping without external files.
Debugging techniques for drawing components like minimize, maximize, restore, and close buttons are demonstrated.
✦
Customizing user interfaces in applications using Walnut code.
24:58
Users can modify buttons, change their location, color, and style, making the interface more intuitive and appealing.
Walnut allows full control over button placement and design, tailoring app workflows to user preferences.
Plans to create user-friendly callbacks for easier code injection are in progress.
Walnut has the potential to enhance user experience and workflow efficiency in app development.