Fix reached macOS UI primitives and audio fade behavior
This commit is contained in:
@@ -91,14 +91,17 @@ Array Metin2PythonHost::ui_render_commands() {
|
||||
Array out;
|
||||
for (const auto &command : UIRenderCommands()) {
|
||||
Dictionary item;
|
||||
item["kind"] = command.kind == UIRenderCommand::Bar ? "bar" :
|
||||
item["kind"] = command.kind == UIRenderCommand::GradientBar ? "gradient_bar" :
|
||||
(command.kind == UIRenderCommand::Bar ? "bar" :
|
||||
(command.kind == UIRenderCommand::Line ? "line" :
|
||||
(command.kind == UIRenderCommand::Image ? "image" : "text"));
|
||||
(command.kind == UIRenderCommand::Image ? "image" : "text")));
|
||||
item["x1"] = command.x1;
|
||||
item["y1"] = command.y1;
|
||||
item["x2"] = command.x2;
|
||||
item["y2"] = command.y2;
|
||||
item["argb"] = static_cast<int64_t>(command.argb);
|
||||
if (command.kind == UIRenderCommand::GradientBar)
|
||||
item["end_argb"] = static_cast<int64_t>(command.end_argb);
|
||||
item["clip_x1"] = command.clip_x1;
|
||||
item["clip_y1"] = command.clip_y1;
|
||||
item["clip_x2"] = command.clip_x2;
|
||||
@@ -259,6 +262,9 @@ Array Metin2PythonHost::audio_commands() {
|
||||
case AudioCommand::FadeOutAllMusic: item["type"] = "fade_out_all_music"; break;
|
||||
case AudioCommand::SetSoundVolume: item["type"] = "set_sound_volume"; break;
|
||||
case AudioCommand::SetMusicVolume: item["type"] = "set_music_volume"; break;
|
||||
case AudioCommand::FadeInMusic: item["type"] = "fade_in_music"; break;
|
||||
case AudioCommand::FadeLimitOutMusic: item["type"] = "fade_limit_out_music"; break;
|
||||
case AudioCommand::SetSoundVolume3D: item["type"] = "set_sound_volume_3d"; break;
|
||||
default: continue;
|
||||
}
|
||||
item["filename"] = String::utf8(cmd.filename.c_str());
|
||||
|
||||
Reference in New Issue
Block a user