Comments (13)
Lol i didnt thought about that... and thats right, it works right now! thanks you!
from avo.
You inspired me to make one gui system myself!!! thanks you!
from avo.
That sounds weird, could you post a minimal example?
from avo.
Sure
from avo.
And this happens too, it disappears when its outside of some kind of container...
from avo.
I would suspect that the problem here is that you are not thinking about the coordinates as relative to the parent of the view. For example, if I write:
auto container = new AvoGUI::View(this);
container->setTopLeft(100);
container->setSize(300);
auto child = new AvoGUI::View(container);
Now child is positioned at (100, 100) relative to the GUI, because the default top-left coordinates are (0, 0).
from avo.
I would love to learn to use this library because its beautiful! you should do tutorials about this api, i think that people will like it
from avo.
I've thought about making some tutorial about it, thanks for the motivation! Will do when I have time.
from avo.
Or create a full documentation on it... will be amazin would be
from avo.
Yes, might make some kind of website with documentation when the API is final enough, still making some big changes sometimes...
Did you understand what the problem was with your positioning? When you write getBottom() or getCenterY(), those coordinates are absolute and not relative to the parent of the view you're positioning. Also remember that child views are clipped by their parent, so if a child is outside of its parent, it's invisible. Also you might consider removing the container view completely and directly attach the text field to the GUI.
from avo.
Nice!
What you would write to center a view within a container would be:
auto container = new View(this);
container->setSize(400, 300); // whatever
auto child = new View(container);
child->setCenter(container->getSize()/2.f);
// Now, if we move the container:
container->move(100, 200);
// The child will still be in the center of the container!
from avo.
Man, i admire you... wou wrote 26000 fucking c++ lines of code... its impressive, how much time did you spent in this project?
from avo.
Haha, it took a long time. The motivation has always been strong though, I made it because I was frustrated that there was no library that fit my "needs". When I first started programming, I made games with SFML. Then I started to make fun little JavaScript projects which I put on my website. I always wished I could make anything in c++, including those types of projects. I searched a lot for libraries but the best I could find was like Qt, which is GIANT and it's not fully open source. I wanted a clean library with a logical API that gives a lot of freedom and can be used to make graphical programs as good looking as what you can make with html, css and javascript. I also wanted the framework to hold for making large applications.
I'm still working towards that goal, mainly by just making stuff with it and thinking about how it could be designed differently to work more smoothly, etc.
from avo.
Related Issues (5)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from avo.