크리에이터 채널

- 룰렛 설정 메뉴 추가
This commit is contained in:
Yu Sung
2024-10-03 01:15:26 +09:00
parent 6d7e3a40e7
commit 2f734c22ec
4 changed files with 203 additions and 182 deletions

View File

@@ -13,6 +13,8 @@ struct RouletteSettingsView: View {
@StateObject var viewModel = RouletteSettingsViewModel()
@Binding var isShowing: Bool
let availableActive: Bool
let onComplete: (Bool, String) -> Void
var body: some View {
@@ -61,21 +63,23 @@ struct RouletteSettingsView: View {
}
.padding(.top, 26.7)
HStack(spacing: 0) {
Text("룰렛을 활성화 하시겠습니까?")
.font(.custom(Font.bold.rawValue, size: 16))
.foregroundColor(Color.grayee)
Spacer()
Image(viewModel.isActive ? "btn_toggle_on_big" : "btn_toggle_off_big")
.resizable()
.frame(width: 44, height: 27)
.onTapGesture {
viewModel.isActive.toggle()
}
if availableActive {
HStack(spacing: 0) {
Text("룰렛을 활성화 하시겠습니까?")
.font(.custom(Font.bold.rawValue, size: 16))
.foregroundColor(Color.grayee)
Spacer()
Image(viewModel.isActive ? "btn_toggle_on_big" : "btn_toggle_off_big")
.resizable()
.frame(width: 44, height: 27)
.onTapGesture {
viewModel.isActive.toggle()
}
}
.padding(.top, 26.7)
}
.padding(.top, 26.7)
VStack(alignment: .leading, spacing: 13.3) {
Text("룰렛 금액 설정")
@@ -238,6 +242,6 @@ struct RouletteSettingsView: View {
struct RouletteSettingsView_Previews: PreviewProvider {
static var previews: some View {
RouletteSettingsView(isShowing: .constant(true)) { _, _ in }
RouletteSettingsView(isShowing: .constant(true), availableActive: true) { _, _ in }
}
}