Skip to content

Commit

Permalink
feat: add return button label to launch arguments section in `GameSet…
Browse files Browse the repository at this point in the history
…tingsView`
  • Loading branch information
vapidinfinity committed Nov 2, 2024
1 parent 2607ad0 commit fef25f9
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion Mythic/Views/Unified/Sheets/GameSettingsView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,25 @@ private extension GameSettingsView {
}

Spacer()
TextField("", text: $typingArgument)

TextField("", text: Binding(
get: { typingArgument },
set: { newValue in
withAnimation{
typingArgument = newValue
}
}
))
.onSubmit(submitLaunchArgument)

if !typingArgument.isEmpty {
Button {
submitLaunchArgument()
} label: {
Image(systemName: "return")
}
.buttonStyle(.plain)
}
}
}

Expand Down

0 comments on commit fef25f9

Please sign in to comment.