Skip to content

Commit

Permalink
all running
Browse files Browse the repository at this point in the history
  • Loading branch information
Sayantan0013 committed Jan 4, 2021
1 parent 9af661b commit e94f760
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 8 deletions.
4 changes: 2 additions & 2 deletions UI/Vocabulary/ItemList-Trial.gd
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
extends Panel

var ItemListContent = ["strI","puruSa","napuMsaka","dhAtu","dhanyavAdaH","svAgatam","kim","kiyat","asti","sundaram","idaM","aham","asmi","vAstavika","mUlya","hIn"]

signal report(value)
func _ready():
#Load the ItemList by stepping through it and adding each item.
for ItemID in range(len(ItemListContent)):
Expand All @@ -16,7 +16,7 @@ func ReportListItem():
var ItemNo = get_node("ItemList").get_selected_items() #The output ItemNo is a list of selected items
var SelectedItemtext = ItemListContent[ItemNo[0]]
get_node("Label - output").set_text(str(SelectedItemtext))
print(ItemNo)
emit_signal('report',SelectedItemtext)



Expand Down
1 change: 1 addition & 0 deletions UI/Vocabulary/ItemList-Trial.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -92,5 +92,6 @@ text = "Open"
__meta__ = {
"_edit_use_anchors_": false
}
[connection signal="report" from="Control/Panel" to="." method="_on_Panel_report"]
[connection signal="pressed" from="Control/Panel/exit" to="Control/Panel" method="_on_exit_pressed"]
[connection signal="pressed" from="Control/Button" to="." method="_on_Button_pressed"]
6 changes: 5 additions & 1 deletion UI/Vocabulary/New_list.gd
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
extends CanvasLayer

signal report(value)

# Declare member variables here. Examples:
# var a = 2
Expand All @@ -13,3 +13,7 @@ func _ready():

func _on_Button_pressed():
$Control/Panel.set_visible(true)


func _on_Panel_report(value):
emit_signal('report',value)
2 changes: 1 addition & 1 deletion project.godot
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ _global_script_class_icons={
[application]

config/name="Productathon"
run/main_scene="res://Player_s.tscn"
run/main_scene="res://scenes/main.tscn"
config/icon="res://icon.png"

[autoload]
Expand Down
6 changes: 3 additions & 3 deletions resources/dialogue/obj1.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
},
"6" : {
"text" : "idaM sthAnam ahaṁ sangrakShaAmi.",
"type" : "assertive",
"character" : "user_input"
"type" : "user_input",
"character" : "you"
}
}
}
8 changes: 7 additions & 1 deletion scenes/dialogue_controller.gd
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ func _on_Button_button_down() -> void:
system.set_visible(false)
emit_signal("completed")
elif state['type'] == 'user_input':
if $DialogueSystem/DialogBox/box/TextEdit.text == state['text']:
if $DialogueSystem/DialogBox/box/TextEdit.text == state['text']+' ':
index += 1
if index < loadedDialogue.size():
set_state(loadedDialogue[String(index)])
Expand All @@ -73,3 +73,9 @@ func start() -> void:
set_state(loadedDialogue[String(index)])
process_state(state)



func _on_CanvasLayer_report(value):
if $DialogueSystem/DialogBox/box/TextEdit.visible == true:
$DialogueSystem/DialogBox/box/TextEdit.text += value + " "

1 change: 1 addition & 0 deletions scenes/main.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -904,4 +904,5 @@ position = Vector2( 3388.58, -6526.62 )
position = Vector2( 6916.3, 5517.02 )
rotation = 1.0472
[connection signal="completed" from="initial_story" to="." method="_on_initial_story_completed"]
[connection signal="report" from="CanvasLayer" to="main_dialogue" method="_on_CanvasLayer_report"]
[connection signal="body_entered" from="Area2D" to="." method="_on_Area2D_body_entered"]

0 comments on commit e94f760

Please sign in to comment.