Re-Organizing Structure Layout
Restructuring project to proper directory layout.
This commit is contained in:
parent
38518a1fcd
commit
1340eba1cb
10806 changed files with 16774 additions and 16774 deletions
32
UI/Panels/User/internal_twitch_user_info.gd
Normal file
32
UI/Panels/User/internal_twitch_user_info.gd
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
extends PanelContainer
|
||||
|
||||
@onready var user_games: UserGamesPanel = %UserGames
|
||||
@onready var tui := %TwitchUserInfo
|
||||
@onready var up := %UserPromo
|
||||
|
||||
|
||||
var chatter: Chatter:
|
||||
set(value):
|
||||
chatter = value
|
||||
if not value:
|
||||
tui.clear()
|
||||
up.chatter = value
|
||||
user_games.clear()
|
||||
return
|
||||
if tui:
|
||||
tui.populate_from_chatter(chatter)
|
||||
if up:
|
||||
up.chatter = value
|
||||
if user_games:
|
||||
user_games.chatter = value
|
||||
|
||||
func _ready() -> void:
|
||||
tui.extra_expanding.connect(func(x): if x: up.visible = false)
|
||||
tui.extra_expanded.connect(func(x): if not x: up.visible = true)
|
||||
resized.connect(func():
|
||||
var width := int(size.x / 2)
|
||||
user_games.splitter.split_offsets[0] = width
|
||||
)
|
||||
tui.populate_from_chatter(chatter)
|
||||
up.chatter = chatter
|
||||
user_games.chatter = chatter
|
||||
1
UI/Panels/User/internal_twitch_user_info.gd.uid
Normal file
1
UI/Panels/User/internal_twitch_user_info.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://bbyomfy4iqbq3
|
||||
34
UI/Panels/User/internal_twitch_user_info.tscn
Normal file
34
UI/Panels/User/internal_twitch_user_info.tscn
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
[gd_scene format=3 uid="uid://d3fhwrt28r08x"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://bk7elsy5s3equ" path="res://UI/Panels/User/twitch_user_info.tscn" id="1_bbob4"]
|
||||
[ext_resource type="Script" uid="uid://bbyomfy4iqbq3" path="res://UI/Panels/User/internal_twitch_user_info.gd" id="1_l8fl7"]
|
||||
[ext_resource type="PackedScene" uid="uid://cadil3rnqh61e" path="res://UI/Panels/User/user_promo.tscn" id="2_l8fl7"]
|
||||
[ext_resource type="PackedScene" uid="uid://cojuxefo7cryj" path="res://UI/Panels/User/user_games.tscn" id="4_h7tf2"]
|
||||
|
||||
[node name="InternalTwitchUserInfo" type="PanelContainer" unique_id=1986869556]
|
||||
offset_right = 1346.0
|
||||
offset_bottom = 536.0
|
||||
theme_type_variation = &"TabPanel"
|
||||
script = ExtResource("1_l8fl7")
|
||||
metadata/_tab_index = 0
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="." unique_id=92971307]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer" unique_id=515716981]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="TwitchUserInfo" parent="VBoxContainer/HBoxContainer" unique_id=1944732530 instance=ExtResource("1_bbob4")]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 0
|
||||
|
||||
[node name="UserPromo" parent="VBoxContainer/HBoxContainer" unique_id=1364169576 instance=ExtResource("2_l8fl7")]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 1
|
||||
|
||||
[node name="UserGames" parent="VBoxContainer" unique_id=2022365407 instance=ExtResource("4_h7tf2")]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 3
|
||||
57
UI/Panels/User/internal_user_live.gd
Normal file
57
UI/Panels/User/internal_user_live.gd
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
extends PanelContainer
|
||||
|
||||
var chatter: Chatter:
|
||||
set(value):
|
||||
chatter = value
|
||||
if not chatter:
|
||||
live = null
|
||||
return
|
||||
live = Globals.live_streamers[chatter.twitch_id] if chatter.twitch_id in Globals.live_streamers.keys() else null
|
||||
_populate_view()
|
||||
|
||||
var live: TwitchStream
|
||||
|
||||
var _ticks: int = 0
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready() -> void:
|
||||
%StreamTitle.pressed.connect(_open_stream)
|
||||
%RaidCurrentUser.pressed.connect(_raid_stream)
|
||||
if not chatter: return
|
||||
if not live and chatter.twitch_id in Globals.live_streamers.keys():
|
||||
live = Globals.live_streamers[chatter.twitch_id]
|
||||
_populate_view()
|
||||
|
||||
func _populate_view() -> void:
|
||||
if not live:
|
||||
set_process(false)
|
||||
return
|
||||
set_process(true)
|
||||
%StreamTitle.text = live.title
|
||||
%StreamViewerCount.text = str(live.viewer_count)
|
||||
var url := live.thumbnail_url.format({"width": 640, "height": 360})
|
||||
var img = await Globals.twitcher.media.load_image(url)
|
||||
%StreamThumbnail.texture = ImageTexture.create_from_image(img)
|
||||
|
||||
func _process(_d: float) -> void:
|
||||
if not live:
|
||||
set_process(false)
|
||||
return
|
||||
|
||||
_ticks += 1
|
||||
if _ticks < 30: return
|
||||
_ticks = 0
|
||||
|
||||
var system_unix = Time.get_unix_time_from_system()
|
||||
var stream_start_unix = Time.get_unix_time_from_datetime_string(live.started_at)
|
||||
var elapsed = Time.get_datetime_string_from_unix_time((system_unix - stream_start_unix), true)
|
||||
|
||||
%StreamTime.text = elapsed.split(" ")[1]
|
||||
|
||||
func _open_stream() -> void:
|
||||
if not live: return
|
||||
OS.shell_open("https://twitch.tv/%s" % live.user_login)
|
||||
|
||||
func _raid_stream() -> void:
|
||||
if not live: return
|
||||
pass
|
||||
1
UI/Panels/User/internal_user_live.gd.uid
Normal file
1
UI/Panels/User/internal_user_live.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://cdtfvedghei5f
|
||||
96
UI/Panels/User/internal_user_live.tscn
Normal file
96
UI/Panels/User/internal_user_live.tscn
Normal file
|
|
@ -0,0 +1,96 @@
|
|||
[gd_scene format=3 uid="uid://bipoye4ww4ua6"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://cdtfvedghei5f" path="res://UI/Panels/User/internal_user_live.gd" id="1_rl2q8"]
|
||||
[ext_resource type="Texture2D" uid="uid://b3372gsnwqsyn" path="res://assets/bootstrap/twitch.svg" id="1_sw5jj"]
|
||||
[ext_resource type="Texture2D" uid="uid://bu2juj2beyws7" path="res://assets/twitch_user_profile_pic.png" id="2_rl2q8"]
|
||||
|
||||
[node name="InternalUserLive" type="PanelContainer" unique_id=17956466]
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
script = ExtResource("1_rl2q8")
|
||||
metadata/_tab_index = 1
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="." unique_id=1170164100]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="StreamTitle" type="Button" parent="VBoxContainer" unique_id=1072998029]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer" unique_id=12650367]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 3
|
||||
|
||||
[node name="StreamThumbnail" type="TextureRect" parent="VBoxContainer/HBoxContainer" unique_id=641456832]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
expand_mode = 1
|
||||
stretch_mode = 5
|
||||
|
||||
[node name="UserChat" type="PanelContainer" parent="VBoxContainer/HBoxContainer" unique_id=1609959534]
|
||||
unique_name_in_owner = true
|
||||
visible = false
|
||||
layout_mode = 2
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="VBoxContainer/HBoxContainer/UserChat" unique_id=471477121]
|
||||
custom_minimum_size = Vector2(300, 0)
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Chat" type="PanelContainer" parent="VBoxContainer/HBoxContainer/UserChat/VBoxContainer" unique_id=2018394431]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 3
|
||||
|
||||
[node name="ScrollContainer" type="ScrollContainer" parent="VBoxContainer/HBoxContainer/UserChat/VBoxContainer/Chat" unique_id=1349693918]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="ChatHistory" type="VBoxContainer" parent="VBoxContainer/HBoxContainer/UserChat/VBoxContainer/Chat/ScrollContainer" unique_id=1839863005]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
|
||||
[node name="Message" type="LineEdit" parent="VBoxContainer/HBoxContainer/UserChat/VBoxContainer" unique_id=1978478528]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
placeholder_text = "chat"
|
||||
|
||||
[node name="PanelContainer" type="PanelContainer" parent="VBoxContainer" unique_id=1134033714]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer/PanelContainer" unique_id=411231899]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="RaidCurrentUser" type="Button" parent="VBoxContainer/PanelContainer/HBoxContainer" unique_id=288716491]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(250, 0)
|
||||
layout_mode = 2
|
||||
text = "Raid!"
|
||||
icon = ExtResource("1_sw5jj")
|
||||
expand_icon = true
|
||||
|
||||
[node name="ChatLiveSteramer" type="LineEdit" parent="VBoxContainer/PanelContainer/HBoxContainer" unique_id=789542500]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
|
||||
[node name="StreamTime" type="Label" parent="VBoxContainer/PanelContainer/HBoxContainer" unique_id=969178063]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
text = "00:15:42"
|
||||
|
||||
[node name="Icon" type="TextureRect" parent="VBoxContainer/PanelContainer/HBoxContainer" unique_id=521936560]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(24, 24)
|
||||
layout_mode = 2
|
||||
texture = ExtResource("2_rl2q8")
|
||||
expand_mode = 1
|
||||
stretch_mode = 5
|
||||
|
||||
[node name="StreamViewerCount" type="Label" parent="VBoxContainer/PanelContainer/HBoxContainer" unique_id=20195332]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
text = "15"
|
||||
55
UI/Panels/User/search_twitch_user.gd
Normal file
55
UI/Panels/User/search_twitch_user.gd
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
extends PanelContainer
|
||||
|
||||
signal dlg_closed()
|
||||
signal users_updated()
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready() -> void:
|
||||
%SearchUser.text_submitted.connect(_handle_search_user)
|
||||
%SearchId.text_submitted.connect(_handle_search_id)
|
||||
%SaveUser.pressed.connect(_handle_save_user)
|
||||
%UpdateUser.pressed.connect(_handle_update_user)
|
||||
%ClearUser.pressed.connect(%TwitchUserInfo.clear)
|
||||
|
||||
func _handle_search_user(user: String) -> void:
|
||||
%TwitchUserInfo.show_busy()
|
||||
var t_user := await Globals.twitcher.get_user(user)
|
||||
if t_user == null:
|
||||
%TwitchUserInfo.show_normal()
|
||||
DisplayServer.dialog_show("Failed to find Twitch User", "Failed to find the Twitch user going by %s" % user, ["Ok"], dlg_closed.emit)
|
||||
await dlg_closed
|
||||
return
|
||||
|
||||
%TwitchUserInfo.populate_from_twitch_user(t_user)
|
||||
|
||||
func _handle_search_id(id: String) -> void:
|
||||
%TwitchUserInfo.show_busy()
|
||||
var t_user := await Globals.twitcher.get_user_by_id(id)
|
||||
if t_user == null:
|
||||
%TwitchUserInfo.show_normal()
|
||||
DisplayServer.dialog_show("Failed to find Twitch User", "Unable to find a Twitch user with the associated id %s" % id, ["Ok"], dlg_closed.emit)
|
||||
await dlg_closed
|
||||
return
|
||||
|
||||
%TwitchUserInfo.populate_from_twitch_user(t_user)
|
||||
|
||||
func _handle_save_user() -> void:
|
||||
var user: TwitchUser = %TwitchUserInfo.t_user
|
||||
var chatter: Chatter = Globals.context.chatters.find_one(Condition.new().equal("twitch_id", user.id))
|
||||
if chatter:
|
||||
DisplayServer.dialog_show("Add Twitch User", "This user already exists in the database.", ["Ok"], dlg_closed.emit)
|
||||
await dlg_closed
|
||||
return
|
||||
|
||||
chatter = Chatter.new()
|
||||
chatter.twitch_id = user.id
|
||||
chatter.user = user
|
||||
chatter.first_added = Time.get_unix_time_from_system()
|
||||
chatter.first_seen = -1
|
||||
chatter.last_seen = -1
|
||||
Globals.context.chatters.append(chatter)
|
||||
%TwitchUserInfo.clear()
|
||||
users_updated.emit()
|
||||
|
||||
func _handle_update_user() -> void:
|
||||
pass
|
||||
1
UI/Panels/User/search_twitch_user.gd.uid
Normal file
1
UI/Panels/User/search_twitch_user.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://dgd1pmou5c35b
|
||||
68
UI/Panels/User/search_twitch_user.tscn
Normal file
68
UI/Panels/User/search_twitch_user.tscn
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
[gd_scene format=3 uid="uid://2ifvkmqd0q3i"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://bexdhdpprh6aa" path="res://assets/font_awesome/magnifying-glass-location.svg" id="1_c6q78"]
|
||||
[ext_resource type="Script" uid="uid://dgd1pmou5c35b" path="res://UI/Panels/User/search_twitch_user.gd" id="1_k513e"]
|
||||
[ext_resource type="PackedScene" uid="uid://bk7elsy5s3equ" path="res://UI/Panels/User/twitch_user_info.tscn" id="2_k513e"]
|
||||
[ext_resource type="Texture2D" uid="uid://bqgx2li6ejy4q" path="res://assets/bootstrap/floppy-fill.png" id="3_hc0ai"]
|
||||
[ext_resource type="Texture2D" uid="uid://ch7pe2qtxu5vt" path="res://assets/font_awesome/user-pen.svg" id="4_21lmp"]
|
||||
[ext_resource type="Texture2D" uid="uid://di8hel7cykf1y" path="res://assets/font_awesome/eraser.svg" id="5_c6q78"]
|
||||
|
||||
[node name="SearchTwitchUser" type="PanelContainer" unique_id=83637811]
|
||||
script = ExtResource("1_k513e")
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="." unique_id=574238165]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Search" type="HBoxContainer" parent="VBoxContainer" unique_id=335042598]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="ico" type="TextureRect" parent="VBoxContainer/Search" unique_id=2076335426]
|
||||
custom_minimum_size = Vector2(32, 32)
|
||||
layout_mode = 2
|
||||
texture = ExtResource("1_c6q78")
|
||||
expand_mode = 1
|
||||
stretch_mode = 5
|
||||
|
||||
[node name="SearchUser" type="LineEdit" parent="VBoxContainer/Search" unique_id=1739256223]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
placeholder_text = "search by username"
|
||||
|
||||
[node name="SearchId" type="LineEdit" parent="VBoxContainer/Search" unique_id=778191154]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
placeholder_text = "search by user ID"
|
||||
|
||||
[node name="TwitchUserInfo" parent="VBoxContainer" unique_id=1944732530 instance=ExtResource("2_k513e")]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 0
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer" unique_id=663178970]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="SaveUser" type="Button" parent="VBoxContainer/HBoxContainer" unique_id=1903961333]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
text = "Save new user"
|
||||
icon = ExtResource("3_hc0ai")
|
||||
expand_icon = true
|
||||
|
||||
[node name="UpdateUser" type="Button" parent="VBoxContainer/HBoxContainer" unique_id=1835546110]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
text = "Update User"
|
||||
icon = ExtResource("4_21lmp")
|
||||
expand_icon = true
|
||||
|
||||
[node name="ClearUser" type="Button" parent="VBoxContainer/HBoxContainer" unique_id=2034415437]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
text = "Clear"
|
||||
icon = ExtResource("5_c6q78")
|
||||
expand_icon = true
|
||||
101
UI/Panels/User/twitch_user_info.gd
Normal file
101
UI/Panels/User/twitch_user_info.gd
Normal file
|
|
@ -0,0 +1,101 @@
|
|||
extends PanelContainer
|
||||
|
||||
const CHEVRONS = [
|
||||
preload("res://assets/font_awesome/chevron-left.svg"),
|
||||
preload("res://assets/font_awesome/chevron-right.svg")
|
||||
]
|
||||
@export var expanded: bool = false
|
||||
|
||||
signal extra_expanding(is_expanding: bool)
|
||||
signal extra_expanded(is_expanded: bool)
|
||||
|
||||
var is_extra_panel_expanded: bool
|
||||
var tw_expand: Tween
|
||||
|
||||
var t_user: TwitchUser
|
||||
var chatter: Chatter
|
||||
|
||||
func _ready() -> void:
|
||||
toggle_extra_panel(expanded)
|
||||
%ExpandExtraInfo.pressed.connect(func(): toggle_extra_panel(!is_extra_panel_expanded))
|
||||
%LoadingSimple.hide()
|
||||
|
||||
func show_busy() -> void:
|
||||
%LoadingSimple.show()
|
||||
|
||||
func show_normal() -> void:
|
||||
%LoadingSimple.hide()
|
||||
|
||||
func populate_from_twitch_user(_t_user: TwitchUser) -> void:
|
||||
%LoadingSimple.show()
|
||||
clear()
|
||||
t_user = _t_user
|
||||
if not t_user: return
|
||||
%Username.text = t_user.login
|
||||
%DisplayName.text = t_user.display_name
|
||||
%UserId.text = t_user.id
|
||||
%ProfilePictureURL.text = t_user.profile_image_url
|
||||
if t_user.profile_image_url:
|
||||
%AvatarImg.texture = await Globals.twitcher.media.load_profile_image(t_user)
|
||||
else:
|
||||
%AvatarImg.texture = preload("res://assets/twitch_user_profile_pic.png")
|
||||
|
||||
%Type.text = t_user.type
|
||||
%ChannelDescription.text = t_user.description
|
||||
%BroadcasterType.text = t_user.broadcaster_type
|
||||
%OfflineImageURL.text = t_user.offline_image_url
|
||||
%ViewCount.text = str(t_user.view_count)
|
||||
%LoadingSimple.hide()
|
||||
|
||||
func populate_from_chatter(_chatter: Chatter) -> void:
|
||||
%LoadingSimple.show()
|
||||
clear()
|
||||
chatter = _chatter
|
||||
if not chatter: return
|
||||
t_user = await Globals.twitcher.get_user_by_id(chatter.twitch_id)
|
||||
%Username.text = t_user.login
|
||||
%DisplayName.text = t_user.display_name
|
||||
%UserId.text = t_user.id
|
||||
%ProfilePictureURL.text = t_user.profile_image_url
|
||||
if t_user.profile_image_url:
|
||||
%AvatarImg.texture = await Globals.twitcher.media.load_profile_image(t_user)
|
||||
else:
|
||||
%AvatarImg.texture = preload("res://assets/twitch_user_profile_pic.png")
|
||||
|
||||
%Type.text = t_user.type
|
||||
%ChannelDescription.text = t_user.description
|
||||
%BroadcasterType.text = t_user.broadcaster_type
|
||||
%OfflineImageURL.text = t_user.offline_image_url
|
||||
%ViewCount.text = str(t_user.view_count)
|
||||
%LoadingSimple.hide()
|
||||
|
||||
func clear() -> void:
|
||||
%AvatarImg.texture = preload("res://assets/twitch_user_profile_pic.png")
|
||||
%LoadingSimple.hide()
|
||||
%Username.text = ""
|
||||
%DisplayName.text = ""
|
||||
%UserId.text = ""
|
||||
%ProfilePictureURL.text = ""
|
||||
%ChatColor.color = Color.TRANSPARENT
|
||||
|
||||
%Type.text = ""
|
||||
%ChannelDescription.text = ""
|
||||
%BroadcasterType.text = ""
|
||||
%OfflineImageURL.text = ""
|
||||
%ViewCount.text = ""
|
||||
|
||||
func toggle_extra_panel(val: bool) -> void:
|
||||
is_extra_panel_expanded = val
|
||||
%ExpandExtraInfo.icon = CHEVRONS[0] if is_extra_panel_expanded else CHEVRONS[1]
|
||||
var min_size_x: float = 400 if is_extra_panel_expanded else 0
|
||||
if tw_expand:
|
||||
tw_expand.kill()
|
||||
%ExtraInfo.show()
|
||||
tw_expand = create_tween()
|
||||
tw_expand.tween_callback(extra_expanding.emit.bind(is_extra_panel_expanded))
|
||||
tw_expand.set_ease(Tween.EASE_OUT)
|
||||
tw_expand.set_trans(Tween.TRANS_CUBIC)
|
||||
tw_expand.tween_property(%ExtraInfo, ^"custom_minimum_size:x", min_size_x, 0.3)
|
||||
if !is_extra_panel_expanded:
|
||||
tw_expand.tween_property(%ExtraInfo, ^"visible", false, 0.0)
|
||||
tw_expand.tween_callback(extra_expanded.emit.bind(is_extra_panel_expanded))
|
||||
1
UI/Panels/User/twitch_user_info.gd.uid
Normal file
1
UI/Panels/User/twitch_user_info.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://bj86xfgm00ay2
|
||||
160
UI/Panels/User/twitch_user_info.tscn
Normal file
160
UI/Panels/User/twitch_user_info.tscn
Normal file
|
|
@ -0,0 +1,160 @@
|
|||
[gd_scene format=3 uid="uid://bk7elsy5s3equ"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://bj86xfgm00ay2" path="res://UI/Panels/User/twitch_user_info.gd" id="1_2rtl8"]
|
||||
[ext_resource type="Texture2D" uid="uid://bu2juj2beyws7" path="res://assets/twitch_user_profile_pic.png" id="1_wdavc"]
|
||||
[ext_resource type="Texture2D" uid="uid://cjiu8qsg8kcvk" path="res://assets/font_awesome/chevron-right.svg" id="2_8x1yt"]
|
||||
[ext_resource type="Theme" uid="uid://dh11pgqmtpeig" path="res://assets/main_theme.tres" id="2_grpru"]
|
||||
[ext_resource type="PackedScene" uid="uid://cbr5aed24dvty" path="res://UI/Controls/loading_simple.tscn" id="5_ssps2"]
|
||||
|
||||
[node name="TwitchUserInfo" type="PanelContainer" unique_id=1944732530]
|
||||
offset_right = 294.0
|
||||
offset_bottom = 128.0
|
||||
script = ExtResource("1_2rtl8")
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="." unique_id=835428733]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="AvatarImg" type="TextureRect" parent="HBoxContainer" unique_id=847416416]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(0, 128)
|
||||
layout_mode = 2
|
||||
texture = ExtResource("1_wdavc")
|
||||
expand_mode = 2
|
||||
stretch_mode = 4
|
||||
|
||||
[node name="RefreshAvatar" type="Button" parent="HBoxContainer/AvatarImg" unique_id=470568045]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
theme = ExtResource("2_grpru")
|
||||
theme_type_variation = &"BlankButton"
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="HBoxContainer" unique_id=2091869482]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="HBoxContainer/VBoxContainer" unique_id=1790412527]
|
||||
custom_minimum_size = Vector2(420, 0)
|
||||
layout_mode = 2
|
||||
|
||||
[node name="DisplayName" type="LineEdit" parent="HBoxContainer/VBoxContainer/HBoxContainer" unique_id=112898446]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
placeholder_text = "display name"
|
||||
|
||||
[node name="UserId" type="LineEdit" parent="HBoxContainer/VBoxContainer/HBoxContainer" unique_id=301550074]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
placeholder_text = "user id"
|
||||
|
||||
[node name="ChannelDescription" type="TextEdit" parent="HBoxContainer/VBoxContainer" unique_id=1913020364]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(420, 0)
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 3
|
||||
placeholder_text = "Channel description"
|
||||
wrap_mode = 1
|
||||
indent_wrapped_lines = true
|
||||
|
||||
[node name="ExpandExtraInfo" type="Button" parent="HBoxContainer" unique_id=943960057]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(18, 0)
|
||||
layout_mode = 2
|
||||
theme_type_variation = &"BlankButton"
|
||||
icon = ExtResource("2_8x1yt")
|
||||
icon_alignment = 1
|
||||
expand_icon = true
|
||||
|
||||
[node name="ExtraInfo" type="PanelContainer" parent="HBoxContainer" unique_id=1175412769]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
theme_type_variation = &"TabPanel"
|
||||
|
||||
[node name="ScrollContainer" type="ScrollContainer" parent="HBoxContainer/ExtraInfo" unique_id=1105674920]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="HBoxContainer/ExtraInfo/ScrollContainer" unique_id=1573319906]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
|
||||
[node name="Username" type="LineEdit" parent="HBoxContainer/ExtraInfo/ScrollContainer/VBoxContainer" unique_id=1399710760]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
placeholder_text = "username"
|
||||
|
||||
[node name="ProfilePictureURL" type="LineEdit" parent="HBoxContainer/ExtraInfo/ScrollContainer/VBoxContainer" unique_id=1845036114]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
placeholder_text = "profile picture url"
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="HBoxContainer/ExtraInfo/ScrollContainer/VBoxContainer" unique_id=655171068]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Label" type="Label" parent="HBoxContainer/ExtraInfo/ScrollContainer/VBoxContainer/HBoxContainer" unique_id=1450064024]
|
||||
layout_mode = 2
|
||||
text = "Twitch chat color"
|
||||
|
||||
[node name="ChatColor" type="ColorRect" parent="HBoxContainer/ExtraInfo/ScrollContainer/VBoxContainer/HBoxContainer" unique_id=2056189419]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(64, 16)
|
||||
layout_mode = 2
|
||||
|
||||
[node name="HBoxContainer2" type="HBoxContainer" parent="HBoxContainer/ExtraInfo/ScrollContainer/VBoxContainer" unique_id=55699403]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Label" type="Label" parent="HBoxContainer/ExtraInfo/ScrollContainer/VBoxContainer/HBoxContainer2" unique_id=1163546465]
|
||||
layout_mode = 2
|
||||
text = "type"
|
||||
|
||||
[node name="Type" type="LineEdit" parent="HBoxContainer/ExtraInfo/ScrollContainer/VBoxContainer/HBoxContainer2" unique_id=403251125]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
|
||||
[node name="HBoxContainer3" type="HBoxContainer" parent="HBoxContainer/ExtraInfo/ScrollContainer/VBoxContainer" unique_id=1302353290]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Label" type="Label" parent="HBoxContainer/ExtraInfo/ScrollContainer/VBoxContainer/HBoxContainer3" unique_id=2125425960]
|
||||
layout_mode = 2
|
||||
text = "broadcaster type"
|
||||
|
||||
[node name="BroadcasterType" type="LineEdit" parent="HBoxContainer/ExtraInfo/ScrollContainer/VBoxContainer/HBoxContainer3" unique_id=136580961]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
|
||||
[node name="HBoxContainer4" type="HBoxContainer" parent="HBoxContainer/ExtraInfo/ScrollContainer/VBoxContainer" unique_id=315878161]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Label" type="Label" parent="HBoxContainer/ExtraInfo/ScrollContainer/VBoxContainer/HBoxContainer4" unique_id=1792499029]
|
||||
layout_mode = 2
|
||||
text = "offline image url"
|
||||
|
||||
[node name="OfflineImageURL" type="LineEdit" parent="HBoxContainer/ExtraInfo/ScrollContainer/VBoxContainer/HBoxContainer4" unique_id=1036495270]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
|
||||
[node name="HBoxContainer5" type="HBoxContainer" parent="HBoxContainer/ExtraInfo/ScrollContainer/VBoxContainer" unique_id=376702304]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Label" type="Label" parent="HBoxContainer/ExtraInfo/ScrollContainer/VBoxContainer/HBoxContainer5" unique_id=1139447144]
|
||||
layout_mode = 2
|
||||
text = "view count"
|
||||
|
||||
[node name="ViewCount" type="LineEdit" parent="HBoxContainer/ExtraInfo/ScrollContainer/VBoxContainer/HBoxContainer5" unique_id=1793906256]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
|
||||
[node name="LoadingSimple" parent="." unique_id=814067408 instance=ExtResource("5_ssps2")]
|
||||
unique_name_in_owner = true
|
||||
visible = false
|
||||
layout_mode = 2
|
||||
85
UI/Panels/User/user_games.gd
Normal file
85
UI/Panels/User/user_games.gd
Normal file
|
|
@ -0,0 +1,85 @@
|
|||
extends PanelContainer
|
||||
class_name UserGamesPanel
|
||||
const GAME_ENTRY = preload("res://UI/Controls/game_entry.tscn")
|
||||
|
||||
@onready var splitter: HSplitContainer = %Splitter
|
||||
var chatter: Chatter:
|
||||
set(value):
|
||||
chatter = value
|
||||
if not chatter: return
|
||||
clear()
|
||||
populate_games()
|
||||
|
||||
func _ready() -> void:
|
||||
%SteamSearch.pressed.connect(_handle_search)
|
||||
%AddSteamGame.pressed.connect(_handle_add)
|
||||
|
||||
func _handle_search() -> void:
|
||||
var info: String = %SteamGameInput.text
|
||||
var app_id: int = -1
|
||||
if info.begins_with("https:"):
|
||||
var parts := Array(info.split("/"))
|
||||
parts.reverse()
|
||||
for part in parts:
|
||||
if part.is_valid_int():
|
||||
app_id = part.to_int()
|
||||
break
|
||||
elif info.is_valid_int():
|
||||
app_id = info.to_int()
|
||||
if app_id == -1: return
|
||||
var data: SteamAppData = await %SteamService.get_steam_app_data(app_id)
|
||||
if data:
|
||||
%SteamAppPanel.display_app_info(data)
|
||||
%SteamAppPanel.show()
|
||||
|
||||
func _handle_add() -> void:
|
||||
var info: String = %SteamGameInput.text
|
||||
var app_id: int = -1
|
||||
if info.begins_with("https:"):
|
||||
var parts = Array(info.split("/"))
|
||||
parts.reverse()
|
||||
for part in parts:
|
||||
if part.is_valid_int():
|
||||
app_id = part.to_int()
|
||||
break
|
||||
elif info.is_valid_int():
|
||||
app_id = info.to_int()
|
||||
|
||||
if app_id == -1: return
|
||||
|
||||
var data: SteamAppData = await %SteamService.get_steam_app_data(app_id)
|
||||
if data:
|
||||
chatter.steam_games.append(app_id)
|
||||
chatter.save()
|
||||
clear()
|
||||
populate_games()
|
||||
|
||||
func populate_games() -> void:
|
||||
for game in chatter.steam_games:
|
||||
var inst: GameEntry = GAME_ENTRY.instantiate()
|
||||
inst.steam_app_id = game
|
||||
inst.type = GameEntry.Type.STEAM
|
||||
inst.game_info_steam_pressed.connect(func(x: SteamAppData):
|
||||
%SteamAppPanel.show()
|
||||
%SteamAppPanel.display_app_info(x)
|
||||
)
|
||||
%SteamList.add_child(inst)
|
||||
|
||||
for game in chatter.itch_games:
|
||||
var inst: GameEntry = GAME_ENTRY.instantiate()
|
||||
inst.itchio_app_url = chatter.itch_games[game]
|
||||
inst.type = GameEntry.Type.ITCHIO
|
||||
inst.game_info_itchio_pressesd.connect(func(x: ItchIOAppData):
|
||||
%ItchAppPanel.show()
|
||||
%ItchAppPanel.display_app_info(x)
|
||||
)
|
||||
%ItchList.add_child(inst)
|
||||
|
||||
func clear() -> void:
|
||||
for node in %SteamList.get_children():
|
||||
node.queue_free()
|
||||
for node in %ItchList.get_children():
|
||||
node.queue_free()
|
||||
|
||||
%SteamAppPanel.clear()
|
||||
%ItchAppPanel.clear()
|
||||
1
UI/Panels/User/user_games.gd.uid
Normal file
1
UI/Panels/User/user_games.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://bj06jd8vt70im
|
||||
249
UI/Panels/User/user_games.tscn
Normal file
249
UI/Panels/User/user_games.tscn
Normal file
|
|
@ -0,0 +1,249 @@
|
|||
[gd_scene format=3 uid="uid://cojuxefo7cryj"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://bexdhdpprh6aa" path="res://assets/font_awesome/magnifying-glass-location.svg" id="1_7mil5"]
|
||||
[ext_resource type="Script" uid="uid://bj06jd8vt70im" path="res://UI/Panels/User/user_games.gd" id="1_myc1y"]
|
||||
[ext_resource type="Texture2D" uid="uid://4nae34ce8pjn" path="res://assets/bootstrap/plus-circle.svg" id="2_0hl8v"]
|
||||
[ext_resource type="Script" uid="uid://chgufd1youdel" path="res://lib/games_info/steam_service.gd" id="2_u0xo6"]
|
||||
[ext_resource type="Script" uid="uid://cyef5m8x5f7k6" path="res://lib/games_info/itch_io_service.gd" id="3_hk3mv"]
|
||||
[ext_resource type="PackedScene" uid="uid://685pgmw1cdw3" path="res://UI/Panels/steam_app_panel.tscn" id="3_j36q5"]
|
||||
[ext_resource type="Script" uid="uid://bllsv2cy6komw" path="res://lib/models/steam_app_data.gd" id="4_myc1y"]
|
||||
[ext_resource type="PackedScene" uid="uid://c0ahhupmdstxq" path="res://UI/Panels/itch_app_panel.tscn" id="8_hk3mv"]
|
||||
|
||||
[sub_resource type="Resource" id="Resource_hk3mv"]
|
||||
script = ExtResource("4_myc1y")
|
||||
steam_app_id = 3712430
|
||||
type = "game"
|
||||
name = "Carbrix"
|
||||
short_description = "Carbrix is a sci-fi inspired multiplayer vehicle-building sandbox game where creativity meets action. Design and construct anything you can imagine—from sleek cars and powerful trucks to futuristic planes, bikes, and rockets."
|
||||
detailed_description = "<p class=\"bb_paragraph\" ></p><p class=\"bb_paragraph\" style=\"text-align: center\"><span class=\"bb_img_ctn\"><img class=\"bb_img\" src=\"https://shared.akamai.steamstatic.com/store_item_assets/steam/apps/3712430/extras/ddedd3e2cbbbda0b12059974c2562381.avif?t=1771564874\" width=545 height=124 /></span></p><p class=\"bb_paragraph\" style=\"text-align: center\"></p><p class=\"bb_paragraph\" style=\"text-align: center\"><strong>Carbrix is a sci-fi inspired multiplayer vehicle-building sandbox game</strong> where creativity meets action. Design and construct anything you can imagine, from sleek cars and powerful trucks to futuristic planes, bikes, and rockets.</p><p class=\"bb_paragraph\" style=\"text-align: center\">Play solo or team up with friends in multiplayer to share your creations, race, battle, or simply explore endless possibilities. With intuitive building tools and a physics-driven world, Carbrix offers a playground of imagination, competition, and fun.</p><p class=\"bb_paragraph\" ></p><p class=\"bb_paragraph\" ></p><p class=\"bb_paragraph\" ></p><p class=\"bb_paragraph\" style=\"text-align: center\"><span class=\"bb_img_ctn\"><img class=\"bb_img\" src=\"https://shared.akamai.steamstatic.com/store_item_assets/steam/apps/3712430/extras/62d477ed4a8d0610fe41ebcfe4d80a5c.avif?t=1771564874\" width=592 height=124 /></span></p><p class=\"bb_paragraph\" style=\"text-align: center\">With <strong>Carbrix</strong>, you can build cars, trucks, planes, bikes—and so much more!</p><p class=\"bb_paragraph\" style=\"text-align: center\">Thanks to the intuitive building system, you can <strong>build, test, and drive</strong> with ease.</p><p class=\"bb_paragraph\" ></p><p class=\"bb_paragraph\" ></p><h2 class=\"bb_tag\" style=\"text-align: center\"><span class=\"bb_img_ctn\"><img class=\"bb_img\" src=\"https://shared.akamai.steamstatic.com/store_item_assets/steam/apps/3712430/extras/8c98159aaf423437bda13df2b30a2e5e.avif?t=1771564874\" width=905 height=121 /></span></h2><p class=\"bb_paragraph\" style=\"text-align: center\"><span class=\"bb_img_ctn\"><video class=\"bb_img\" autoplay muted loop playsinline crossorigin=\"anonymous\" poster=\"https://shared.akamai.steamstatic.com/store_item_assets/steam/apps/3712430/extras/3babe6402e31c20319d567a0821a29c3.poster.avif?t=1771564874\" width=640 height=360 ><source src=\"https://shared.akamai.steamstatic.com/store_item_assets/steam/apps/3712430/extras/3babe6402e31c20319d567a0821a29c3.webm?t=1771564874\" type=\"video/webm; codecs=vp9\"></video></span></p><p class=\"bb_paragraph\" style=\"text-align: center\">Looking for something to sink your teeth into?</p><p class=\"bb_paragraph\" style=\"text-align: center\">With the built-in destruction system, worry no more</p><p class=\"bb_paragraph\" style=\"text-align: center\">Create combat-oriented vehicles and battle your friends!</p><p class=\"bb_paragraph\" ></p><h2 class=\"bb_tag\" style=\"text-align: center\"><span class=\"bb_img_ctn\"><img class=\"bb_img\" src=\"https://shared.akamai.steamstatic.com/store_item_assets/steam/apps/3712430/extras/b54bb17deb785da3089c5b644e3f91ab.avif?t=1771564874\" width=923 height=121 /></span></h2><p class=\"bb_paragraph\" style=\"text-align: center\"><strong>With multiplayer, the fun never ends!</strong><br>Team up with your friends to build together—or challenge them in head-to-head battles.</p><p class=\"bb_paragraph\" style=\"text-align: center\">Take part in thrilling races, compete in creative build contests,<br>or just mess around and see who can come up with the wildest inventions.</p><p class=\"bb_paragraph\" style=\"text-align: center\">With so many ways to play, there’s always something new to try!</p><p class=\"bb_paragraph\" ></p><p class=\"bb_paragraph\" ></p><p class=\"bb_paragraph\" ></p>"
|
||||
header_image = "https://shared.akamai.steamstatic.com/store_item_assets/steam/apps/3712430/a18c9a286445c8553a4eac10ba42df6b96ce63ed/header.jpg?t=1771564874"
|
||||
capsule_image = "https://shared.akamai.steamstatic.com/store_item_assets/steam/apps/3712430/0e3354ecdcc92437b51dcc8a7ce5aec3c956d6b8/capsule_231x87.jpg?t=1771564874"
|
||||
capsule_imagev5 = "https://shared.akamai.steamstatic.com/store_item_assets/steam/apps/3712430/0e3354ecdcc92437b51dcc8a7ce5aec3c956d6b8/capsule_184x69.jpg?t=1771564874"
|
||||
developers = Array[String](["Redston4D"])
|
||||
publishers = Array[String](["Redston4D"])
|
||||
platforms = {
|
||||
"linux": true,
|
||||
"mac": false,
|
||||
"windows": true
|
||||
}
|
||||
genres = Array[Dictionary]([{
|
||||
"description": "Action",
|
||||
"id": "1"
|
||||
}, {
|
||||
"description": "Adventure",
|
||||
"id": "25"
|
||||
}, {
|
||||
"description": "Casual",
|
||||
"id": "4"
|
||||
}, {
|
||||
"description": "Indie",
|
||||
"id": "23"
|
||||
}, {
|
||||
"description": "Racing",
|
||||
"id": "9"
|
||||
}, {
|
||||
"description": "Simulation",
|
||||
"id": "28"
|
||||
}])
|
||||
release_date = {
|
||||
"coming_soon": true,
|
||||
"date": "Coming soon"
|
||||
}
|
||||
screenshots_full = Array[String](["https://shared.akamai.steamstatic.com/store_item_assets/steam/apps/3712430/4a0c3b9405921fd84ee530e87c4bb49e5bac47d5/ss_4a0c3b9405921fd84ee530e87c4bb49e5bac47d5.1920x1080.jpg?t=1771564874", "https://shared.akamai.steamstatic.com/store_item_assets/steam/apps/3712430/c3bfb9c95fafd7e2e42bf22b2e1a6324202ff3b3/ss_c3bfb9c95fafd7e2e42bf22b2e1a6324202ff3b3.1920x1080.jpg?t=1771564874", "https://shared.akamai.steamstatic.com/store_item_assets/steam/apps/3712430/41a0157dabd641a59f561befa2d36687405f906c/ss_41a0157dabd641a59f561befa2d36687405f906c.1920x1080.jpg?t=1771564874", "https://shared.akamai.steamstatic.com/store_item_assets/steam/apps/3712430/d6440c8c03850fa478c8c845561c6729bf69b981/ss_d6440c8c03850fa478c8c845561c6729bf69b981.1920x1080.jpg?t=1771564874", "https://shared.akamai.steamstatic.com/store_item_assets/steam/apps/3712430/8c8af6ab67b663d1860e5ebdfe3943eebe85e222/ss_8c8af6ab67b663d1860e5ebdfe3943eebe85e222.1920x1080.jpg?t=1771564874", "https://shared.akamai.steamstatic.com/store_item_assets/steam/apps/3712430/7ebb66440d8eef2e94a818d95f0805f89ca881d3/ss_7ebb66440d8eef2e94a818d95f0805f89ca881d3.1920x1080.jpg?t=1771564874"])
|
||||
screenshots_thumbs = Array[String](["https://shared.akamai.steamstatic.com/store_item_assets/steam/apps/3712430/4a0c3b9405921fd84ee530e87c4bb49e5bac47d5/ss_4a0c3b9405921fd84ee530e87c4bb49e5bac47d5.600x338.jpg?t=1771564874", "https://shared.akamai.steamstatic.com/store_item_assets/steam/apps/3712430/c3bfb9c95fafd7e2e42bf22b2e1a6324202ff3b3/ss_c3bfb9c95fafd7e2e42bf22b2e1a6324202ff3b3.600x338.jpg?t=1771564874", "https://shared.akamai.steamstatic.com/store_item_assets/steam/apps/3712430/41a0157dabd641a59f561befa2d36687405f906c/ss_41a0157dabd641a59f561befa2d36687405f906c.600x338.jpg?t=1771564874", "https://shared.akamai.steamstatic.com/store_item_assets/steam/apps/3712430/d6440c8c03850fa478c8c845561c6729bf69b981/ss_d6440c8c03850fa478c8c845561c6729bf69b981.600x338.jpg?t=1771564874", "https://shared.akamai.steamstatic.com/store_item_assets/steam/apps/3712430/8c8af6ab67b663d1860e5ebdfe3943eebe85e222/ss_8c8af6ab67b663d1860e5ebdfe3943eebe85e222.600x338.jpg?t=1771564874", "https://shared.akamai.steamstatic.com/store_item_assets/steam/apps/3712430/7ebb66440d8eef2e94a818d95f0805f89ca881d3/ss_7ebb66440d8eef2e94a818d95f0805f89ca881d3.600x338.jpg?t=1771564874"])
|
||||
categories = Array[Dictionary]([{
|
||||
"description": "Single-player",
|
||||
"id": 2.0
|
||||
}, {
|
||||
"description": "Multi-player",
|
||||
"id": 1.0
|
||||
}, {
|
||||
"description": "PvP",
|
||||
"id": 49.0
|
||||
}, {
|
||||
"description": "Online PvP",
|
||||
"id": 36.0
|
||||
}, {
|
||||
"description": "Co-op",
|
||||
"id": 9.0
|
||||
}, {
|
||||
"description": "Online Co-op",
|
||||
"id": 38.0
|
||||
}, {
|
||||
"description": "Steam Achievements",
|
||||
"id": 22.0
|
||||
}, {
|
||||
"description": "Steam Workshop",
|
||||
"id": 30.0
|
||||
}, {
|
||||
"description": "Custom Volume Controls",
|
||||
"id": 68.0
|
||||
}, {
|
||||
"description": "Adjustable Difficulty",
|
||||
"id": 78.0
|
||||
}, {
|
||||
"description": "Playable without Timed Input",
|
||||
"id": 74.0
|
||||
}, {
|
||||
"description": "Save Anytime",
|
||||
"id": 79.0
|
||||
}, {
|
||||
"description": "Stereo Sound",
|
||||
"id": 69.0
|
||||
}, {
|
||||
"description": "Surround Sound",
|
||||
"id": 70.0
|
||||
}, {
|
||||
"description": "Partial Controller Support",
|
||||
"id": 18.0
|
||||
}, {
|
||||
"description": "Family Sharing",
|
||||
"id": 62.0
|
||||
}])
|
||||
pc_requirements = "<strong>Minimum:</strong><br><ul class=\"bb_ul\"><li>Requires a 64-bit processor and operating system<br></li><li><strong>OS *:</strong> Windows 7 +<br></li><li><strong>Processor:</strong> Intel Core i5-4670k<br></li><li><strong>Memory:</strong> 8 GB RAM<br></li><li><strong>Graphics:</strong> Intel HD 4600 Graphics<br></li><li><strong>DirectX:</strong> Version 12<br></li><li><strong>Storage:</strong> 1 GB available space<br></li><li><strong>Additional Notes:</strong> Please make sure your GraphicsCard has vulkan</li></ul>"
|
||||
mac_requirements = "{ \"minimum\": \"<strong>Minimum:</strong><br><ul class=\\\"bb_ul\\\"></ul>\", \"recommended\": \"<strong>Recommended:</strong><br><ul class=\\\"bb_ul\\\"></ul>\" }"
|
||||
linux_requirements = "{ \"minimum\": \"<strong>Minimum:</strong><br><ul class=\\\"bb_ul\\\"><li><strong>Processor:</strong> Intel Core i5-4670k<br></li><li><strong>Memory:</strong> 8 GB RAM<br></li><li><strong>Graphics:</strong> Please make sure your GraphicsCard has vulkan<br></li><li><strong>Storage:</strong> 1 GB available space</li></ul>\", \"recommended\": \"<strong>Recommended:</strong><br><ul class=\\\"bb_ul\\\"><li><strong>Processor:</strong> Intel Core i5-8500<br></li><li><strong>Memory:</strong> 16 GB RAM<br></li><li><strong>Graphics:</strong> Please make sure your GraphicsCard has vulkan<br></li><li><strong>Storage:</strong> 1 GB available space</li></ul>\" }"
|
||||
support_email = "CarbrixGame@gmail.com"
|
||||
background_image = "https://store.akamai.steamstatic.com/images/storepagebackground/app/3712430?t=1771564874"
|
||||
background_image_raw = "https://store.akamai.steamstatic.com/images/storepagebackground/app/3712430?t=1771564874"
|
||||
|
||||
[node name="UserGames" type="PanelContainer" unique_id=2022365407]
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
script = ExtResource("1_myc1y")
|
||||
|
||||
[node name="SteamService" type="Node" parent="." unique_id=1181960445]
|
||||
unique_name_in_owner = true
|
||||
script = ExtResource("2_u0xo6")
|
||||
metadata/_custom_type_script = "uid://chgufd1youdel"
|
||||
|
||||
[node name="ItchIOService" type="Node" parent="." unique_id=400309790]
|
||||
unique_name_in_owner = true
|
||||
script = ExtResource("3_hk3mv")
|
||||
metadata/_custom_type_script = "uid://cyef5m8x5f7k6"
|
||||
|
||||
[node name="Splitter" type="HSplitContainer" parent="." unique_id=182228020]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
split_offsets = PackedInt32Array(530)
|
||||
split_offset = 530
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="Splitter" unique_id=869345086]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Label" type="Label" parent="Splitter/VBoxContainer" unique_id=385647229]
|
||||
layout_mode = 2
|
||||
text = "Games"
|
||||
horizontal_alignment = 1
|
||||
|
||||
[node name="HSeparator" type="HSeparator" parent="Splitter/VBoxContainer" unique_id=1347394535]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="Splitter/VBoxContainer" unique_id=123570347]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 3
|
||||
|
||||
[node name="SteamColumn" type="VBoxContainer" parent="Splitter/VBoxContainer/HBoxContainer" unique_id=1965017268]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
|
||||
[node name="SteamSearch" type="HBoxContainer" parent="Splitter/VBoxContainer/HBoxContainer/SteamColumn" unique_id=476996992]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="SteamGameInput" type="LineEdit" parent="Splitter/VBoxContainer/HBoxContainer/SteamColumn/SteamSearch" unique_id=135652688]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
placeholder_text = "steam app id or url"
|
||||
|
||||
[node name="SteamSearch" type="Button" parent="Splitter/VBoxContainer/HBoxContainer/SteamColumn/SteamSearch" unique_id=1427348414]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(32, 32)
|
||||
layout_mode = 2
|
||||
icon = ExtResource("1_7mil5")
|
||||
icon_alignment = 1
|
||||
expand_icon = true
|
||||
|
||||
[node name="AddSteamGame" type="Button" parent="Splitter/VBoxContainer/HBoxContainer/SteamColumn/SteamSearch" unique_id=1199771317]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(32, 32)
|
||||
layout_mode = 2
|
||||
icon = ExtResource("2_0hl8v")
|
||||
icon_alignment = 1
|
||||
expand_icon = true
|
||||
|
||||
[node name="PanelContainer" type="PanelContainer" parent="Splitter/VBoxContainer/HBoxContainer/SteamColumn" unique_id=1782797010]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 3
|
||||
|
||||
[node name="ScrollContainer" type="ScrollContainer" parent="Splitter/VBoxContainer/HBoxContainer/SteamColumn/PanelContainer" unique_id=1538765940]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="SteamList" type="VBoxContainer" parent="Splitter/VBoxContainer/HBoxContainer/SteamColumn/PanelContainer/ScrollContainer" unique_id=788126228]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
|
||||
[node name="VSeparator" type="VSeparator" parent="Splitter/VBoxContainer/HBoxContainer" unique_id=220505221]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="ItchColumn" type="VBoxContainer" parent="Splitter/VBoxContainer/HBoxContainer" unique_id=1035792899]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
|
||||
[node name="ItchSearch" type="HBoxContainer" parent="Splitter/VBoxContainer/HBoxContainer/ItchColumn" unique_id=58917565]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="ItchInput" type="LineEdit" parent="Splitter/VBoxContainer/HBoxContainer/ItchColumn/ItchSearch" unique_id=81918204]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
placeholder_text = "itch.io link"
|
||||
|
||||
[node name="ItchFetch" type="Button" parent="Splitter/VBoxContainer/HBoxContainer/ItchColumn/ItchSearch" unique_id=1917953068]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(32, 32)
|
||||
layout_mode = 2
|
||||
icon = ExtResource("1_7mil5")
|
||||
icon_alignment = 1
|
||||
expand_icon = true
|
||||
|
||||
[node name="ItchAdd" type="Button" parent="Splitter/VBoxContainer/HBoxContainer/ItchColumn/ItchSearch" unique_id=1726319206]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(32, 32)
|
||||
layout_mode = 2
|
||||
icon = ExtResource("2_0hl8v")
|
||||
icon_alignment = 1
|
||||
expand_icon = true
|
||||
|
||||
[node name="PanelContainer" type="PanelContainer" parent="Splitter/VBoxContainer/HBoxContainer/ItchColumn" unique_id=1055230274]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 3
|
||||
|
||||
[node name="ScrollContainer" type="ScrollContainer" parent="Splitter/VBoxContainer/HBoxContainer/ItchColumn/PanelContainer" unique_id=1143536360]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="ItchList" type="VBoxContainer" parent="Splitter/VBoxContainer/HBoxContainer/ItchColumn/PanelContainer/ScrollContainer" unique_id=1691269823]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
|
||||
[node name="TabContainer" type="TabContainer" parent="Splitter" unique_id=298665581]
|
||||
layout_mode = 2
|
||||
current_tab = 1
|
||||
tabs_visible = false
|
||||
|
||||
[node name="SteamAppPanel" parent="Splitter/TabContainer" unique_id=597550935 instance=ExtResource("3_j36q5")]
|
||||
unique_name_in_owner = true
|
||||
visible = false
|
||||
layout_mode = 2
|
||||
test_data = SubResource("Resource_hk3mv")
|
||||
metadata/_tab_index = 0
|
||||
|
||||
[node name="ItchAppPanel" parent="Splitter/TabContainer" unique_id=691251029 instance=ExtResource("8_hk3mv")]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
metadata/_tab_index = 1
|
||||
65
UI/Panels/User/user_promo.gd
Normal file
65
UI/Panels/User/user_promo.gd
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
extends PanelContainer
|
||||
|
||||
var chatter: Chatter:
|
||||
set(value):
|
||||
chatter = value
|
||||
if not chatter:
|
||||
_clear_promos()
|
||||
return
|
||||
_populate_promos()
|
||||
|
||||
func _ready() -> void:
|
||||
for btn in [%Streamer, %Shoutout, %Promote]:
|
||||
btn.pressed.connect(_update_promos)
|
||||
for le in [%YouTubeHandle, %BlueSkyHandle, %WebSite, %ShoutoutMessage, %PromotionMessage]:
|
||||
le.text_changed.connect(_update_promos)
|
||||
if not chatter: return
|
||||
_populate_promos()
|
||||
|
||||
func _clear_promos() -> void:
|
||||
%Streamer.button_pressed = false
|
||||
%Shoutout.button_pressed = false
|
||||
%Promote.button_pressed = false
|
||||
%YouTubeHandle.text = ""
|
||||
%BlueSkyHandle.text = ""
|
||||
%WebSite.text = ""
|
||||
%ShoutoutMessage.text = ""
|
||||
%PromotionMessage.text = ""
|
||||
|
||||
func _populate_promos() -> void:
|
||||
%Streamer.button_pressed = chatter.is_streamer
|
||||
%Shoutout.button_pressed = chatter.auto_shoutout
|
||||
%Promote.button_pressed = chatter.extra_data.has("auto-promo")
|
||||
%YouTubeHandle.text = chatter.urls.youtube if chatter.urls.has("youtube") else ""
|
||||
%BlueSkyHandle.text = chatter.urls.bluesky if chatter.urls.has("bluesky") else ""
|
||||
%WebSite.text = chatter.urls.website if chatter.urls.has("website") else ""
|
||||
%ShoutoutMessage.text = chatter.extra_data.shoutout_message if chatter.extra_data.has("shoutout_message") else ""
|
||||
%PromotionMessage.text = chatter.extra_data.promotion_message if chatter.extra_data.has("promotion_message") else ""
|
||||
|
||||
func _update_promos() -> void:
|
||||
if not chatter: return
|
||||
chatter.is_streamer = %Streamer.button_pressed
|
||||
chatter.auto_shoutout = %Shoutout.button_pressed
|
||||
chatter.extra_data["auto_promo"] = %Promote.button_pressed
|
||||
if %YouTubeHandle.text != "":
|
||||
chatter.urls["youtube"] = %YouTubeHandle.text
|
||||
else:
|
||||
chatter.urls.erase("youtube")
|
||||
if %BlueSkyHandle.text != "":
|
||||
chatter.urls["bluesky"] = %BlueSkyHandle.text
|
||||
else:
|
||||
chatter.urls.erase("bluesky")
|
||||
if %WebSite.text != "":
|
||||
chatter.urls["website"] = %WebSite.text
|
||||
else:
|
||||
chatter.urls.erase("website")
|
||||
if %ShoutoutMessage.text != "":
|
||||
chatter.extra_data.shoutout_message = %ShoutoutMessage.text
|
||||
else:
|
||||
chatter.extra_data.erase("shoutout_message")
|
||||
if %PromotionMessage.text != "":
|
||||
chatter.extra_data.promotion_message = %PromotionMessage.text
|
||||
else:
|
||||
chatter.extra_data.erase("promotion_message")
|
||||
|
||||
chatter.save()
|
||||
1
UI/Panels/User/user_promo.gd.uid
Normal file
1
UI/Panels/User/user_promo.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://8frnm7cda0ht
|
||||
155
UI/Panels/User/user_promo.tscn
Normal file
155
UI/Panels/User/user_promo.tscn
Normal file
|
|
@ -0,0 +1,155 @@
|
|||
[gd_scene format=3 uid="uid://cadil3rnqh61e"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://8frnm7cda0ht" path="res://UI/Panels/User/user_promo.gd" id="1_jcejw"]
|
||||
[ext_resource type="Texture2D" uid="uid://cup1m40podywb" path="res://assets/bootstrap/megaphone-fill.svg" id="1_nwev1"]
|
||||
[ext_resource type="Texture2D" uid="uid://dp06rjedx170o" path="res://assets/bootstrap/globe2.svg" id="2_jcejw"]
|
||||
|
||||
[node name="UserPromo" type="PanelContainer" unique_id=1364169576]
|
||||
offset_right = 406.0
|
||||
offset_bottom = 136.0
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
script = ExtResource("1_jcejw")
|
||||
|
||||
[node name="ScrollContainer" type="ScrollContainer" parent="." unique_id=1229873159]
|
||||
layout_mode = 2
|
||||
horizontal_scroll_mode = 0
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="ScrollContainer" unique_id=120163548]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="ScrollContainer/VBoxContainer" unique_id=98113976]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Streamer" type="CheckButton" parent="ScrollContainer/VBoxContainer/HBoxContainer" unique_id=737955603]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
text = "Streamer"
|
||||
|
||||
[node name="Shoutout" type="CheckButton" parent="ScrollContainer/VBoxContainer/HBoxContainer" unique_id=378103028]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
text = "Shoutout"
|
||||
|
||||
[node name="Promote" type="CheckButton" parent="ScrollContainer/VBoxContainer/HBoxContainer" unique_id=929607483]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
text = "Auto-Promote"
|
||||
|
||||
[node name="WorksWith" type="HBoxContainer" parent="ScrollContainer/VBoxContainer" unique_id=1239050314]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
|
||||
[node name="Label" type="Label" parent="ScrollContainer/VBoxContainer/WorksWith" unique_id=400379538]
|
||||
custom_minimum_size = Vector2(100, 0)
|
||||
layout_mode = 2
|
||||
text = "Works with"
|
||||
|
||||
[node name="OptionButton" type="OptionButton" parent="ScrollContainer/VBoxContainer/WorksWith" unique_id=1872170308]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
|
||||
[node name="YouTube" type="HBoxContainer" parent="ScrollContainer/VBoxContainer" unique_id=1207903264]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
|
||||
[node name="Label" type="Label" parent="ScrollContainer/VBoxContainer/YouTube" unique_id=1593070954]
|
||||
custom_minimum_size = Vector2(100, 0)
|
||||
layout_mode = 2
|
||||
text = "YouTube"
|
||||
|
||||
[node name="YtPromo" type="Button" parent="ScrollContainer/VBoxContainer/YouTube" unique_id=1096467567]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(24, 24)
|
||||
layout_mode = 2
|
||||
icon = ExtResource("1_nwev1")
|
||||
icon_alignment = 1
|
||||
expand_icon = true
|
||||
|
||||
[node name="YtLink" type="Button" parent="ScrollContainer/VBoxContainer/YouTube" unique_id=50317293]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(24, 24)
|
||||
layout_mode = 2
|
||||
icon = ExtResource("2_jcejw")
|
||||
icon_alignment = 1
|
||||
expand_icon = true
|
||||
|
||||
[node name="YouTubeHandle" type="LineEdit" parent="ScrollContainer/VBoxContainer/YouTube" unique_id=603065520]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
placeholder_text = "YouTube @handle"
|
||||
|
||||
[node name="BlueSky" type="HBoxContainer" parent="ScrollContainer/VBoxContainer" unique_id=1489223257]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
|
||||
[node name="Label" type="Label" parent="ScrollContainer/VBoxContainer/BlueSky" unique_id=381069814]
|
||||
custom_minimum_size = Vector2(100, 0)
|
||||
layout_mode = 2
|
||||
text = "Bluesky"
|
||||
|
||||
[node name="BsPromo" type="Button" parent="ScrollContainer/VBoxContainer/BlueSky" unique_id=658543783]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(24, 24)
|
||||
layout_mode = 2
|
||||
icon = ExtResource("1_nwev1")
|
||||
icon_alignment = 1
|
||||
expand_icon = true
|
||||
|
||||
[node name="BsLink" type="Button" parent="ScrollContainer/VBoxContainer/BlueSky" unique_id=1961953027]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(24, 24)
|
||||
layout_mode = 2
|
||||
icon = ExtResource("2_jcejw")
|
||||
icon_alignment = 1
|
||||
expand_icon = true
|
||||
|
||||
[node name="BlueSkyHandle" type="LineEdit" parent="ScrollContainer/VBoxContainer/BlueSky" unique_id=360439078]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
placeholder_text = "b.sky @handle"
|
||||
|
||||
[node name="WebSite" type="HBoxContainer" parent="ScrollContainer/VBoxContainer" unique_id=573488452]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
|
||||
[node name="Label" type="Label" parent="ScrollContainer/VBoxContainer/WebSite" unique_id=1373223946]
|
||||
custom_minimum_size = Vector2(100, 0)
|
||||
layout_mode = 2
|
||||
text = "Website"
|
||||
|
||||
[node name="WsPromo" type="Button" parent="ScrollContainer/VBoxContainer/WebSite" unique_id=973904899]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(24, 24)
|
||||
layout_mode = 2
|
||||
icon = ExtResource("1_nwev1")
|
||||
icon_alignment = 1
|
||||
expand_icon = true
|
||||
|
||||
[node name="WsLink" type="Button" parent="ScrollContainer/VBoxContainer/WebSite" unique_id=666822841]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(24, 24)
|
||||
layout_mode = 2
|
||||
icon = ExtResource("2_jcejw")
|
||||
icon_alignment = 1
|
||||
expand_icon = true
|
||||
|
||||
[node name="WebSite" type="LineEdit" parent="ScrollContainer/VBoxContainer/WebSite" unique_id=1937578185]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
placeholder_text = "https://"
|
||||
|
||||
[node name="ShoutoutMessage" type="LineEdit" parent="ScrollContainer/VBoxContainer" unique_id=1766315801]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
placeholder_text = "shoutout message"
|
||||
|
||||
[node name="PromotionMessage" type="LineEdit" parent="ScrollContainer/VBoxContainer" unique_id=1002295180]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
placeholder_text = "promotion message"
|
||||
Loading…
Add table
Add a link
Reference in a new issue