Merge branch 'main' into res-directories
This commit is contained in:
commit
be416ad9e7
@ -52,7 +52,9 @@ shared_ptr<UINode> create_main_menu_panel(Engine* engine) {
|
||||
|
||||
Panel* worldsPanel = new Panel(vec2(390, 200), vec4(5.0f));
|
||||
worldsPanel->color(vec4(0.1f));
|
||||
for (auto const& entry : directory_iterator(enginefs::get_worlds_folder())) {
|
||||
path worldsFolder = enginefs::get_worlds_folder();
|
||||
if (std::filesystem::is_directory(worldsFolder)) {
|
||||
for (auto const& entry : directory_iterator(worldsFolder)) {
|
||||
string name = entry.path().filename().string();
|
||||
Button* button = new Button(util::str2wstr_utf8(name),
|
||||
vec4(10.0f, 8.0f, 10.0f, 8.0f));
|
||||
@ -67,6 +69,7 @@ shared_ptr<UINode> create_main_menu_panel(Engine* engine) {
|
||||
});
|
||||
worldsPanel->add(button);
|
||||
}
|
||||
}
|
||||
panel->add(worldsPanel);
|
||||
|
||||
panel->add((new Button(L"Settings", vec4(10.f)))->listenAction([=](GUI* gui) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user