mirror of
https://github.com/cyberarm/w3d_hub_linux_launcher.git
synced 2025-12-16 09:12:35 +00:00
Use new marquee style of progress bar for unpacking/patching since we don't have progress feedback
This commit is contained in:
@@ -260,7 +260,7 @@ class W3DHub
|
|||||||
operation = @status.operations[:"#{pkg.checksum}"]
|
operation = @status.operations[:"#{pkg.checksum}"]
|
||||||
|
|
||||||
if verify_package(pkg)
|
if verify_package(pkg)
|
||||||
operation.value = "Verified."
|
operation.value = "Verified"
|
||||||
operation.progress = 1.0
|
operation.progress = 1.0
|
||||||
else
|
else
|
||||||
@packages_to_download << pkg
|
@packages_to_download << pkg
|
||||||
@@ -333,12 +333,14 @@ class W3DHub
|
|||||||
|
|
||||||
status = if package.custom_is_patch
|
status = if package.custom_is_patch
|
||||||
@status.operations[:"#{package.checksum}"].value = "Patching..."
|
@status.operations[:"#{package.checksum}"].value = "Patching..."
|
||||||
|
@status.operations[:"#{package.checksum}"].progress = Float::INFINITY
|
||||||
@status.progress = i.to_f / packages.count
|
@status.progress = i.to_f / packages.count
|
||||||
update_interface_task_status
|
update_interface_task_status
|
||||||
|
|
||||||
apply_patch(package, path)
|
apply_patch(package, path)
|
||||||
else
|
else
|
||||||
@status.operations[:"#{package.checksum}"].value = "Unpacking..."
|
@status.operations[:"#{package.checksum}"].value = "Unpacking..."
|
||||||
|
@status.operations[:"#{package.checksum}"].progress = Float::INFINITY
|
||||||
@status.progress = i.to_f / packages.count
|
@status.progress = i.to_f / packages.count
|
||||||
update_interface_task_status
|
update_interface_task_status
|
||||||
|
|
||||||
@@ -348,7 +350,7 @@ class W3DHub
|
|||||||
repair_windows_case_insensitive(package, path)
|
repair_windows_case_insensitive(package, path)
|
||||||
|
|
||||||
if status
|
if status
|
||||||
@status.operations[:"#{package.checksum}"].value = "Unpacked"
|
@status.operations[:"#{package.checksum}"].value = package.custom_is_patch ? "Patched" : "Unpacked"
|
||||||
@status.operations[:"#{package.checksum}"].progress = 1.0
|
@status.operations[:"#{package.checksum}"].progress = 1.0
|
||||||
|
|
||||||
update_interface_task_status
|
update_interface_task_status
|
||||||
|
|||||||
@@ -217,7 +217,15 @@ class W3DHub
|
|||||||
|
|
||||||
name_.value = operation.label if operation.label
|
name_.value = operation.label if operation.label
|
||||||
status_.value = operation.value if operation.value
|
status_.value = operation.value if operation.value
|
||||||
progress_.value = operation.progress.clamp(0.0, 1.0) if operation.progress
|
|
||||||
|
if operation.progress
|
||||||
|
if operation.progress == Float::INFINITY
|
||||||
|
progress_.type = :marquee unless progress_.type == :marquee
|
||||||
|
else
|
||||||
|
progress_.type = :linear unless progress_.type == :linear
|
||||||
|
progress_.value = operation.progress.clamp(0.0, 1.0)
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user