hittest和修复布局系统

This commit is contained in:
2025-03-22 14:47:57 +08:00
parent c4000c11a5
commit 403c48dac8
34 changed files with 2000 additions and 554 deletions

View File

@@ -3,7 +3,7 @@
//
#include "mirage.h"
#include "core/window/render_window.h"
#include "core/window/mwindow.h"
#include "widget/compound_widget/mbutton.h"
#include "widget/panel_widget/mbox.h"
@@ -11,12 +11,13 @@ int main(int argc, char* argv[]) {
mirage_app app;
app.init();
auto window = std::make_shared<mirage_window>();
auto window = std::make_shared<mwindow>();
window->create_window(800, 600, L"Hello, World!");
window->show();
mirage_app::get_render_context()->setup_surface(window.get());
auto border = std::make_shared<mborder>();
auto h_box = std::make_shared<mh_box>();
auto v_box = std::make_shared<mv_box>();
v_box->add_slot()
@@ -62,6 +63,7 @@ int main(int argc, char* argv[]) {
[
v_box
];
h_box->add_slot()
.stretch()
.margin({ 5 })