#include "connection_dialog.h"
#include "tracker_config.h"
ConnectionDialog::ConnectionDialog()
: wxDialog(nullptr, wxID_ANY, "Connect to Archipelago") {
server_box_ = new wxTextCtrl(this, -1, GetTrackerConfig().ap_server, wxDefaultPosition,
{300, -1});
player_box_ = new wxTextCtrl(this, -1, GetTrackerConfig().ap_player, wxDefaultPosition,
{300, -1});
password_box_ = new wxTextCtrl(this, -1, GetTrackerConfig().ap_password,
wxDefaultPosition, {300, -1});
wxFlexGridSizer* form_sizer = new wxFlexGridSizer(2, 10, 10);
form_sizer->Add(
new wxStaticText(this, -1, "Server:"),
wxSizerFlags().Align(wxALIGN_CENTER_VERTICAL | wxALIGN_RIGHT));
form_sizer->Add(server_box_, wxSizerFlags().Expand());
form_sizer->Add(
new wxStaticText(this, -1, "Player:"),
wxSizerFlags().Align(wxALIGN_CENTER_VERTICAL | wxALIGN_RIGHT));
form_sizer->Add(player_box_, wxSizerFlags().Expand());
form_sizer->Add(
new wxStaticText(this, -1, "Password:"),
wxSizerFlags().Align(wxALIGN_CENTER_VERTICAL | wxALIGN_RIGHT));
form_sizer->Add(password_box_, wxSizerFlags().Expand());
wxBoxSizer* top_sizer = new wxBoxSizer(wxVERTICAL);
top_sizer->Add(new wxStaticText(
this, -1, "Enter the details to connect to Archipelago."),
wxSizerFlags().Align(wxALIGN_LEFT).DoubleBorder());
top_sizer->Add(form_sizer, wxSizerFlags().DoubleBorder().Expand());
top_sizer->Add(CreateButtonSizer(wxOK | wxCANCEL), wxSizerFlags().Center());
SetSizerAndFit(top_sizer);
Center();
server_box_->SetFocus();
}
c49ab23'>tree commit diff stats
|
blob: 428d50b6e139162c93a655a030c7c9384704ac32 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
extends "res://scripts/nodes/teleport.gd"
var item_id
var item_amount
func _ready():
var node_path = String(
get_tree().get_root().get_node("scene").get_path_to(self).get_concatenated_names()
)
var gamedata = global.get_node("Gamedata")
var door_id = gamedata.get_door_for_map_node_path(global.map, node_path)
if door_id != null:
var ap = global.get_node("Archipelago")
var item_lock = ap.get_item_id_for_door(door_id)
if item_lock != null:
item_id = item_lock[0]
item_amount = item_lock[1]
self.senders = []
self.senderGroup = []
self.nested = false
self.complete_at = 0
self.max_length = 0
self.excludeSenders = []
call_deferred("_readier")
super._ready()
func _readier():
var ap = global.get_node("Archipelago")
if ap.client.getItemAmount(item_id) >= item_amount:
handleTriggered()
|