BrowserListClient.gd 670 B

123456789101112131415161718192021222324252627282930
  1. extends Node
  2. var browsecolumn = preload('res://BrowseColumn.tscn')
  3. var dict = {
  4. '127.0.0.1:8081': {
  5. 'Name':'test',
  6. 'IP':'127.0.0.1',
  7. 'Port':8081,
  8. 'Ping':125,
  9. 'Gamemode':'deathmatch',
  10. 'Map':'de_dus2'
  11. },
  12. }
  13. func _ready():
  14. for x in dict.keys():
  15. var newone = browsecolumn.instance()
  16. for z in dict[x].keys():
  17. print(z)
  18. newone.get_node('HBoxContainer').get_node(z).text = str(dict[x][z])
  19. newone.connect("click",self,'_on_BrowseColumn_click')
  20. $PanelContainer/Table.add_child(newone)
  21. pass # Replace with function body.
  22. signal click
  23. func _on_BrowseColumn_click(arg):
  24. print('click1')
  25. emit_signal("click",arg)
  26. pass # Replace with function body.