Ducktape on libui for native file open dialogs

This commit is contained in:
2024-03-11 13:45:10 -05:00
parent c1ca3ec80e
commit 02307f1789
4 changed files with 19 additions and 21 deletions

View File

@@ -26,7 +26,7 @@ class W3DHub
flow(width: 1.0, fill: true) do
@game_path = edit_line "", fill: true, height: 1.0
button "Browse...", width: 128, height: 1.0, enabled: W3DHub.unix?, tip: W3DHub.unix? ? "Browse for game executable" : "Not available on Windows" do
button "Browse...", width: 128, height: 1.0, tip: "Browse for game executable" do
path = W3DHub.ask_file
@game_path.value = path if !path.empty? && File.exist?(path)
end