Skip to content

Commit

Permalink
fix(Power Menu): add blur + tint
Browse files Browse the repository at this point in the history
  • Loading branch information
ShadowApex committed Dec 22, 2024
1 parent be20be9 commit e2e41be
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 6 deletions.
4 changes: 0 additions & 4 deletions core/ui/card_ui/power/power_menu.gd
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,6 @@ func _ready() -> void:
exit_button.button_down.connect(_on_exit)
cancel_button.button_up.connect(_on_cancel)

var on_visible_changed := func():
set_process(visible)
visibility_changed.connect(set_process)


func _on_state_entered(_from: State) -> void:
if focus_group:
Expand Down
24 changes: 22 additions & 2 deletions core/ui/card_ui/power/power_menu.tscn
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[gd_scene load_steps=13 format=3 uid="uid://lfm3ps837gy5"]
[gd_scene load_steps=15 format=3 uid="uid://lfm3ps837gy5"]

[ext_resource type="Script" path="res://core/ui/card_ui/power/power_menu.gd" id="2_0vc46"]
[ext_resource type="Shader" path="res://assets/shaders/simple_blur.gdshader" id="2_hkifr"]
[ext_resource type="PackedScene" uid="uid://c6fg6uvng0ovi" path="res://core/systems/input/input_watcher.tscn" id="3_1whtm"]
[ext_resource type="PackedScene" uid="uid://b76dvfuouhlwd" path="res://core/systems/state/state_updater.tscn" id="4_4rhfl"]
[ext_resource type="Resource" uid="uid://cadriyl38ny5y" path="res://assets/state/state_machines/popup_state_machine.tres" id="5_kxixy"]
Expand All @@ -12,6 +13,12 @@
[ext_resource type="PackedScene" uid="uid://dithv38oqgy58" path="res://core/ui/components/section_label.tscn" id="10_y3iyf"]
[ext_resource type="PackedScene" uid="uid://c71ayw7pcw6u6" path="res://core/ui/components/card_button.tscn" id="12_2pwjc"]

[sub_resource type="ShaderMaterial" id="ShaderMaterial_v0ws8"]
shader = ExtResource("2_hkifr")
shader_parameter/blur_amount = 1.578
shader_parameter/mix_amount = null
shader_parameter/color_over = Color(0, 0, 0, 0)

[sub_resource type="Resource" id="Resource_fafkw"]
script = ExtResource("10_6ywv6")

Expand All @@ -25,14 +32,27 @@ grow_horizontal = 2
grow_vertical = 2
script = ExtResource("2_0vc46")

[node name="BackBufferCopy" type="BackBufferCopy" parent="."]
copy_mode = 2

[node name="ColorRect" type="ColorRect" parent="."]
material = SubResource("ShaderMaterial_v0ws8")
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
color = Color(0, 0, 0, 1)

[node name="ColorRect2" type="ColorRect" parent="."]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
color = Color(0, 0, 0, 0.686275)
color = Color(0, 0, 0, 0.666667)

[node name="InputWatcher" parent="." instance=ExtResource("3_1whtm")]
stop_propagation = true
Expand Down

0 comments on commit e2e41be

Please sign in to comment.