|
|
|
@@ -26,7 +26,7 @@ func _ready():
|
|
|
|
# Load card atlas if exists
|
|
|
|
# Load card atlas if exists
|
|
|
|
if FileAccess.file_exists("res://src/assets/card_atlas.png"):
|
|
|
|
if FileAccess.file_exists("res://src/assets/card_atlas.png"):
|
|
|
|
card_atlas = load("res://src/assets/card_atlas.png")
|
|
|
|
card_atlas = load("res://src/assets/card_atlas.png")
|
|
|
|
|
|
|
|
|
|
|
|
setup_ui()
|
|
|
|
setup_ui()
|
|
|
|
|
|
|
|
|
|
|
|
func setup_ui():
|
|
|
|
func setup_ui():
|
|
|
|
@@ -34,64 +34,64 @@ func setup_ui():
|
|
|
|
var main_vbox = VBoxContainer.new()
|
|
|
|
var main_vbox = VBoxContainer.new()
|
|
|
|
add_child(main_vbox)
|
|
|
|
add_child(main_vbox)
|
|
|
|
main_vbox.set_anchors_and_offsets_preset(Control.PRESET_FULL_RECT)
|
|
|
|
main_vbox.set_anchors_and_offsets_preset(Control.PRESET_FULL_RECT)
|
|
|
|
|
|
|
|
|
|
|
|
# Game state info
|
|
|
|
# Game state info
|
|
|
|
game_state_label = Label.new()
|
|
|
|
game_state_label = Label.new()
|
|
|
|
game_state_label.text = "Spiel wird geladen..."
|
|
|
|
game_state_label.text = "Spiel wird geladen..."
|
|
|
|
game_state_label.horizontal_alignment = HORIZONTAL_ALIGNMENT_CENTER
|
|
|
|
game_state_label.horizontal_alignment = HORIZONTAL_ALIGNMENT_CENTER
|
|
|
|
main_vbox.add_child(game_state_label)
|
|
|
|
main_vbox.add_child(game_state_label)
|
|
|
|
|
|
|
|
|
|
|
|
# Top area (Opponent + Jokers)
|
|
|
|
# Top area (Opponent + Jokers)
|
|
|
|
var top_hbox = HBoxContainer.new()
|
|
|
|
var top_hbox = HBoxContainer.new()
|
|
|
|
main_vbox.add_child(top_hbox)
|
|
|
|
main_vbox.add_child(top_hbox)
|
|
|
|
|
|
|
|
|
|
|
|
setup_opponent_area(top_hbox)
|
|
|
|
setup_opponent_area(top_hbox)
|
|
|
|
setup_joker_area(top_hbox)
|
|
|
|
setup_joker_area(top_hbox)
|
|
|
|
|
|
|
|
|
|
|
|
# Middle area (Table + Trump)
|
|
|
|
# Middle area (Table + Trump)
|
|
|
|
var middle_hbox = HBoxContainer.new()
|
|
|
|
var middle_hbox = HBoxContainer.new()
|
|
|
|
main_vbox.add_child(middle_hbox)
|
|
|
|
main_vbox.add_child(middle_hbox)
|
|
|
|
|
|
|
|
|
|
|
|
setup_table_area(middle_hbox)
|
|
|
|
setup_table_area(middle_hbox)
|
|
|
|
setup_trump_area(middle_hbox)
|
|
|
|
setup_trump_area(middle_hbox)
|
|
|
|
|
|
|
|
|
|
|
|
# Action buttons
|
|
|
|
# Action buttons
|
|
|
|
action_buttons = HBoxContainer.new()
|
|
|
|
action_buttons = HBoxContainer.new()
|
|
|
|
action_buttons.alignment = BoxContainer.ALIGNMENT_CENTER
|
|
|
|
action_buttons.alignment = BoxContainer.ALIGNMENT_CENTER
|
|
|
|
main_vbox.add_child(action_buttons)
|
|
|
|
main_vbox.add_child(action_buttons)
|
|
|
|
|
|
|
|
|
|
|
|
setup_action_buttons()
|
|
|
|
setup_action_buttons()
|
|
|
|
|
|
|
|
|
|
|
|
# Bottom area (Player hand + Controls)
|
|
|
|
# Bottom area (Player hand + Controls)
|
|
|
|
var bottom_vbox = VBoxContainer.new()
|
|
|
|
var bottom_vbox = VBoxContainer.new()
|
|
|
|
main_vbox.add_child(bottom_vbox)
|
|
|
|
main_vbox.add_child(bottom_vbox)
|
|
|
|
|
|
|
|
|
|
|
|
setup_controls(bottom_vbox)
|
|
|
|
setup_controls(bottom_vbox)
|
|
|
|
setup_player_area(bottom_vbox)
|
|
|
|
setup_player_area(bottom_vbox)
|
|
|
|
|
|
|
|
|
|
|
|
func setup_opponent_area(parent):
|
|
|
|
func setup_opponent_area(parent):
|
|
|
|
var area = VBoxContainer.new()
|
|
|
|
var area = VBoxContainer.new()
|
|
|
|
parent.add_child(area)
|
|
|
|
parent.add_child(area)
|
|
|
|
|
|
|
|
|
|
|
|
var label = Label.new()
|
|
|
|
var label = Label.new()
|
|
|
|
label.text = "Gegner"
|
|
|
|
label.text = "Gegner"
|
|
|
|
area.add_child(label)
|
|
|
|
area.add_child(label)
|
|
|
|
|
|
|
|
|
|
|
|
opponent_hand_container = HBoxContainer.new()
|
|
|
|
opponent_hand_container = HBoxContainer.new()
|
|
|
|
area.add_child(opponent_hand_container)
|
|
|
|
area.add_child(opponent_hand_container)
|
|
|
|
|
|
|
|
|
|
|
|
func setup_joker_area(parent):
|
|
|
|
func setup_joker_area(parent):
|
|
|
|
var area = VBoxContainer.new()
|
|
|
|
var area = VBoxContainer.new()
|
|
|
|
parent.add_child(area)
|
|
|
|
parent.add_child(area)
|
|
|
|
|
|
|
|
|
|
|
|
var label = Label.new()
|
|
|
|
var label = Label.new()
|
|
|
|
label.text = "Joker (0/3)"
|
|
|
|
label.text = "Joker (0/3)"
|
|
|
|
label.name = "JokerLabel"
|
|
|
|
label.name = "JokerLabel"
|
|
|
|
area.add_child(label)
|
|
|
|
area.add_child(label)
|
|
|
|
|
|
|
|
|
|
|
|
joker_slots_container = HBoxContainer.new()
|
|
|
|
joker_slots_container = HBoxContainer.new()
|
|
|
|
area.add_child(joker_slots_container)
|
|
|
|
area.add_child(joker_slots_container)
|
|
|
|
|
|
|
|
|
|
|
|
# Create 3 joker slots
|
|
|
|
# Create 3 joker slots
|
|
|
|
for i in range(3):
|
|
|
|
for i in range(3):
|
|
|
|
var slot = create_joker_slot()
|
|
|
|
var slot = create_joker_slot()
|
|
|
|
@@ -100,12 +100,12 @@ func setup_joker_area(parent):
|
|
|
|
func setup_table_area(parent):
|
|
|
|
func setup_table_area(parent):
|
|
|
|
var table_container = VBoxContainer.new()
|
|
|
|
var table_container = VBoxContainer.new()
|
|
|
|
parent.add_child(table_container)
|
|
|
|
parent.add_child(table_container)
|
|
|
|
|
|
|
|
|
|
|
|
var label = Label.new()
|
|
|
|
var label = Label.new()
|
|
|
|
label.text = "Spielfeld"
|
|
|
|
label.text = "Spielfeld"
|
|
|
|
label.horizontal_alignment = HORIZONTAL_ALIGNMENT_CENTER
|
|
|
|
label.horizontal_alignment = HORIZONTAL_ALIGNMENT_CENTER
|
|
|
|
table_container.add_child(label)
|
|
|
|
table_container.add_child(label)
|
|
|
|
|
|
|
|
|
|
|
|
table_area = GridContainer.new()
|
|
|
|
table_area = GridContainer.new()
|
|
|
|
table_area.columns = 4 # Angriff/Verteidigung Paare
|
|
|
|
table_area.columns = 4 # Angriff/Verteidigung Paare
|
|
|
|
table_container.add_child(table_area)
|
|
|
|
table_container.add_child(table_area)
|
|
|
|
@@ -113,18 +113,18 @@ func setup_table_area(parent):
|
|
|
|
func setup_trump_area(parent):
|
|
|
|
func setup_trump_area(parent):
|
|
|
|
var area = VBoxContainer.new()
|
|
|
|
var area = VBoxContainer.new()
|
|
|
|
parent.add_child(area)
|
|
|
|
parent.add_child(area)
|
|
|
|
|
|
|
|
|
|
|
|
var label = Label.new()
|
|
|
|
var label = Label.new()
|
|
|
|
label.text = "Trump"
|
|
|
|
label.text = "Trump"
|
|
|
|
area.add_child(label)
|
|
|
|
area.add_child(label)
|
|
|
|
|
|
|
|
|
|
|
|
trump_display = create_card_back()
|
|
|
|
trump_display = create_card_back()
|
|
|
|
area.add_child(trump_display)
|
|
|
|
area.add_child(trump_display)
|
|
|
|
|
|
|
|
|
|
|
|
var deck_label = Label.new()
|
|
|
|
var deck_label = Label.new()
|
|
|
|
deck_label.text = "Deck"
|
|
|
|
deck_label.text = "Deck"
|
|
|
|
area.add_child(deck_label)
|
|
|
|
area.add_child(deck_label)
|
|
|
|
|
|
|
|
|
|
|
|
deck_display = create_card_back()
|
|
|
|
deck_display = create_card_back()
|
|
|
|
area.add_child(deck_display)
|
|
|
|
area.add_child(deck_display)
|
|
|
|
|
|
|
|
|
|
|
|
@@ -133,23 +133,23 @@ func setup_action_buttons():
|
|
|
|
defend_btn.text = "Verteidigung beenden"
|
|
|
|
defend_btn.text = "Verteidigung beenden"
|
|
|
|
defend_btn.pressed.connect(_on_defend_button_pressed)
|
|
|
|
defend_btn.pressed.connect(_on_defend_button_pressed)
|
|
|
|
action_buttons.add_child(defend_btn)
|
|
|
|
action_buttons.add_child(defend_btn)
|
|
|
|
|
|
|
|
|
|
|
|
var take_btn = Button.new()
|
|
|
|
var take_btn = Button.new()
|
|
|
|
take_btn.text = "Karten nehmen"
|
|
|
|
take_btn.text = "Karten nehmen"
|
|
|
|
take_btn.pressed.connect(_on_take_cards_pressed)
|
|
|
|
take_btn.pressed.connect(_on_take_cards_pressed)
|
|
|
|
action_buttons.add_child(take_btn)
|
|
|
|
action_buttons.add_child(take_btn)
|
|
|
|
|
|
|
|
|
|
|
|
# Initially hidden
|
|
|
|
# Initially hidden
|
|
|
|
action_buttons.visible = false
|
|
|
|
action_buttons.visible = false
|
|
|
|
|
|
|
|
|
|
|
|
func setup_controls(parent):
|
|
|
|
func setup_controls(parent):
|
|
|
|
var controls = HBoxContainer.new()
|
|
|
|
var controls = HBoxContainer.new()
|
|
|
|
parent.add_child(controls)
|
|
|
|
parent.add_child(controls)
|
|
|
|
|
|
|
|
|
|
|
|
coins_label = Label.new()
|
|
|
|
coins_label = Label.new()
|
|
|
|
coins_label.text = "Münzen: 100"
|
|
|
|
coins_label.text = "Münzen: 100"
|
|
|
|
controls.add_child(coins_label)
|
|
|
|
controls.add_child(coins_label)
|
|
|
|
|
|
|
|
|
|
|
|
var booster_btn = Button.new()
|
|
|
|
var booster_btn = Button.new()
|
|
|
|
booster_btn.text = "Booster kaufen (50)"
|
|
|
|
booster_btn.text = "Booster kaufen (50)"
|
|
|
|
booster_btn.pressed.connect(_on_booster_button_pressed)
|
|
|
|
booster_btn.pressed.connect(_on_booster_button_pressed)
|
|
|
|
@@ -158,11 +158,11 @@ func setup_controls(parent):
|
|
|
|
func setup_player_area(parent):
|
|
|
|
func setup_player_area(parent):
|
|
|
|
var area = VBoxContainer.new()
|
|
|
|
var area = VBoxContainer.new()
|
|
|
|
parent.add_child(area)
|
|
|
|
parent.add_child(area)
|
|
|
|
|
|
|
|
|
|
|
|
var label = Label.new()
|
|
|
|
var label = Label.new()
|
|
|
|
label.text = "Deine Karten"
|
|
|
|
label.text = "Deine Karten"
|
|
|
|
area.add_child(label)
|
|
|
|
area.add_child(label)
|
|
|
|
|
|
|
|
|
|
|
|
player_hand_container = HBoxContainer.new()
|
|
|
|
player_hand_container = HBoxContainer.new()
|
|
|
|
area.add_child(player_hand_container)
|
|
|
|
area.add_child(player_hand_container)
|
|
|
|
|
|
|
|
|
|
|
|
@@ -171,7 +171,7 @@ func create_card_ui(card, clickable: bool = true) -> Control:
|
|
|
|
var card_button = Button.new()
|
|
|
|
var card_button = Button.new()
|
|
|
|
card_button.custom_minimum_size = card_size
|
|
|
|
card_button.custom_minimum_size = card_size
|
|
|
|
card_button.disabled = not clickable
|
|
|
|
card_button.disabled = not clickable
|
|
|
|
|
|
|
|
|
|
|
|
if card.is_joker:
|
|
|
|
if card.is_joker:
|
|
|
|
card_button.text = "JOKER\n" + str(card.joker_type)
|
|
|
|
card_button.text = "JOKER\n" + str(card.joker_type)
|
|
|
|
card_button.modulate = Color.GOLD
|
|
|
|
card_button.modulate = Color.GOLD
|
|
|
|
@@ -179,35 +179,35 @@ func create_card_ui(card, clickable: bool = true) -> Control:
|
|
|
|
var suit_symbols = ["♥", "♦", "♣", "♠"]
|
|
|
|
var suit_symbols = ["♥", "♦", "♣", "♠"]
|
|
|
|
var suit_text = suit_symbols[card.suit]
|
|
|
|
var suit_text = suit_symbols[card.suit]
|
|
|
|
card_button.text = str(card.value) + "\n" + suit_text
|
|
|
|
card_button.text = str(card.value) + "\n" + suit_text
|
|
|
|
|
|
|
|
|
|
|
|
# Color coding
|
|
|
|
# Color coding
|
|
|
|
if card.suit in [0, 1]: # Hearts, Diamonds
|
|
|
|
if card.suit in [0, 1]: # Hearts, Diamonds
|
|
|
|
card_button.modulate = Color.RED
|
|
|
|
card_button.modulate = Color.RED
|
|
|
|
else: # Clubs, Spades
|
|
|
|
else: # Clubs, Spades
|
|
|
|
card_button.modulate = Color.BLACK
|
|
|
|
card_button.modulate = Color.BLACK
|
|
|
|
|
|
|
|
|
|
|
|
if clickable:
|
|
|
|
if clickable:
|
|
|
|
card_button.pressed.connect(_on_card_clicked.bind(card))
|
|
|
|
card_button.pressed.connect(_on_card_clicked.bind(card))
|
|
|
|
|
|
|
|
|
|
|
|
return card_button
|
|
|
|
return card_button
|
|
|
|
|
|
|
|
|
|
|
|
func create_card_back() -> Control:
|
|
|
|
func create_card_back() -> Control:
|
|
|
|
var card_back = ColorRect.new()
|
|
|
|
var card_back = ColorRect.new()
|
|
|
|
card_back.color = Color.BLUE
|
|
|
|
card_back.color = Color.BLUE
|
|
|
|
card_back.custom_minimum_size = card_size
|
|
|
|
card_back.custom_minimum_size = card_size
|
|
|
|
|
|
|
|
|
|
|
|
var label = Label.new()
|
|
|
|
var label = Label.new()
|
|
|
|
label.text = "🂠"
|
|
|
|
label.text = "🂠"
|
|
|
|
label.horizontal_alignment = HORIZONTAL_ALIGNMENT_CENTER
|
|
|
|
label.horizontal_alignment = HORIZONTAL_ALIGNMENT_CENTER
|
|
|
|
label.vertical_alignment = VERTICAL_ALIGNMENT_CENTER
|
|
|
|
label.vertical_alignment = VERTICAL_ALIGNMENT_CENTER
|
|
|
|
card_back.add_child(label)
|
|
|
|
card_back.add_child(label)
|
|
|
|
|
|
|
|
|
|
|
|
return card_back
|
|
|
|
return card_back
|
|
|
|
|
|
|
|
|
|
|
|
func create_joker_slot() -> Control:
|
|
|
|
func create_joker_slot() -> Control:
|
|
|
|
var slot = Panel.new()
|
|
|
|
var slot = Panel.new()
|
|
|
|
slot.custom_minimum_size = card_size * 0.7
|
|
|
|
slot.custom_minimum_size = card_size * 0.7
|
|
|
|
|
|
|
|
|
|
|
|
var style = StyleBoxFlat.new()
|
|
|
|
var style = StyleBoxFlat.new()
|
|
|
|
style.bg_color = Color.GRAY
|
|
|
|
style.bg_color = Color.GRAY
|
|
|
|
style.border_width_left = 2
|
|
|
|
style.border_width_left = 2
|
|
|
|
@@ -216,7 +216,7 @@ func create_joker_slot() -> Control:
|
|
|
|
style.border_width_bottom = 2
|
|
|
|
style.border_width_bottom = 2
|
|
|
|
style.border_color = Color.WHITE
|
|
|
|
style.border_color = Color.WHITE
|
|
|
|
slot.add_theme_stylebox_override("panel", style)
|
|
|
|
slot.add_theme_stylebox_override("panel", style)
|
|
|
|
|
|
|
|
|
|
|
|
return slot
|
|
|
|
return slot
|
|
|
|
|
|
|
|
|
|
|
|
# Update Functions
|
|
|
|
# Update Functions
|
|
|
|
@@ -224,7 +224,7 @@ func update_player_hand(cards: Array):
|
|
|
|
# Clear existing cards
|
|
|
|
# Clear existing cards
|
|
|
|
for child in player_hand_container.get_children():
|
|
|
|
for child in player_hand_container.get_children():
|
|
|
|
child.queue_free()
|
|
|
|
child.queue_free()
|
|
|
|
|
|
|
|
|
|
|
|
# Add new cards
|
|
|
|
# Add new cards
|
|
|
|
for card in cards:
|
|
|
|
for card in cards:
|
|
|
|
var card_ui = create_card_ui(card, true)
|
|
|
|
var card_ui = create_card_ui(card, true)
|
|
|
|
@@ -234,7 +234,7 @@ func update_opponent_hand(card_count: int):
|
|
|
|
# Clear existing cards
|
|
|
|
# Clear existing cards
|
|
|
|
for child in opponent_hand_container.get_children():
|
|
|
|
for child in opponent_hand_container.get_children():
|
|
|
|
child.queue_free()
|
|
|
|
child.queue_free()
|
|
|
|
|
|
|
|
|
|
|
|
# Add card backs
|
|
|
|
# Add card backs
|
|
|
|
for i in range(card_count):
|
|
|
|
for i in range(card_count):
|
|
|
|
var card_back = create_card_back()
|
|
|
|
var card_back = create_card_back()
|
|
|
|
@@ -245,23 +245,23 @@ func update_table(table_pairs: Array, attacking_cards: Array):
|
|
|
|
# Clear existing table
|
|
|
|
# Clear existing table
|
|
|
|
for child in table_area.get_children():
|
|
|
|
for child in table_area.get_children():
|
|
|
|
child.queue_free()
|
|
|
|
child.queue_free()
|
|
|
|
|
|
|
|
|
|
|
|
# Show completed pairs
|
|
|
|
# Show completed pairs
|
|
|
|
for pair in table_pairs:
|
|
|
|
for pair in table_pairs:
|
|
|
|
var attack_card = create_card_ui(pair.attack, false)
|
|
|
|
var attack_card = create_card_ui(pair.attack, false)
|
|
|
|
attack_card.modulate = Color.ORANGE # Angriff
|
|
|
|
attack_card.modulate = Color.ORANGE # Angriff
|
|
|
|
table_area.add_child(attack_card)
|
|
|
|
table_area.add_child(attack_card)
|
|
|
|
|
|
|
|
|
|
|
|
var defend_card = create_card_ui(pair.defend, false)
|
|
|
|
var defend_card = create_card_ui(pair.defend, false)
|
|
|
|
defend_card.modulate = Color.GREEN # Verteidigung
|
|
|
|
defend_card.modulate = Color.GREEN # Verteidigung
|
|
|
|
table_area.add_child(defend_card)
|
|
|
|
table_area.add_child(defend_card)
|
|
|
|
|
|
|
|
|
|
|
|
# Show undefended attacks
|
|
|
|
# Show undefended attacks
|
|
|
|
for card in attacking_cards:
|
|
|
|
for card in attacking_cards:
|
|
|
|
var attack_card = create_card_ui(card, false)
|
|
|
|
var attack_card = create_card_ui(card, false)
|
|
|
|
attack_card.modulate = Color.RED # Unverteidigt
|
|
|
|
attack_card.modulate = Color.RED # Unverteidigt
|
|
|
|
table_area.add_child(attack_card)
|
|
|
|
table_area.add_child(attack_card)
|
|
|
|
|
|
|
|
|
|
|
|
# Empty slot for defense
|
|
|
|
# Empty slot for defense
|
|
|
|
var empty_slot = Panel.new()
|
|
|
|
var empty_slot = Panel.new()
|
|
|
|
empty_slot.custom_minimum_size = card_size
|
|
|
|
empty_slot.custom_minimum_size = card_size
|
|
|
|
@@ -273,13 +273,13 @@ func update_table(table_pairs: Array, attacking_cards: Array):
|
|
|
|
func update_joker_slots(active_jokers: Array):
|
|
|
|
func update_joker_slots(active_jokers: Array):
|
|
|
|
var label = joker_slots_container.get_parent().get_node("JokerLabel")
|
|
|
|
var label = joker_slots_container.get_parent().get_node("JokerLabel")
|
|
|
|
label.text = "Joker (" + str(active_jokers.size()) + "/3)"
|
|
|
|
label.text = "Joker (" + str(active_jokers.size()) + "/3)"
|
|
|
|
|
|
|
|
|
|
|
|
# Update slots
|
|
|
|
# Update slots
|
|
|
|
for i in range(3):
|
|
|
|
for i in range(3):
|
|
|
|
var slot = joker_slots_container.get_child(i)
|
|
|
|
var slot = joker_slots_container.get_child(i)
|
|
|
|
if i < active_jokers.size():
|
|
|
|
if i < active_jokers.size():
|
|
|
|
slot.modulate = Color.GREEN
|
|
|
|
slot.modulate = Color.GREEN
|
|
|
|
|
|
|
|
|
|
|
|
# Add joker label
|
|
|
|
# Add joker label
|
|
|
|
var joker_label = Label.new()
|
|
|
|
var joker_label = Label.new()
|
|
|
|
joker_label.text = str(active_jokers[i])
|
|
|
|
joker_label.text = str(active_jokers[i])
|
|
|
|
@@ -329,23 +329,23 @@ func update_game_state(state, is_player_turn: bool):
|
|
|
|
func show_joker_choice(joker_type):
|
|
|
|
func show_joker_choice(joker_type):
|
|
|
|
var dialog = AcceptDialog.new()
|
|
|
|
var dialog = AcceptDialog.new()
|
|
|
|
dialog.title = "Joker gezogen!"
|
|
|
|
dialog.title = "Joker gezogen!"
|
|
|
|
|
|
|
|
|
|
|
|
var vbox = VBoxContainer.new()
|
|
|
|
var vbox = VBoxContainer.new()
|
|
|
|
|
|
|
|
|
|
|
|
var info_label = Label.new()
|
|
|
|
var info_label = Label.new()
|
|
|
|
info_label.text = "Du hast einen " + str(joker_type) + " Joker gezogen!"
|
|
|
|
info_label.text = "Du hast einen " + str(joker_type) + " Joker gezogen!"
|
|
|
|
vbox.add_child(info_label)
|
|
|
|
vbox.add_child(info_label)
|
|
|
|
|
|
|
|
|
|
|
|
var play_btn = Button.new()
|
|
|
|
var play_btn = Button.new()
|
|
|
|
play_btn.text = "Sofort spielen"
|
|
|
|
play_btn.text = "Sofort spielen"
|
|
|
|
play_btn.pressed.connect(_on_joker_play_immediate.bind(joker_type, dialog))
|
|
|
|
play_btn.pressed.connect(_on_joker_play_immediate.bind(joker_type, dialog))
|
|
|
|
vbox.add_child(play_btn)
|
|
|
|
vbox.add_child(play_btn)
|
|
|
|
|
|
|
|
|
|
|
|
var keep_btn = Button.new()
|
|
|
|
var keep_btn = Button.new()
|
|
|
|
keep_btn.text = "Behalten (Risiko!)"
|
|
|
|
keep_btn.text = "Behalten (Risiko!)"
|
|
|
|
keep_btn.pressed.connect(_on_joker_keep.bind(dialog))
|
|
|
|
keep_btn.pressed.connect(_on_joker_keep.bind(dialog))
|
|
|
|
vbox.add_child(keep_btn)
|
|
|
|
vbox.add_child(keep_btn)
|
|
|
|
|
|
|
|
|
|
|
|
dialog.add_child(vbox)
|
|
|
|
dialog.add_child(vbox)
|
|
|
|
add_child(dialog)
|
|
|
|
add_child(dialog)
|
|
|
|
dialog.popup_centered()
|
|
|
|
dialog.popup_centered()
|
|
|
|
|