Use CiByteString for anything path-related.

This commit is contained in:
Ottermandias 2024-07-30 18:53:55 +02:00
parent 9d128a4d83
commit d247f83e1d
42 changed files with 163 additions and 124 deletions

View file

@ -50,7 +50,7 @@ internal sealed class ResourceWatcherTable : Table<Record>
=> DrawByteString(item.Path, 280 * UiHelpers.Scale);
}
private static unsafe void DrawByteString(ByteString path, float length)
private static unsafe void DrawByteString(CiByteString path, float length)
{
Vector2 vec;
ImGuiNative.igCalcTextSize(&vec, path.Path, path.Path + path.Length, 0, 0);
@ -61,7 +61,7 @@ internal sealed class ResourceWatcherTable : Table<Record>
else
{
var fileName = path.LastIndexOf((byte)'/');
ByteString shortPath;
CiByteString shortPath;
if (fileName != -1)
{
using var style = ImRaii.PushStyle(ImGuiStyleVar.ItemSpacing, new Vector2(2 * UiHelpers.Scale));