File selector bottom edit action bar is in safe area

This commit is contained in:
Yousef Khadadeh 2026-04-27 16:48:44 +03:00
parent 56cd0c920f
commit cfe250979a
9 changed files with 145 additions and 116 deletions

View file

@ -2,9 +2,7 @@
#include <SDL3/SDL_time.h>
#include <SDL3/SDL_timer.h>
#include <chrono>
#include <fstream>
#include <algorithm>
#include <iostream>
#include <SDL3/SDL_filesystem.h>
#include <regex>
#include <SDL3/SDL_iostream.h>
@ -162,3 +160,14 @@ std::string sdl_time_to_nice_access_time(const SDL_DateTime& t, SDL_DateFormat d
}
return "";
}
std::vector<std::string> glob_path_as_string_list(const std::filesystem::path& folder, const char* globStr, SDL_GlobFlags globFlags, const std::function<std::string(const std::filesystem::path)>& pathToStr) {
int globCount;
char** filesInPath = SDL_GlobDirectory(folder.c_str(), globStr, globFlags, &globCount);
if(!filesInPath)
throw std::runtime_error("[glob_path_as_string_list] SDL_GlobDirectory failed");
std::vector<std::string> toRet(globCount);
for(int i = 0; i < globCount; i++)
toRet[i] = pathToStr(std::filesystem::path(filesInPath[i]));
return toRet;
}

View file

@ -1,8 +1,10 @@
#pragma once
#include <SDL3/SDL_filesystem.h>
#include <string>
#include <vector>
#include <cstdint>
#include <filesystem>
#include <functional>
#include <SDL3/SDL_time.h>
std::vector<std::string> split_string_by_token(std::string str, std::string token);
@ -15,3 +17,4 @@ bool is_valid_http_url(const std::string& str);
std::string remove_carriage_returns_from_str(std::string s);
std::string ensure_string_unique(const std::vector<std::string>& stringList, std::string str);
std::string sdl_time_to_nice_access_time(const SDL_DateTime& t, SDL_DateFormat dF, SDL_TimeFormat tF);
std::vector<std::string> glob_path_as_string_list(const std::filesystem::path& folder, const char* globStr, SDL_GlobFlags globFlags, const std::function<std::string(const std::filesystem::path)>& pathToStr);