Fixes for the new path_view
This commit is contained in:
+1
-1
@@ -29,7 +29,7 @@ enum class Placement : uint8_t
|
|||||||
};
|
};
|
||||||
using PlacementSet = tl::flag_set<Placement>;
|
using PlacementSet = tl::flag_set<Placement>;
|
||||||
|
|
||||||
void init(tl::lent_ref<kit::EngineManager> engineManager, tl::lent_ref<fs::IFilesystem> filesystem, fs::AbsPath folderPath);
|
void init(tl::lent_ref<kit::EngineManager> engineManager, tl::lent_ref<fs::IFilesystem> filesystem, fs::AbsPathView folderPath);
|
||||||
void shutdown();
|
void shutdown();
|
||||||
|
|
||||||
struct Icon
|
struct Icon
|
||||||
|
|||||||
@@ -1316,7 +1316,7 @@ namespace ImSpinner
|
|||||||
ImVec2 p1 = ImVec2(centre.x + ImSin(0) * radius, centre.y + ImCos(0) * radius);
|
ImVec2 p1 = ImVec2(centre.x + ImSin(0) * radius, centre.y + ImCos(0) * radius);
|
||||||
ImVec2 p2 = ImVec2(centre.x + ImSin(PI_DIV(3) * 2) * radius, centre.y + ImCos(PI_DIV(3) * 2) * radius);
|
ImVec2 p2 = ImVec2(centre.x + ImSin(PI_DIV(3) * 2) * radius, centre.y + ImCos(PI_DIV(3) * 2) * radius);
|
||||||
ImVec2 p3 = ImVec2(centre.x + ImSin(PI_DIV(3) * 4) * radius, centre.y + ImCos(PI_DIV(3) * 4) * radius);
|
ImVec2 p3 = ImVec2(centre.x + ImSin(PI_DIV(3) * 4) * radius, centre.y + ImCos(PI_DIV(3) * 4) * radius);
|
||||||
std::vector<ImVec2> subdividedPoints = splitTriangle(p1, p2, p3, (float)dim);
|
std::vector<ImVec2> subdividedPoints = splitTriangle(p1, p2, p3, dim);
|
||||||
for (size_t i = 0; i < subdividedPoints.size(); i+=3) {
|
for (size_t i = 0; i < subdividedPoints.size(); i+=3) {
|
||||||
ImVec2 trisCenter = hsumPoints(hsumPoints(subdividedPoints[i], subdividedPoints[i + 1]), subdividedPoints[i + 2]);
|
ImVec2 trisCenter = hsumPoints(hsumPoints(subdividedPoints[i], subdividedPoints[i + 1]), subdividedPoints[i + 2]);
|
||||||
const float angle = calculateAngle(p1, trisCenter, centre);
|
const float angle = calculateAngle(p1, trisCenter, centre);
|
||||||
@@ -1492,8 +1492,8 @@ namespace ImSpinner
|
|||||||
c.Value.w = ImMax(0.05f, c.Value.w);
|
c.Value.w = ImMax(0.05f, c.Value.w);
|
||||||
}
|
}
|
||||||
|
|
||||||
draw_segment(arc_num, 0.f, c, 1.f + arc_num * 0.3f, arc_num > 0 ? -1.f : 1.f);
|
draw_segment((int)arc_num, 0.f, c, 1.f + arc_num * 0.3f, arc_num > 0 ? -1.f : 1.f);
|
||||||
draw_segment(arc_num, IM_PI, c, 1.f + arc_num * 0.3f, arc_num > 0 ? -1.f : 1.f);
|
draw_segment((int)arc_num, IM_PI, c, 1.f + arc_num * 0.3f, arc_num > 0 ? -1.f : 1.f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2071,7 +2071,7 @@ namespace ImSpinner
|
|||||||
{
|
{
|
||||||
SPINNER_HEADER(pos, size, centre, num_segments);
|
SPINNER_HEADER(pos, size, centre, num_segments);
|
||||||
|
|
||||||
const float start = ImFmod(ImGui::GetTime() * speed, IM_PI * 2);
|
const float start = ImFmod(ImGui::GetTime() * speed, IM_PI * 2.f);
|
||||||
const int half_segments = num_segments / 2;
|
const int half_segments = num_segments / 2;
|
||||||
|
|
||||||
for (int i = 0; i < arcs; ++i) {
|
for (int i = 0; i < arcs; ++i) {
|
||||||
|
|||||||
+1
-1
@@ -43,7 +43,7 @@ struct TextureData
|
|||||||
tl::vector<TextureData> s_textures;
|
tl::vector<TextureData> s_textures;
|
||||||
tl::unordered_map<tl::string, Icon> s_icons;
|
tl::unordered_map<tl::string, Icon> s_icons;
|
||||||
|
|
||||||
void init(tl::lent_ref<kit::EngineManager> engineManager, tl::lent_ref<fs::IFilesystem> filesystem, fs::AbsPath folderPath)
|
void init(tl::lent_ref<kit::EngineManager> engineManager, tl::lent_ref<fs::IFilesystem> filesystem, fs::AbsPathView folderPath)
|
||||||
{
|
{
|
||||||
s_engineManager = std::move(engineManager);
|
s_engineManager = std::move(engineManager);
|
||||||
s_filesystem = std::move(filesystem);
|
s_filesystem = std::move(filesystem);
|
||||||
|
|||||||
Reference in New Issue
Block a user