Fix reached macOS UI primitives and audio fade behavior
This commit is contained in:
@@ -71,9 +71,13 @@ auto CScreen::RenderLine2d(float sx, float sy, float ex, float ey, float) -> voi
|
||||
UIRenderAdd({UIRenderCommand::Line, sx, sy, ex, ey, ms_diffuseColor});
|
||||
}
|
||||
|
||||
auto CScreen::RenderBox2d(float, float, float, float, float) -> void
|
||||
auto CScreen::RenderBox2d(float sx, float sy, float ex, float ey, float) -> void
|
||||
{
|
||||
MT_PLATFORM_STUB();
|
||||
// 40250's four line pairs, including its one-pixel extension of the bottom edge.
|
||||
UIRenderAdd({UIRenderCommand::Line, sx, sy, ex, sy, ms_diffuseColor});
|
||||
UIRenderAdd({UIRenderCommand::Line, sx, sy, sx, ey, ms_diffuseColor});
|
||||
UIRenderAdd({UIRenderCommand::Line, ex, sy, ex, ey, ms_diffuseColor});
|
||||
UIRenderAdd({UIRenderCommand::Line, sx, ey, ex + 1.0f, ey, ms_diffuseColor});
|
||||
}
|
||||
|
||||
auto CScreen::RenderBar2d(float sx, float sy, float ex, float ey, float) -> void
|
||||
@@ -81,9 +85,13 @@ auto CScreen::RenderBar2d(float sx, float sy, float ex, float ey, float) -> void
|
||||
UIRenderAdd({UIRenderCommand::Bar, sx, sy, ex, ey, ms_diffuseColor});
|
||||
}
|
||||
|
||||
auto CScreen::RenderGradationBar2d(float, float, float, float, DWORD, DWORD, float) -> void
|
||||
auto CScreen::RenderGradationBar2d(float sx, float sy, float ex, float ey, DWORD start, DWORD end, float) -> void
|
||||
{
|
||||
MT_PLATFORM_STUB();
|
||||
if (sx == ex || sy == ey)
|
||||
return;
|
||||
UIRenderCommand command{UIRenderCommand::GradientBar, sx, sy, ex, ey, start};
|
||||
command.end_argb = end;
|
||||
UIRenderAdd(std::move(command));
|
||||
}
|
||||
|
||||
auto CScreen::RenderCircle2d(float, float, float, float, int) -> void
|
||||
|
||||
@@ -7,9 +7,10 @@
|
||||
// Commands emitted by the 40250 UI drawing calls, consumed by Godot's CanvasItem.
|
||||
// The port layer stays independent of godot-cpp.
|
||||
struct UIRenderCommand {
|
||||
enum Kind { Bar, Line, Text, Image } kind;
|
||||
enum Kind { Bar, Line, Text, Image, GradientBar } kind;
|
||||
float x1, y1, x2, y2;
|
||||
std::uint32_t argb;
|
||||
std::uint32_t end_argb = 0; // GradientBar only: colour on the bottom edge.
|
||||
float clip_x1 = 0, clip_y1 = 0, clip_x2 = 0, clip_y2 = 0;
|
||||
std::string text;
|
||||
// Image only: text is the texture's file, drawn as the quad (vertices 0..3 = TL, TR, BL, BR)
|
||||
|
||||
Reference in New Issue
Block a user