修复链式调用
This commit is contained in:
@@ -23,23 +23,27 @@ int main(int argc, char* argv[]) {
|
||||
const auto& text_block2 = std::make_shared<mtext_block>();
|
||||
text_block2->set_text(U"Hello, World!");
|
||||
|
||||
const auto button = std::make_shared<mbutton>();
|
||||
button->set_content(text_block);
|
||||
const auto button = mnew(mbutton)
|
||||
mslot(mbutton)
|
||||
[
|
||||
text_block
|
||||
];
|
||||
|
||||
const auto button2 = std::make_shared<mbutton>();
|
||||
button2->set_content(text_block2);
|
||||
const auto button2 = mnew(mbutton)
|
||||
mslot(mbutton)
|
||||
[
|
||||
text_block2
|
||||
];
|
||||
|
||||
const auto& window = mwindow::create({ 800, 600 }, L"Hello, World!");
|
||||
window->set_content(
|
||||
mnew(mh_box)
|
||||
mslot(mh_box)
|
||||
[
|
||||
button
|
||||
]
|
||||
mslot(mh_box)
|
||||
[
|
||||
button2
|
||||
]
|
||||
mnew(mborder)
|
||||
mslot(mborder)
|
||||
.h_alignment(horizontal_alignment_t::center)
|
||||
.v_alignment(vertical_alignment_t::center)
|
||||
[
|
||||
button
|
||||
]
|
||||
);
|
||||
|
||||
mirage_app::get().run();
|
||||
|
||||
Reference in New Issue
Block a user