I made my own UI library in C++, How to design a complicated system?

preview_player
Показать описание
Join my Discord:

Wishlist Midnight Arrow on Steam:

Join this channel if you want to support me 😻:

Check out Pika Engine, where Sushi is also at the moment:

Music: Evan King - Virtually Impossible
Music: Evan King - Booty Shake Robot
Music: Evan King - Spicy Boom
Рекомендации по теме
Комментарии
Автор

I, too want me to learn this stuff but it just passes through me like radio waves.

HalfAsleepSam
Автор

I learned C++ in uni but I really hate build tools(eg CMake) in C++ ecosystem and that's the main reason I never got into creating projects with C++

plabankumarmondal
Автор

My solution for submenus is statemachine. Represent each state with a number. Or routine of each layout is abstracted into function and those functions used as a state.

AgnisNeZvers
Автор

Your code is interesting. I used to code in similar fashion while working at my first job. Now I kinda lean more into Clean Code approach. Both have their own pros and cons. I also started digging into CMake lately. It's not this hard actually, I might get grasp of it. I made once my GUI but it was very newbie approach. I want to take on this task soon and see how much I improved, adding layers of abstraction and making more scalable, easier to read and work with approach. I respect work you did and knowledge, passion and skills you are sharing with others. Definitely one of those types who like to write my own tools and use them. I think it's common between C++ programmers.

Do you unit test what you write? Also, you made a lot of projects but do you plan on making something bigger, have your own purpose or you just enjoy process of making stuff and prototyping?

anonimowelwiatko
Автор

Yo i hope u make a video about a grouping system or layer system for a game engine. Btw this video is amazing yo

thatnerd
Автор

As someone with experience in UI programming (I wrote a desktop UI app from scratch), I think this video has several misconceptions and is a disservice to the community. Don't get me wrong, if you want to write your own UI library, go ahead and do it, but it's another thing when you don't report accurately why you're doing it and leading others to error.
(1) in web development, visual editors are used all the time, not by the front-end developers, but by the UX designers. Although you can define everything in code, it's usually too tedious to do so, and there's pretty much no way you can compete with a skilled designer using visual tools just by writing code. For desktop apps, there are a lot of RAD tools where you can design the UI yourself and just by inheriting from the generated class you can do everything, and it's orders of magnitude faster.
(2) the fact that UI libraries are event driven/use callbacks has nothing at all to do with visual editors. Even if you write everything using code, you still need to understand them. That's because every modern UI library (and by modern I mean after Windows 95 and the Unix OSes in the 80's) uses a display server as a backend, and only this display server knows when a user has performed some action.
(3) what distinguishes immediate mode UI libraries from retained ones is not that it has a declarative hierarchy for its elements (every UI library has this). Immediate mode UI allows you greater control over the rendering process, while retained ones keep everything separate. That's why you use Dear ImGUI for games, where you want to overlay the UI on top of a scene, whereas if you use a retained library like Qt or wxWidgets, they don't have that functionality, the best they can do is give you a canvas where you can draw stuff using OpenGL or equivalent.
(4) you did not even mention how every UI library solves the layout responsiveness problem. they have the concept of sizers, which can take a variable amount of space depending on the screen size, solving exactly the issues you explained in the video.
Like I said, it's OK to write your own UI library, but if you do so, make sure to study beforehand what's already been done so that you actually code something useful...

felipelopes
Автор

Very nice work!
Question: how do you implement scrolling inside a gui window? is it just a view matrix?
I use OpenGL

PaulMetalhero
Автор

Wait, you can use CSS for a game engine's UI!? I mean, I've heard of Unity CSS, but never considered CSS was an option for me. Would be amazing!!!

Hopefully I can find a tutorial, and if not, hopefully Phind can help me.

rmt
Автор

I'm inspired and also wanna create my own C++ game engine

BasPower
Автор

Just finding my way into the gui space to create a small text-based adventure game, this is a very good introduction!

CheeseOfMasters
Автор

Damn, its like 4 minutes, but my brain is overheated already.

unethicql
Автор

New subscriber more video tutorials about WinApi thank you

EnLopXf
Автор

is this ui library meant for in game UI or debug/editor UI?

oh-facts
Автор

Will you make any game engine or ui library in Zig

ulrich-tonmoy
Автор

You don't like callbacks either!! Yessss thank you!! 🤔🤔🤔🤔🤔🤔
What you can do for creating animated UI, is use shaders for transitions and smooth animations, as of course you don't have any animator with keyframes and that would take forever and be useless to make for an individual project.

astrahcat
Автор

The HTML code is just layout, that could easily be made in a visual tool, so no, I don't think you can draw the conclusion that a visual tool is worse from that.

edhahaz
Автор

What someone needs to do is to create a GPU accelerated GUI library that accepts CSS styling for all the elements.

bloodaid
Автор

There aren't more gui libraries than there are engines. The reason there are "many" is because there are many languages and platforms. You also showed bootstrap, bootstrap is a component library not a gui library.

madeso
Автор

Oh fuck that ting notification sound. You made me deaf🤬🤬

korigamik