feat: add battlepass slider and quest list tabs to lobby HUD

This commit is contained in:
2026-07-09 18:25:07 +08:00
parent 114748a54f
commit 933119ca56
99 changed files with 3861 additions and 417 deletions
+13
View File
@@ -0,0 +1,13 @@
shader_type canvas_item;
#include "res://assets/shaders/rounded_border.gdshaderinc"
uniform vec2 rect_size = vec2(270.0, 108.0);
uniform vec4 corner_radius = vec4(20.0, 20.0, 20.0, 20.0); // top-right, bottom-right, top-left, bottom-left
uniform float border_width : hint_range(0.0, 50.0) = 3.0;
uniform vec4 border_color : source_color = vec4(0.06666667, 0.13333334, 0.1882353, 1.0);
void fragment() {
vec4 tex_color = texture(TEXTURE, UV) * COLOR;
COLOR = apply_rounded_border(tex_color, UV, rect_size, corner_radius, border_width, border_color);
}
@@ -0,0 +1 @@
uid://cjpl2gt2fc1h2
+21
View File
@@ -0,0 +1,21 @@
float rounded_box_sdf(vec2 p, vec2 half_size, vec4 r) {
r.xy = (p.x > 0.0) ? r.xy : r.zw;
r.x = (p.y > 0.0) ? r.x : r.y;
vec2 q = abs(p) - half_size + r.x;
return min(max(q.x, q.y), 0.0) + length(max(q, 0.0)) - r.x;
}
vec4 apply_rounded_border(vec4 base_color, vec2 uv, vec2 rect_size, vec4 corner_radius, float border_width, vec4 border_color) {
vec2 px = uv * rect_size;
vec2 centered = px - rect_size * 0.5;
vec2 half_size = rect_size * 0.5;
float d = rounded_box_sdf(centered, half_size, corner_radius);
float aa = 1.0;
float shape_alpha = 1.0 - smoothstep(-aa, aa, d);
float border_mask = 1.0 - smoothstep(border_width - aa, border_width + aa, -d);
vec4 col = mix(base_color, border_color, border_mask);
col.a *= shape_alpha;
return col;
}
@@ -0,0 +1 @@
uid://blepo5lsqvih7
@@ -0,0 +1,24 @@
shader_type canvas_item;
#include "res://assets/shaders/rounded_border.gdshaderinc"
uniform float blur_amount : hint_range(0.0, 1.0) = 0.0;
uniform float blur_radius_px : hint_range(0.0, 32.0) = 14.0;
uniform vec2 rect_size = vec2(100.0, 108.0);
uniform vec4 corner_radius = vec4(35.0, 35.0, 12.0, 12.0); // top-right, bottom-right, top-left, bottom-left
uniform float border_width : hint_range(0.0, 50.0) = 3.0;
uniform vec4 border_color : source_color = vec4(0.06666667, 0.13333334, 0.1882353, 1.0);
void fragment() {
vec2 px = TEXTURE_PIXEL_SIZE * blur_radius_px * blur_amount;
vec4 sum = texture(TEXTURE, UV) * 2.0;
float total_weight = 2.0;
for (int i = 0; i < 8; i++) {
float angle = float(i) * 0.7853981634; // TAU / 8
vec2 offset = vec2(cos(angle), sin(angle)) * px;
sum += texture(TEXTURE, UV + offset);
total_weight += 1.0;
}
vec4 tex_color = (sum / total_weight) * COLOR;
COLOR = apply_rounded_border(tex_color, UV, rect_size, corner_radius, border_width, border_color);
}
@@ -0,0 +1 @@
uid://dmsw38nbm2val