mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-03-22 15:05:03 +01:00
remove legacy background loading
This commit is contained in:
14
uilayer.cpp
14
uilayer.cpp
@@ -129,20 +129,6 @@ bool ui_layer::mouse_button_callback(int button, int action, int mods)
|
||||
return m_imguiio->WantCaptureMouse;
|
||||
}
|
||||
|
||||
void ui_layer::load_random_background()
|
||||
{
|
||||
std::vector<std::string> images;
|
||||
for (auto &f : std::filesystem::directory_iterator("textures/logo"))
|
||||
if (f.is_regular_file())
|
||||
images.emplace_back(std::filesystem::relative(f.path(), "textures/").string());
|
||||
|
||||
if (!images.empty())
|
||||
{
|
||||
std::string &selected = images[std::lround(LocalRandom(images.size() - 1))];
|
||||
set_background(selected);
|
||||
}
|
||||
}
|
||||
|
||||
static ImVec4 imvec_lerp(const ImVec4 &a, const ImVec4 &b, float t)
|
||||
{
|
||||
return ImVec4(a.x + (b.x - a.x) * t, a.y + (b.y - a.y) * t, a.z + (b.z - a.z) * t, a.w + (b.w - a.w) * t);
|
||||
|
||||
Reference in New Issue
Block a user