-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from fenix-hub/dev
Dev
- Loading branch information
Showing
12 changed files
with
97 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,3 @@ | ||
extends SPanel | ||
|
||
|
||
# Declare member variables here. Examples: | ||
# var a = 2 | ||
# var b = "text" | ||
|
||
|
||
# Called when the node enters the scene tree for the first time. | ||
func _ready(): | ||
pass # Replace with function body. | ||
|
||
|
||
# Called every frame. 'delta' is the elapsed time since the previous frame. | ||
#func _process(delta): | ||
# pass | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
[gd_scene load_steps=3 format=2] | ||
|
||
[ext_resource path="res://supabase-ui/basic/containers/popup/popup.gd" type="Script" id=1] | ||
|
||
[sub_resource type="StyleBoxFlat" id=1] | ||
resource_local_to_scene = true | ||
content_margin_left = 20.0 | ||
content_margin_right = 20.0 | ||
content_margin_top = 20.0 | ||
content_margin_bottom = 20.0 | ||
bg_color = Color( 0.164706, 0.164706, 0.164706, 1 ) | ||
border_width_left = 1 | ||
border_width_top = 1 | ||
border_width_right = 1 | ||
border_width_bottom = 1 | ||
corner_radius_top_left = 5 | ||
corner_radius_top_right = 5 | ||
corner_radius_bottom_right = 5 | ||
corner_radius_bottom_left = 5 | ||
corner_detail = 20 | ||
|
||
[node name="Popup" type="PopupPanel"] | ||
margin_right = 40.0 | ||
margin_bottom = 40.0 | ||
mouse_filter = 2 | ||
size_flags_horizontal = 0 | ||
size_flags_vertical = 0 | ||
custom_styles/panel = SubResource( 1 ) | ||
script = ExtResource( 1 ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
tool | ||
class_name SPopup | ||
extends PopupPanel | ||
|
||
signal pressed() | ||
|
||
const colors : Dictionary = { | ||
"panel" : [Color.white, Color("#2a2a2a")] | ||
} | ||
|
||
export (int, "Light Mode", "Dark Mode") var mode : int = 0 setget set_mode | ||
|
||
func _ready(): | ||
add_to_group("supabase_components") | ||
|
||
func set_mode(_mode : int) : | ||
mode = _mode | ||
get("custom_styles/panel").set("bg_color", colors.panel[mode]) | ||
|
||
func _force_resize() : | ||
hide() | ||
show() | ||
|
||
|
||
func _on_Panel_gui_input(event): | ||
if event is InputEventMouseButton: | ||
if event.get_button_index() == 1 and event.is_pressed(): | ||
emit_signal("pressed") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
extends SPopup |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters