2024-11-14 03:41:05 +01:00
|
|
|
/// @description init
|
|
|
|
event_inherited();
|
|
|
|
|
|
|
|
#region data
|
|
|
|
dialog_w = ui(480);
|
|
|
|
dialog_h = ui(200);
|
|
|
|
title_height = ui(28);
|
|
|
|
destroy_on_click_out = false;
|
|
|
|
|
2024-11-15 06:06:21 +01:00
|
|
|
campaign_id = "2263128";
|
|
|
|
req_patreon = "";
|
|
|
|
req_user = "";
|
|
|
|
access_token = "";
|
2024-11-14 03:41:05 +01:00
|
|
|
|
2024-11-15 06:06:21 +01:00
|
|
|
status = 0;
|
2024-11-14 03:41:05 +01:00
|
|
|
|
2024-11-15 06:06:21 +01:00
|
|
|
if(IS_PATREON) {
|
|
|
|
txt = "Patreon verified, thank you for supporting Pixel Composer!";
|
|
|
|
server = 0;
|
|
|
|
dialog_h += ui(40);
|
|
|
|
|
|
|
|
} else {
|
|
|
|
txt = "Sign-in to Patreon on browser";
|
|
|
|
var attmp = 0;
|
|
|
|
do {
|
|
|
|
port = irandom_range(7000, 20000);
|
|
|
|
server = network_create_server_raw(network_socket_ws, port, 32);
|
|
|
|
} until(server >= 0 || attmp++ >= 100);
|
|
|
|
|
2024-11-14 09:19:03 +01:00
|
|
|
var _url = @"www.patreon.com/oauth2/authorize?response_type=code
|
2024-11-15 06:06:21 +01:00
|
|
|
&client_id=oZ1PNvUY61uH0FiA7ZPMBy77Xau3Ok9tfvsT_Y8DQwyKeMNjaVC35r1qsK09QJhY
|
|
|
|
&redirect_uri=https://pixel-composer.com/verify";
|
2024-11-14 09:19:03 +01:00
|
|
|
_url += $"&state={port}";
|
2024-11-15 06:06:21 +01:00
|
|
|
|
2024-11-14 09:19:03 +01:00
|
|
|
url_open(_url);
|
|
|
|
}
|
2024-11-14 03:41:05 +01:00
|
|
|
#endregion
|