├── .gitattributes
├── supabase-ui
├── basic
│ ├── containers
│ │ ├── popup
│ │ │ ├── popup.gd
│ │ │ ├── _popup.gd
│ │ │ └── Popup.tscn
│ │ └── panel
│ │ │ ├── panel.gd
│ │ │ ├── _panel.gd
│ │ │ └── Panel.tscn
│ ├── button
│ │ ├── text
│ │ │ ├── text_button.gd
│ │ │ ├── TextButton.tres
│ │ │ └── TextButton.tscn
│ │ ├── outline
│ │ │ ├── outline_button.gd
│ │ │ ├── OutlineButton.tres
│ │ │ └── OutlineButton.tscn
│ │ ├── link
│ │ │ ├── link_button.gd
│ │ │ ├── LinkButton.tres
│ │ │ ├── Link.tscn
│ │ │ └── LinkButton.tscn
│ │ ├── primary
│ │ │ ├── PrimaryButton.tres
│ │ │ ├── primary_button.gd
│ │ │ └── PrimaryButton.tscn
│ │ └── default
│ │ │ ├── DefaultButton.tres
│ │ │ ├── DefaultButton.tscn
│ │ │ └── default_button.gd
│ └── typography
│ │ ├── error_label
│ │ ├── ErrorLabel.tscn
│ │ └── err_label.gd
│ │ └── base_label
│ │ ├── BaseLabel.tscn
│ │ └── label.gd
├── res
│ ├── icons
│ │ ├── checkbox.png
│ │ ├── un_checkbox.png
│ │ ├── dark_mode_white_24dp.svg
│ │ ├── question_mark.svg
│ │ ├── key.svg.import
│ │ ├── lock.svg.import
│ │ ├── email.svg.import
│ │ ├── inbox.svg.import
│ │ ├── loader.svg.import
│ │ ├── loading.svg.import
│ │ ├── checkbox.png.import
│ │ ├── loader-line.svg.import
│ │ ├── un_checkbox.png.import
│ │ ├── question_mark.svg.import
│ │ ├── dark_mode_white_24dp.svg.import
│ │ ├── light_mode_white_36dp.svg.import
│ │ ├── light_mode_white_36dp.svg
│ │ ├── email.svg
│ │ ├── key.svg
│ │ ├── lock.svg
│ │ ├── loader-line.svg
│ │ ├── inbox.svg
│ │ ├── loader.svg
│ │ └── loading.svg
│ └── fonts
│ │ └── roboto
│ │ ├── Roboto-Bold.ttf
│ │ ├── Roboto-Thin.ttf
│ │ ├── Roboto-Black.ttf
│ │ ├── Roboto-Italic.ttf
│ │ ├── Roboto-Light.ttf
│ │ ├── Roboto-Medium.ttf
│ │ └── Roboto-Regular.ttf
├── components
│ ├── mode_btn
│ │ ├── mode_btn.gd
│ │ └── ModeBtn.tscn
│ └── auth
│ │ ├── auth.gd
│ │ └── Auth.tscn
└── data_input
│ ├── checkbox
│ ├── Checkbox.tscn
│ └── checkbox.gd
│ └── input
│ ├── Input.tscn
│ └── input.gd
├── README.md
├── .gitignore
└── LICENSE
/.gitattributes:
--------------------------------------------------------------------------------
1 | * text=auto
2 |
3 | imgs/ export-ignore
--------------------------------------------------------------------------------
/supabase-ui/basic/containers/popup/popup.gd:
--------------------------------------------------------------------------------
1 | extends SPopup
2 |
--------------------------------------------------------------------------------
/supabase-ui/basic/containers/panel/panel.gd:
--------------------------------------------------------------------------------
1 | extends SPanel
2 |
3 |
4 |
--------------------------------------------------------------------------------
/supabase-ui/res/icons/checkbox.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fenix-hub/godot-engine.supabase-ui/HEAD/supabase-ui/res/icons/checkbox.png
--------------------------------------------------------------------------------
/supabase-ui/res/icons/un_checkbox.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fenix-hub/godot-engine.supabase-ui/HEAD/supabase-ui/res/icons/un_checkbox.png
--------------------------------------------------------------------------------
/supabase-ui/res/fonts/roboto/Roboto-Bold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fenix-hub/godot-engine.supabase-ui/HEAD/supabase-ui/res/fonts/roboto/Roboto-Bold.ttf
--------------------------------------------------------------------------------
/supabase-ui/res/fonts/roboto/Roboto-Thin.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fenix-hub/godot-engine.supabase-ui/HEAD/supabase-ui/res/fonts/roboto/Roboto-Thin.ttf
--------------------------------------------------------------------------------
/supabase-ui/res/fonts/roboto/Roboto-Black.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fenix-hub/godot-engine.supabase-ui/HEAD/supabase-ui/res/fonts/roboto/Roboto-Black.ttf
--------------------------------------------------------------------------------
/supabase-ui/res/fonts/roboto/Roboto-Italic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fenix-hub/godot-engine.supabase-ui/HEAD/supabase-ui/res/fonts/roboto/Roboto-Italic.ttf
--------------------------------------------------------------------------------
/supabase-ui/res/fonts/roboto/Roboto-Light.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fenix-hub/godot-engine.supabase-ui/HEAD/supabase-ui/res/fonts/roboto/Roboto-Light.ttf
--------------------------------------------------------------------------------
/supabase-ui/res/fonts/roboto/Roboto-Medium.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fenix-hub/godot-engine.supabase-ui/HEAD/supabase-ui/res/fonts/roboto/Roboto-Medium.ttf
--------------------------------------------------------------------------------
/supabase-ui/res/fonts/roboto/Roboto-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fenix-hub/godot-engine.supabase-ui/HEAD/supabase-ui/res/fonts/roboto/Roboto-Regular.ttf
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |

2 |
3 | # Godot Engine - Supabase UI
4 | UI Library for Supabase in Godot Engine
5 |
6 | This is a UI library for [godot-engine.supabase](https://github.com/fenix-hub/godot-engine.supabase)
7 |
8 | 
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Plugin Specific ignores
2 | default_env.tres
3 | icon.png
4 | icon.png.import
5 | project.godot
6 | scn/
7 | override.cfg
8 | addons/
9 |
10 | # Godot-specific ignores
11 | .import/
12 | export.cfg
13 | export_presets.cfg
14 |
15 | # Mono-specific ignores
16 | .mono/
17 | data_*/
18 | !data_input/
19 |
--------------------------------------------------------------------------------
/supabase-ui/res/icons/dark_mode_white_24dp.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/supabase-ui/res/icons/question_mark.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/supabase-ui/components/mode_btn/mode_btn.gd:
--------------------------------------------------------------------------------
1 | tool
2 | extends TextButton
3 | class_name ModeButton
4 |
5 | export (Array, Texture) var textures : Array
6 |
7 | func _pressed() -> void:
8 | $Tween.stop_all()
9 |
10 | func set_mode(_mode : int) -> void:
11 | .set_mode(_mode)
12 | set_texture(textures[_mode])
13 | set_text(("Dark" if _mode == 0 else "Light") + " Mode")
14 |
15 | func _released() -> void:
16 | get_tree().call_group("supabase_components", "set_mode", !mode)
17 |
--------------------------------------------------------------------------------
/supabase-ui/basic/button/text/text_button.gd:
--------------------------------------------------------------------------------
1 | tool
2 | extends DefaultButton
3 | class_name TextButton
4 |
5 | func _load_defaults():
6 | property_list[0]["class_name"] = "TextButton"
7 | property_list[0]["name"] = "TextButton"
8 |
9 | colors.text = [Color("#666666"), Color.white]
10 | colors.button = [Color.transparent, Color.transparent]
11 | colors.button_hover = [Color("#1cb1b1b1"), Color("#1cb1b1b1")]
12 | colors.border = [Color.transparent, Color.transparent]
13 | colors.shadow_size = [0,0]
14 |
15 | text = "Text Button"
16 |
--------------------------------------------------------------------------------
/supabase-ui/basic/button/outline/outline_button.gd:
--------------------------------------------------------------------------------
1 | tool
2 | extends DefaultButton
3 | class_name OutlineButton
4 |
5 | func _load_defaults():
6 | property_list[0]["class_name"] = "OutlineButton"
7 | property_list[0]["name"] = "OutlineButton"
8 |
9 | colors.button = [Color.transparent, Color.transparent]
10 | colors.button_hover[1] = Color.white
11 | colors.text_hover = [Color("#414141"), colors.text[0]]
12 | colors.border = [Color("#a5a5a5"), Color("#cccccc")]
13 | colors.border_hover = [Color.black, colors.border[0]]
14 | colors.shadow_size = [0,0]
15 |
16 | text = "Outline Button"
17 |
--------------------------------------------------------------------------------
/supabase-ui/basic/button/link/link_button.gd:
--------------------------------------------------------------------------------
1 | tool
2 | extends DefaultButton
3 | class_name SLinkButton
4 |
5 | func _load_defaults():
6 | property_list[0]["class_name"] = "LinkButton"
7 | property_list[0]["name"] = "LinkButton"
8 |
9 | colors.text = [Color("#24b47e"), Color("#24b47e")]
10 | colors.text_hover = [Color("#24b47e"), Color("#24b47e")]
11 | colors.button = [Color.transparent, Color.transparent]
12 | colors.button_hover = [Color("#2824b47e"), Color("#2824b47e")]
13 | colors.border = [Color.transparent, Color.transparent]
14 | colors.shadow_size = [0,0]
15 |
16 | text = "Link Button"
17 |
--------------------------------------------------------------------------------
/supabase-ui/basic/button/text/TextButton.tres:
--------------------------------------------------------------------------------
1 | [gd_resource type="StyleBoxFlat" format=2]
2 |
3 | [resource]
4 | resource_local_to_scene = true
5 | resource_name = "TextButton"
6 | content_margin_left = 5.0
7 | content_margin_right = 5.0
8 | content_margin_top = 5.0
9 | content_margin_bottom = 5.0
10 | bg_color = Color( 1, 1, 1, 0 )
11 | border_color = Color( 1, 1, 1, 0 )
12 | corner_radius_top_left = 5
13 | corner_radius_top_right = 5
14 | corner_radius_bottom_right = 5
15 | corner_radius_bottom_left = 5
16 | corner_detail = 20
17 | shadow_color = Color( 0, 0, 0, 0.0392157 )
18 | shadow_offset = Vector2( 0, 1.5 )
19 | anti_aliasing = false
20 |
--------------------------------------------------------------------------------
/supabase-ui/basic/button/link/LinkButton.tres:
--------------------------------------------------------------------------------
1 | [gd_resource type="StyleBoxFlat" format=2]
2 |
3 | [resource]
4 | resource_local_to_scene = true
5 | resource_name = "LinkButton"
6 | content_margin_left = 13.0
7 | content_margin_right = 13.0
8 | content_margin_top = 9.0
9 | content_margin_bottom = 9.0
10 | bg_color = Color( 1, 1, 1, 0 )
11 | border_color = Color( 1, 1, 1, 0 )
12 | corner_radius_top_left = 5
13 | corner_radius_top_right = 5
14 | corner_radius_bottom_right = 5
15 | corner_radius_bottom_left = 5
16 | corner_detail = 20
17 | shadow_color = Color( 0, 0, 0, 0.0392157 )
18 | shadow_offset = Vector2( 0, 1.5 )
19 | anti_aliasing = false
20 |
--------------------------------------------------------------------------------
/supabase-ui/basic/button/primary/PrimaryButton.tres:
--------------------------------------------------------------------------------
1 | [gd_resource type="StyleBoxFlat" format=2]
2 |
3 | [resource]
4 | resource_local_to_scene = true
5 | resource_name = "PrimaryButton"
6 | content_margin_left = 13.0
7 | content_margin_right = 13.0
8 | content_margin_top = 9.0
9 | content_margin_bottom = 9.0
10 | bg_color = Color( 0.141176, 0.705882, 0.494118, 1 )
11 | corner_radius_top_left = 5
12 | corner_radius_top_right = 5
13 | corner_radius_bottom_right = 5
14 | corner_radius_bottom_left = 5
15 | corner_detail = 20
16 | shadow_color = Color( 0, 0, 0, 0.0392157 )
17 | shadow_size = 1
18 | shadow_offset = Vector2( 0, 1.5 )
19 | anti_aliasing = false
20 |
--------------------------------------------------------------------------------
/supabase-ui/basic/button/link/Link.tscn:
--------------------------------------------------------------------------------
1 | [gd_scene load_steps=3 format=2]
2 |
3 | [ext_resource path="res://supabase-ui/res/fonts/roboto/Roboto-Medium.ttf" type="DynamicFontData" id=1]
4 |
5 | [sub_resource type="DynamicFont" id=1]
6 | size = 15
7 | font_data = ExtResource( 1 )
8 |
9 | [node name="Link" type="LinkButton"]
10 | margin_right = 40.0
11 | margin_bottom = 14.0
12 | size_flags_vertical = 4
13 | custom_fonts/font = SubResource( 1 )
14 | custom_colors/font_color = Color( 0.243137, 0.811765, 0.556863, 1 )
15 | custom_colors/font_color_hover = Color( 0.243137, 0.811765, 0.556863, 1 )
16 | custom_colors/font_color_pressed = Color( 0.243137, 0.811765, 0.556863, 1 )
17 | __meta__ = {
18 | "_edit_use_anchors_": false
19 | }
20 |
--------------------------------------------------------------------------------
/supabase-ui/basic/typography/error_label/ErrorLabel.tscn:
--------------------------------------------------------------------------------
1 | [gd_scene load_steps=4 format=2]
2 |
3 | [ext_resource path="res://supabase-ui/basic/typography/error_label/err_label.gd" type="Script" id=1]
4 | [ext_resource path="res://supabase-ui/res/fonts/roboto/Roboto-Regular.ttf" type="DynamicFontData" id=2]
5 |
6 | [sub_resource type="DynamicFont" id=1]
7 | size = 15
8 | font_data = ExtResource( 2 )
9 |
10 | [node name="Label" type="Label"]
11 | margin_right = 40.0
12 | margin_bottom = 14.0
13 | custom_fonts/font = SubResource( 1 )
14 | custom_colors/font_color = Color( 1, 0.2, 0.2, 1 )
15 | autowrap = true
16 | script = ExtResource( 1 )
17 | __meta__ = {
18 | "_edit_use_anchors_": false
19 | }
20 | level = 5
21 | font_size = 15
22 |
--------------------------------------------------------------------------------
/supabase-ui/basic/button/default/DefaultButton.tres:
--------------------------------------------------------------------------------
1 | [gd_resource type="StyleBoxFlat" format=2]
2 |
3 | [resource]
4 | resource_local_to_scene = true
5 | resource_name = "DefaultButton"
6 | content_margin_left = 13.0
7 | content_margin_right = 13.0
8 | content_margin_top = 9.0
9 | content_margin_bottom = 9.0
10 | bg_color = Color( 1, 1, 1, 1 )
11 | border_width_left = 1
12 | border_width_top = 1
13 | border_width_right = 1
14 | border_width_bottom = 1
15 | corner_radius_top_left = 5
16 | corner_radius_top_right = 5
17 | corner_radius_bottom_right = 5
18 | corner_radius_bottom_left = 5
19 | corner_detail = 20
20 | shadow_color = Color( 0, 0, 0, 0.0392157 )
21 | shadow_size = 1
22 | shadow_offset = Vector2( 0, 1.5 )
23 | anti_aliasing = false
24 |
--------------------------------------------------------------------------------
/supabase-ui/basic/typography/base_label/BaseLabel.tscn:
--------------------------------------------------------------------------------
1 | [gd_scene load_steps=4 format=2]
2 |
3 | [ext_resource path="res://supabase-ui/basic/typography/base_label/label.gd" type="Script" id=1]
4 | [ext_resource path="res://supabase-ui/res/fonts/roboto/Roboto-Regular.ttf" type="DynamicFontData" id=2]
5 |
6 | [sub_resource type="DynamicFont" id=1]
7 | resource_local_to_scene = true
8 | size = 15
9 | font_data = ExtResource( 2 )
10 |
11 | [node name="Label" type="Label"]
12 | margin_right = 40.0
13 | margin_bottom = 14.0
14 | custom_fonts/font = SubResource( 1 )
15 | custom_colors/font_color = Color( 0.121569, 0.121569, 0.121569, 1 )
16 | script = ExtResource( 1 )
17 | __meta__ = {
18 | "_edit_use_anchors_": false
19 | }
20 | level = 5
21 | font_size = 15
22 |
--------------------------------------------------------------------------------
/supabase-ui/basic/containers/popup/_popup.gd:
--------------------------------------------------------------------------------
1 | tool
2 | class_name SPopup
3 | extends PopupPanel
4 |
5 | signal pressed()
6 |
7 | const colors : Dictionary = {
8 | "panel" : [Color.white, Color("#2a2a2a")]
9 | }
10 |
11 | export (int, "Light Mode", "Dark Mode") var mode : int = 0 setget set_mode
12 |
13 | func _ready():
14 | add_to_group("supabase_components")
15 |
16 | func set_mode(_mode : int) :
17 | mode = _mode
18 | get("custom_styles/panel").set("bg_color", colors.panel[mode])
19 |
20 | func _force_resize() :
21 | hide()
22 | show()
23 |
24 |
25 | func _on_Panel_gui_input(event):
26 | if event is InputEventMouseButton:
27 | if event.get_button_index() == 1 and event.is_pressed():
28 | emit_signal("pressed")
29 |
--------------------------------------------------------------------------------
/supabase-ui/basic/containers/panel/_panel.gd:
--------------------------------------------------------------------------------
1 | tool
2 | class_name SPanel
3 | extends PanelContainer
4 |
5 | signal pressed()
6 |
7 | const colors : Dictionary = {
8 | "panel" : [Color.white, Color("#2a2a2a")]
9 | }
10 |
11 | export (int, "Light Mode", "Dark Mode") var mode : int = 0 setget set_mode
12 |
13 | func _ready():
14 | add_to_group("supabase_components")
15 |
16 | func set_mode(_mode : int) :
17 | mode = _mode
18 | get("custom_styles/panel").set("bg_color", colors.panel[mode])
19 |
20 | func _force_resize() :
21 | hide()
22 | show()
23 |
24 |
25 | func _on_Panel_gui_input(event):
26 | if event is InputEventMouseButton:
27 | if event.get_button_index() == 1 and event.is_pressed():
28 | emit_signal("pressed")
29 |
--------------------------------------------------------------------------------
/supabase-ui/basic/button/outline/OutlineButton.tres:
--------------------------------------------------------------------------------
1 | [gd_resource type="StyleBoxFlat" format=2]
2 |
3 | [resource]
4 | resource_local_to_scene = true
5 | resource_name = "OutlineButton"
6 | content_margin_left = 13.0
7 | content_margin_right = 13.0
8 | content_margin_top = 9.0
9 | content_margin_bottom = 9.0
10 | bg_color = Color( 1, 1, 1, 0 )
11 | border_width_left = 1
12 | border_width_top = 1
13 | border_width_right = 1
14 | border_width_bottom = 1
15 | border_color = Color( 0.647059, 0.647059, 0.647059, 1 )
16 | corner_radius_top_left = 5
17 | corner_radius_top_right = 5
18 | corner_radius_bottom_right = 5
19 | corner_radius_bottom_left = 5
20 | corner_detail = 20
21 | shadow_color = Color( 0, 0, 0, 0.0392157 )
22 | shadow_offset = Vector2( 0, 1.5 )
23 | anti_aliasing = false
24 |
--------------------------------------------------------------------------------
/supabase-ui/res/icons/key.svg.import:
--------------------------------------------------------------------------------
1 | [remap]
2 |
3 | importer="texture"
4 | type="StreamTexture"
5 | path="res://.import/key.svg-5b511d666948fd52633cf357c10cfabb.stex"
6 | metadata={
7 | "vram_texture": false
8 | }
9 |
10 | [deps]
11 |
12 | source_file="res://supabase-ui/res/icons/key.svg"
13 | dest_files=[ "res://.import/key.svg-5b511d666948fd52633cf357c10cfabb.stex" ]
14 |
15 | [params]
16 |
17 | compress/mode=0
18 | compress/lossy_quality=0.7
19 | compress/hdr_mode=0
20 | compress/bptc_ldr=0
21 | compress/normal_map=0
22 | flags/repeat=0
23 | flags/filter=true
24 | flags/mipmaps=false
25 | flags/anisotropic=false
26 | flags/srgb=2
27 | process/fix_alpha_border=false
28 | process/premult_alpha=false
29 | process/HDR_as_SRGB=false
30 | process/invert_color=false
31 | stream=false
32 | size_limit=0
33 | detect_3d=false
34 | svg/scale=2.0
35 |
--------------------------------------------------------------------------------
/supabase-ui/res/icons/lock.svg.import:
--------------------------------------------------------------------------------
1 | [remap]
2 |
3 | importer="texture"
4 | type="StreamTexture"
5 | path="res://.import/lock.svg-a75fe7efdfa0b4250cb6fa7ee9a744d7.stex"
6 | metadata={
7 | "vram_texture": false
8 | }
9 |
10 | [deps]
11 |
12 | source_file="res://supabase-ui/res/icons/lock.svg"
13 | dest_files=[ "res://.import/lock.svg-a75fe7efdfa0b4250cb6fa7ee9a744d7.stex" ]
14 |
15 | [params]
16 |
17 | compress/mode=0
18 | compress/lossy_quality=0.7
19 | compress/hdr_mode=0
20 | compress/bptc_ldr=0
21 | compress/normal_map=0
22 | flags/repeat=0
23 | flags/filter=true
24 | flags/mipmaps=false
25 | flags/anisotropic=false
26 | flags/srgb=2
27 | process/fix_alpha_border=false
28 | process/premult_alpha=false
29 | process/HDR_as_SRGB=false
30 | process/invert_color=false
31 | stream=false
32 | size_limit=0
33 | detect_3d=true
34 | svg/scale=1.0
35 |
--------------------------------------------------------------------------------
/supabase-ui/res/icons/email.svg.import:
--------------------------------------------------------------------------------
1 | [remap]
2 |
3 | importer="texture"
4 | type="StreamTexture"
5 | path="res://.import/email.svg-4dd7a292a21cd4cf5a8f2b3570382498.stex"
6 | metadata={
7 | "vram_texture": false
8 | }
9 |
10 | [deps]
11 |
12 | source_file="res://supabase-ui/res/icons/email.svg"
13 | dest_files=[ "res://.import/email.svg-4dd7a292a21cd4cf5a8f2b3570382498.stex" ]
14 |
15 | [params]
16 |
17 | compress/mode=0
18 | compress/lossy_quality=0.7
19 | compress/hdr_mode=0
20 | compress/bptc_ldr=0
21 | compress/normal_map=0
22 | flags/repeat=0
23 | flags/filter=true
24 | flags/mipmaps=false
25 | flags/anisotropic=false
26 | flags/srgb=2
27 | process/fix_alpha_border=false
28 | process/premult_alpha=false
29 | process/HDR_as_SRGB=false
30 | process/invert_color=false
31 | stream=false
32 | size_limit=0
33 | detect_3d=false
34 | svg/scale=2.0
35 |
--------------------------------------------------------------------------------
/supabase-ui/res/icons/inbox.svg.import:
--------------------------------------------------------------------------------
1 | [remap]
2 |
3 | importer="texture"
4 | type="StreamTexture"
5 | path="res://.import/inbox.svg-a5fdd6eefdb2b45b30ee091cfbb0f43c.stex"
6 | metadata={
7 | "vram_texture": false
8 | }
9 |
10 | [deps]
11 |
12 | source_file="res://supabase-ui/res/icons/inbox.svg"
13 | dest_files=[ "res://.import/inbox.svg-a5fdd6eefdb2b45b30ee091cfbb0f43c.stex" ]
14 |
15 | [params]
16 |
17 | compress/mode=0
18 | compress/lossy_quality=0.7
19 | compress/hdr_mode=0
20 | compress/bptc_ldr=0
21 | compress/normal_map=0
22 | flags/repeat=0
23 | flags/filter=true
24 | flags/mipmaps=false
25 | flags/anisotropic=false
26 | flags/srgb=2
27 | process/fix_alpha_border=true
28 | process/premult_alpha=false
29 | process/HDR_as_SRGB=false
30 | process/invert_color=false
31 | stream=false
32 | size_limit=0
33 | detect_3d=false
34 | svg/scale=2.0
35 |
--------------------------------------------------------------------------------
/supabase-ui/res/icons/loader.svg.import:
--------------------------------------------------------------------------------
1 | [remap]
2 |
3 | importer="texture"
4 | type="StreamTexture"
5 | path="res://.import/loader.svg-3b79e8949384811bdea2360ee9ca87ef.stex"
6 | metadata={
7 | "vram_texture": false
8 | }
9 |
10 | [deps]
11 |
12 | source_file="res://supabase-ui/res/icons/loader.svg"
13 | dest_files=[ "res://.import/loader.svg-3b79e8949384811bdea2360ee9ca87ef.stex" ]
14 |
15 | [params]
16 |
17 | compress/mode=0
18 | compress/lossy_quality=0.7
19 | compress/hdr_mode=0
20 | compress/bptc_ldr=0
21 | compress/normal_map=0
22 | flags/repeat=0
23 | flags/filter=true
24 | flags/mipmaps=false
25 | flags/anisotropic=false
26 | flags/srgb=2
27 | process/fix_alpha_border=true
28 | process/premult_alpha=false
29 | process/HDR_as_SRGB=false
30 | process/invert_color=false
31 | stream=false
32 | size_limit=0
33 | detect_3d=true
34 | svg/scale=1.0
35 |
--------------------------------------------------------------------------------
/supabase-ui/res/icons/loading.svg.import:
--------------------------------------------------------------------------------
1 | [remap]
2 |
3 | importer="texture"
4 | type="StreamTexture"
5 | path="res://.import/loading.svg-a39d2199c750ca4c99b566d05ffb9bdc.stex"
6 | metadata={
7 | "vram_texture": false
8 | }
9 |
10 | [deps]
11 |
12 | source_file="res://supabase-ui/res/icons/loading.svg"
13 | dest_files=[ "res://.import/loading.svg-a39d2199c750ca4c99b566d05ffb9bdc.stex" ]
14 |
15 | [params]
16 |
17 | compress/mode=0
18 | compress/lossy_quality=0.7
19 | compress/hdr_mode=0
20 | compress/bptc_ldr=0
21 | compress/normal_map=0
22 | flags/repeat=0
23 | flags/filter=true
24 | flags/mipmaps=false
25 | flags/anisotropic=false
26 | flags/srgb=2
27 | process/fix_alpha_border=true
28 | process/premult_alpha=false
29 | process/HDR_as_SRGB=false
30 | process/invert_color=false
31 | stream=false
32 | size_limit=0
33 | detect_3d=true
34 | svg/scale=1.0
35 |
--------------------------------------------------------------------------------
/supabase-ui/res/icons/checkbox.png.import:
--------------------------------------------------------------------------------
1 | [remap]
2 |
3 | importer="texture"
4 | type="StreamTexture"
5 | path="res://.import/checkbox.png-d865151ccdeeab621b0d43d9d57570f7.stex"
6 | metadata={
7 | "vram_texture": false
8 | }
9 |
10 | [deps]
11 |
12 | source_file="res://supabase-ui/res/icons/checkbox.png"
13 | dest_files=[ "res://.import/checkbox.png-d865151ccdeeab621b0d43d9d57570f7.stex" ]
14 |
15 | [params]
16 |
17 | compress/mode=0
18 | compress/lossy_quality=0.7
19 | compress/hdr_mode=0
20 | compress/bptc_ldr=0
21 | compress/normal_map=0
22 | flags/repeat=0
23 | flags/filter=false
24 | flags/mipmaps=false
25 | flags/anisotropic=false
26 | flags/srgb=2
27 | process/fix_alpha_border=false
28 | process/premult_alpha=false
29 | process/HDR_as_SRGB=false
30 | process/invert_color=false
31 | stream=false
32 | size_limit=0
33 | detect_3d=false
34 | svg/scale=1.0
35 |
--------------------------------------------------------------------------------
/supabase-ui/res/icons/loader-line.svg.import:
--------------------------------------------------------------------------------
1 | [remap]
2 |
3 | importer="texture"
4 | type="StreamTexture"
5 | path="res://.import/loader-line.svg-3b1a682e266fa48ab4012752d200d177.stex"
6 | metadata={
7 | "vram_texture": false
8 | }
9 |
10 | [deps]
11 |
12 | source_file="res://supabase-ui/res/icons/loader-line.svg"
13 | dest_files=[ "res://.import/loader-line.svg-3b1a682e266fa48ab4012752d200d177.stex" ]
14 |
15 | [params]
16 |
17 | compress/mode=0
18 | compress/lossy_quality=0.7
19 | compress/hdr_mode=0
20 | compress/bptc_ldr=0
21 | compress/normal_map=0
22 | flags/repeat=0
23 | flags/filter=true
24 | flags/mipmaps=false
25 | flags/anisotropic=false
26 | flags/srgb=2
27 | process/fix_alpha_border=true
28 | process/premult_alpha=false
29 | process/HDR_as_SRGB=false
30 | process/invert_color=false
31 | stream=false
32 | size_limit=0
33 | detect_3d=true
34 | svg/scale=1.0
35 |
--------------------------------------------------------------------------------
/supabase-ui/res/icons/un_checkbox.png.import:
--------------------------------------------------------------------------------
1 | [remap]
2 |
3 | importer="texture"
4 | type="StreamTexture"
5 | path="res://.import/un_checkbox.png-cb731145aa8c97538c5719d98d91f2fd.stex"
6 | metadata={
7 | "vram_texture": false
8 | }
9 |
10 | [deps]
11 |
12 | source_file="res://supabase-ui/res/icons/un_checkbox.png"
13 | dest_files=[ "res://.import/un_checkbox.png-cb731145aa8c97538c5719d98d91f2fd.stex" ]
14 |
15 | [params]
16 |
17 | compress/mode=0
18 | compress/lossy_quality=0.7
19 | compress/hdr_mode=0
20 | compress/bptc_ldr=0
21 | compress/normal_map=0
22 | flags/repeat=0
23 | flags/filter=false
24 | flags/mipmaps=false
25 | flags/anisotropic=false
26 | flags/srgb=2
27 | process/fix_alpha_border=false
28 | process/premult_alpha=false
29 | process/HDR_as_SRGB=false
30 | process/invert_color=false
31 | stream=false
32 | size_limit=0
33 | detect_3d=false
34 | svg/scale=1.0
35 |
--------------------------------------------------------------------------------
/supabase-ui/res/icons/question_mark.svg.import:
--------------------------------------------------------------------------------
1 | [remap]
2 |
3 | importer="texture"
4 | type="StreamTexture"
5 | path="res://.import/question_mark.svg-603b3ce2f18ea51d7a2aac8b2f5962bd.stex"
6 | metadata={
7 | "vram_texture": false
8 | }
9 |
10 | [deps]
11 |
12 | source_file="res://supabase-ui/res/icons/question_mark.svg"
13 | dest_files=[ "res://.import/question_mark.svg-603b3ce2f18ea51d7a2aac8b2f5962bd.stex" ]
14 |
15 | [params]
16 |
17 | compress/mode=0
18 | compress/lossy_quality=0.7
19 | compress/hdr_mode=0
20 | compress/bptc_ldr=0
21 | compress/normal_map=0
22 | flags/repeat=0
23 | flags/filter=true
24 | flags/mipmaps=false
25 | flags/anisotropic=false
26 | flags/srgb=2
27 | process/fix_alpha_border=true
28 | process/premult_alpha=false
29 | process/HDR_as_SRGB=false
30 | process/invert_color=false
31 | stream=false
32 | size_limit=0
33 | detect_3d=true
34 | svg/scale=1.0
35 |
--------------------------------------------------------------------------------
/supabase-ui/res/icons/dark_mode_white_24dp.svg.import:
--------------------------------------------------------------------------------
1 | [remap]
2 |
3 | importer="texture"
4 | type="StreamTexture"
5 | path="res://.import/dark_mode_white_24dp.svg-92446bf9c425dbe2d33dc0a4827f56ae.stex"
6 | metadata={
7 | "vram_texture": false
8 | }
9 |
10 | [deps]
11 |
12 | source_file="res://supabase-ui/res/icons/dark_mode_white_24dp.svg"
13 | dest_files=[ "res://.import/dark_mode_white_24dp.svg-92446bf9c425dbe2d33dc0a4827f56ae.stex" ]
14 |
15 | [params]
16 |
17 | compress/mode=0
18 | compress/lossy_quality=0.7
19 | compress/hdr_mode=0
20 | compress/bptc_ldr=0
21 | compress/normal_map=0
22 | flags/repeat=0
23 | flags/filter=true
24 | flags/mipmaps=false
25 | flags/anisotropic=false
26 | flags/srgb=2
27 | process/fix_alpha_border=true
28 | process/premult_alpha=false
29 | process/HDR_as_SRGB=false
30 | process/invert_color=false
31 | stream=false
32 | size_limit=0
33 | detect_3d=true
34 | svg/scale=2.0
35 |
--------------------------------------------------------------------------------
/supabase-ui/res/icons/light_mode_white_36dp.svg.import:
--------------------------------------------------------------------------------
1 | [remap]
2 |
3 | importer="texture"
4 | type="StreamTexture"
5 | path="res://.import/light_mode_white_36dp.svg-7879572e513ebb87063bccadf34dedbe.stex"
6 | metadata={
7 | "vram_texture": false
8 | }
9 |
10 | [deps]
11 |
12 | source_file="res://supabase-ui/res/icons/light_mode_white_36dp.svg"
13 | dest_files=[ "res://.import/light_mode_white_36dp.svg-7879572e513ebb87063bccadf34dedbe.stex" ]
14 |
15 | [params]
16 |
17 | compress/mode=0
18 | compress/lossy_quality=0.7
19 | compress/hdr_mode=0
20 | compress/bptc_ldr=0
21 | compress/normal_map=0
22 | flags/repeat=0
23 | flags/filter=true
24 | flags/mipmaps=false
25 | flags/anisotropic=false
26 | flags/srgb=2
27 | process/fix_alpha_border=true
28 | process/premult_alpha=false
29 | process/HDR_as_SRGB=false
30 | process/invert_color=false
31 | stream=false
32 | size_limit=0
33 | detect_3d=true
34 | svg/scale=2.0
35 |
--------------------------------------------------------------------------------
/supabase-ui/basic/containers/popup/Popup.tscn:
--------------------------------------------------------------------------------
1 | [gd_scene load_steps=3 format=2]
2 |
3 | [ext_resource path="res://supabase-ui/basic/containers/popup/popup.gd" type="Script" id=1]
4 |
5 | [sub_resource type="StyleBoxFlat" id=1]
6 | resource_local_to_scene = true
7 | content_margin_left = 20.0
8 | content_margin_right = 20.0
9 | content_margin_top = 20.0
10 | content_margin_bottom = 20.0
11 | bg_color = Color( 0.164706, 0.164706, 0.164706, 1 )
12 | border_width_left = 1
13 | border_width_top = 1
14 | border_width_right = 1
15 | border_width_bottom = 1
16 | corner_radius_top_left = 5
17 | corner_radius_top_right = 5
18 | corner_radius_bottom_right = 5
19 | corner_radius_bottom_left = 5
20 | corner_detail = 20
21 |
22 | [node name="Popup" type="PopupPanel"]
23 | margin_right = 40.0
24 | margin_bottom = 40.0
25 | mouse_filter = 2
26 | size_flags_horizontal = 0
27 | size_flags_vertical = 0
28 | custom_styles/panel = SubResource( 1 )
29 | script = ExtResource( 1 )
30 |
--------------------------------------------------------------------------------
/supabase-ui/basic/containers/panel/Panel.tscn:
--------------------------------------------------------------------------------
1 | [gd_scene load_steps=3 format=2]
2 |
3 | [ext_resource path="res://supabase-ui/basic/containers/panel/panel.gd" type="Script" id=1]
4 |
5 | [sub_resource type="StyleBoxFlat" id=1]
6 | resource_local_to_scene = true
7 | content_margin_left = 20.0
8 | content_margin_right = 20.0
9 | content_margin_top = 20.0
10 | content_margin_bottom = 20.0
11 | bg_color = Color( 1, 1, 1, 1 )
12 | border_width_left = 1
13 | border_width_top = 1
14 | border_width_right = 1
15 | border_width_bottom = 1
16 | corner_radius_top_left = 5
17 | corner_radius_top_right = 5
18 | corner_radius_bottom_right = 5
19 | corner_radius_bottom_left = 5
20 | corner_detail = 20
21 |
22 | [node name="Panel" type="PanelContainer"]
23 | anchor_right = 1.0
24 | anchor_bottom = 1.0
25 | mouse_filter = 2
26 | size_flags_horizontal = 0
27 | size_flags_vertical = 0
28 | custom_styles/panel = SubResource( 1 )
29 | script = ExtResource( 1 )
30 | __meta__ = {
31 | "_edit_use_anchors_": false
32 | }
33 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2021 Nicolò Santilio
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/supabase-ui/res/icons/light_mode_white_36dp.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/supabase-ui/basic/button/primary/primary_button.gd:
--------------------------------------------------------------------------------
1 | tool
2 | extends DefaultButton
3 | class_name PrimaryButton
4 |
5 | export var enable_loading : bool = false
6 |
7 | onready var loading_texture := load("res://supabase-ui/res/icons/loader.svg")
8 | var current_texture : Texture = null
9 | var loading : bool = false
10 |
11 |
12 | func start_loading():
13 | loading = true
14 | current_texture = texture
15 | set_expand(true)
16 | enable_icon(true)
17 | set_texture(loading_texture)
18 | $ButtonContainer/Icon.rect_pivot_offset = $ButtonContainer/Icon.rect_size/2
19 | set_process_internal(true)
20 |
21 | func stop_loading() -> void:
22 | loading = false
23 | if not current_texture:
24 | enable_icon(false)
25 | set_texture(current_texture)
26 | set_process_internal(false)
27 | $ButtonContainer/Icon.rect_rotation = 0
28 |
29 | func _notification(what : int) -> void:
30 | if what == NOTIFICATION_INTERNAL_PROCESS:
31 | _internal_process(get_process_delta_time())
32 |
33 | func _internal_process(_delta : float) -> void:
34 | $ButtonContainer/Icon.rect_rotation += _delta*240
35 |
36 | func _pressed():
37 | ._pressed()
38 | if enable_loading:
39 | if loading:
40 | stop_loading()
41 | else:
42 | start_loading()
43 |
44 | func _load_defaults():
45 | property_list[0]["class_name"] = "PrimaryButton"
46 | property_list[0]["name"] = "PrimaryButton"
47 |
48 | colors.text = [Color.white, Color.white]
49 | colors.text_hover = [Color.white, Color.white]
50 | colors.icon = [Color.white, Color.white]
51 | colors.button = [Color("#24b47e"), Color("#24b47e")]
52 | colors.button_hover = [Color("#4bd2a0"), Color("#198c61")]
53 |
54 | text = "Primary Button"
55 |
--------------------------------------------------------------------------------
/supabase-ui/basic/button/outline/OutlineButton.tscn:
--------------------------------------------------------------------------------
1 | [gd_scene load_steps=5 format=2]
2 |
3 | [ext_resource path="res://supabase-ui/basic/button/outline/outline_button.gd" type="Script" id=1]
4 | [ext_resource path="res://supabase-ui/res/fonts/roboto/Roboto-Medium.ttf" type="DynamicFontData" id=2]
5 | [ext_resource path="res://supabase-ui/basic/button/outline/OutlineButton.tres" type="StyleBox" id=3]
6 |
7 | [sub_resource type="DynamicFont" id=1]
8 | size = 15
9 | font_data = ExtResource( 2 )
10 |
11 | [node name="OutlineButton" type="PanelContainer"]
12 | margin_right = 126.0
13 | margin_bottom = 36.0
14 | mouse_default_cursor_shape = 2
15 | custom_styles/panel = ExtResource( 3 )
16 | script = ExtResource( 1 )
17 | __meta__ = {
18 | "_edit_use_anchors_": true
19 | }
20 | icon_enabled = false
21 | texture = null
22 | expand = false
23 | size = Vector2( 24, 24 )
24 | text = "Outline Button"
25 | font_size = 15
26 |
27 | [node name="ButtonContainer" type="HBoxContainer" parent="."]
28 | modulate = Color( 0.254902, 0.254902, 0.254902, 1 )
29 | margin_left = 13.0
30 | margin_top = 9.0
31 | margin_right = 113.0
32 | margin_bottom = 27.0
33 | mouse_filter = 2
34 |
35 | [node name="Icon" type="TextureRect" parent="ButtonContainer"]
36 | visible = false
37 | margin_right = 32.0
38 | margin_bottom = 32.0
39 | rect_min_size = Vector2( 24, 24 )
40 | mouse_filter = 2
41 | size_flags_vertical = 4
42 |
43 | [node name="Text" type="Label" parent="ButtonContainer"]
44 | margin_right = 100.0
45 | margin_bottom = 18.0
46 | size_flags_horizontal = 7
47 | custom_fonts/font = SubResource( 1 )
48 | custom_colors/font_color = Color( 1, 1, 1, 1 )
49 | custom_constants/shadow_offset_x = 0
50 | custom_constants/shadow_offset_y = 0
51 | text = "Outline Button"
52 | align = 1
53 | valign = 1
54 |
55 | [node name="Tween" type="Tween" parent="."]
56 |
--------------------------------------------------------------------------------
/supabase-ui/basic/button/text/TextButton.tscn:
--------------------------------------------------------------------------------
1 | [gd_scene load_steps=5 format=2]
2 |
3 | [ext_resource path="res://supabase-ui/basic/button/text/text_button.gd" type="Script" id=1]
4 | [ext_resource path="res://supabase-ui/res/fonts/roboto/Roboto-Medium.ttf" type="DynamicFontData" id=2]
5 | [ext_resource path="res://supabase-ui/basic/button/text/TextButton.tres" type="StyleBox" id=3]
6 |
7 | [sub_resource type="DynamicFont" id=1]
8 | size = 17
9 | font_data = ExtResource( 2 )
10 |
11 | [node name="TextButton" type="PanelContainer"]
12 | margin_right = 101.0
13 | margin_bottom = 31.0
14 | mouse_default_cursor_shape = 2
15 | custom_styles/panel = ExtResource( 3 )
16 | script = ExtResource( 1 )
17 | __meta__ = {
18 | "_edit_use_anchors_": true
19 | }
20 | disabled = false
21 | icon_enabled = false
22 | texture = null
23 | expand = false
24 | size = Vector2( 24, 24 )
25 | text_enabled = true
26 | text = "Text Button"
27 | font_size = 15
28 |
29 | [node name="ButtonContainer" type="HBoxContainer" parent="."]
30 | modulate = Color( 0.4, 0.4, 0.4, 1 )
31 | margin_left = 5.0
32 | margin_top = 5.0
33 | margin_right = 96.0
34 | margin_bottom = 26.0
35 | mouse_filter = 2
36 |
37 | [node name="Icon" type="TextureRect" parent="ButtonContainer"]
38 | visible = false
39 | margin_right = 32.0
40 | margin_bottom = 32.0
41 | rect_min_size = Vector2( 24, 24 )
42 | mouse_filter = 2
43 | size_flags_vertical = 4
44 |
45 | [node name="Text" type="Label" parent="ButtonContainer"]
46 | margin_right = 91.0
47 | margin_bottom = 21.0
48 | size_flags_horizontal = 7
49 | custom_fonts/font = SubResource( 1 )
50 | custom_colors/font_color = Color( 1, 1, 1, 1 )
51 | custom_constants/shadow_offset_x = 0
52 | custom_constants/shadow_offset_y = 0
53 | text = "Text Button"
54 | align = 1
55 | valign = 1
56 |
57 | [node name="Tween" type="Tween" parent="."]
58 |
--------------------------------------------------------------------------------
/supabase-ui/basic/button/link/LinkButton.tscn:
--------------------------------------------------------------------------------
1 | [gd_scene load_steps=5 format=2]
2 |
3 | [ext_resource path="res://supabase-ui/basic/button/link/link_button.gd" type="Script" id=1]
4 | [ext_resource path="res://supabase-ui/res/fonts/roboto/Roboto-Medium.ttf" type="DynamicFontData" id=2]
5 | [ext_resource path="res://supabase-ui/basic/button/link/LinkButton.tres" type="StyleBox" id=3]
6 |
7 | [sub_resource type="DynamicFont" id=1]
8 | size = 15
9 | font_data = ExtResource( 2 )
10 |
11 | [node name="LinkButton" type="PanelContainer"]
12 | margin_right = 106.0
13 | margin_bottom = 36.0
14 | mouse_default_cursor_shape = 2
15 | custom_styles/panel = ExtResource( 3 )
16 | script = ExtResource( 1 )
17 | __meta__ = {
18 | "_edit_use_anchors_": true
19 | }
20 | icon_enabled = false
21 | texture = null
22 | expand = false
23 | size = Vector2( 32, 32 )
24 | text = "Link Button"
25 | font_size = 15
26 |
27 | [node name="ButtonContainer" type="HBoxContainer" parent="."]
28 | modulate = Color( 0.141176, 0.705882, 0.494118, 1 )
29 | margin_left = 13.0
30 | margin_top = 9.0
31 | margin_right = 93.0
32 | margin_bottom = 27.0
33 | mouse_filter = 2
34 |
35 | [node name="Icon" type="TextureRect" parent="ButtonContainer"]
36 | visible = false
37 | modulate = Color( 0.254902, 0.254902, 0.254902, 1 )
38 | margin_right = 32.0
39 | margin_bottom = 32.0
40 | rect_min_size = Vector2( 32, 32 )
41 | mouse_filter = 2
42 | size_flags_vertical = 4
43 |
44 | [node name="Text" type="Label" parent="ButtonContainer"]
45 | margin_right = 80.0
46 | margin_bottom = 18.0
47 | size_flags_horizontal = 7
48 | custom_fonts/font = SubResource( 1 )
49 | custom_colors/font_color = Color( 1, 1, 1, 1 )
50 | custom_constants/shadow_offset_x = 0
51 | custom_constants/shadow_offset_y = 0
52 | text = "Link Button"
53 | align = 1
54 | valign = 1
55 |
56 | [node name="Tween" type="Tween" parent="."]
57 |
--------------------------------------------------------------------------------
/supabase-ui/basic/button/default/DefaultButton.tscn:
--------------------------------------------------------------------------------
1 | [gd_scene load_steps=5 format=2]
2 |
3 | [ext_resource path="res://supabase-ui/basic/button/default/default_button.gd" type="Script" id=1]
4 | [ext_resource path="res://supabase-ui/res/fonts/roboto/Roboto-Medium.ttf" type="DynamicFontData" id=2]
5 | [ext_resource path="res://supabase-ui/basic/button/default/DefaultButton.tres" type="StyleBox" id=3]
6 |
7 | [sub_resource type="DynamicFont" id=1]
8 | size = 15
9 | font_data = ExtResource( 2 )
10 |
11 | [node name="DefaultButton" type="PanelContainer"]
12 | margin_right = 126.0
13 | margin_bottom = 36.0
14 | mouse_default_cursor_shape = 2
15 | custom_styles/panel = ExtResource( 3 )
16 | script = ExtResource( 1 )
17 | __meta__ = {
18 | "_edit_use_anchors_": true
19 | }
20 | disabled = false
21 | icon_enabled = false
22 | texture = null
23 | expand = false
24 | size = Vector2( 24, 24 )
25 | text_enabled = true
26 | text = "Default Button"
27 | font_size = 15
28 |
29 | [node name="ButtonContainer" type="HBoxContainer" parent="."]
30 | modulate = Color( 0.254902, 0.254902, 0.254902, 1 )
31 | margin_left = 13.0
32 | margin_top = 9.0
33 | margin_right = 113.0
34 | margin_bottom = 27.0
35 | mouse_filter = 2
36 |
37 | [node name="Icon" type="TextureRect" parent="ButtonContainer"]
38 | visible = false
39 | margin_right = 24.0
40 | margin_bottom = 24.0
41 | rect_min_size = Vector2( 24, 24 )
42 | mouse_filter = 2
43 | size_flags_vertical = 4
44 |
45 | [node name="Text" type="Label" parent="ButtonContainer"]
46 | margin_right = 100.0
47 | margin_bottom = 18.0
48 | size_flags_horizontal = 7
49 | custom_fonts/font = SubResource( 1 )
50 | custom_colors/font_color = Color( 1, 1, 1, 1 )
51 | custom_constants/shadow_offset_x = 0
52 | custom_constants/shadow_offset_y = 0
53 | text = "Default Button"
54 | align = 1
55 | valign = 1
56 |
57 | [node name="Tween" type="Tween" parent="."]
58 |
--------------------------------------------------------------------------------
/supabase-ui/basic/typography/base_label/label.gd:
--------------------------------------------------------------------------------
1 | tool
2 | extends Label
3 | class_name SLabel
4 |
5 | export (int, "Light Mode", "Dark Mode") var mode : int = 0 setget set_mode
6 |
7 | var colors : Dictionary = {
8 | "text" : [Color("#1F1F1F"), Color.white],
9 | }
10 |
11 | var level : int = 5 setget set_level
12 | var font_size : int = 15 setget set_font_size
13 |
14 | var property_list : Array = [
15 | {
16 | "class_name": "SLabel",
17 | "hint": PROPERTY_HINT_NONE,
18 | "usage": PROPERTY_USAGE_CATEGORY,
19 | "name": "SLabel",
20 | "type": TYPE_STRING
21 | },
22 | {
23 | "usage": PROPERTY_USAGE_GROUP,
24 | "name": "Contents",
25 | "type": TYPE_STRING
26 | },
27 | {
28 | "usage": PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_SCRIPT_VARIABLE,
29 | "name": "level",
30 | "hint": PROPERTY_HINT_ENUM,
31 | "hint_string" : "1,2,3,4,5",
32 | "type": TYPE_INT
33 | },
34 | {
35 | "usage": PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_SCRIPT_VARIABLE,
36 | "name": "font_size",
37 | "type": TYPE_INT
38 | }
39 | ]
40 |
41 |
42 | func _get_property_list():
43 | return property_list
44 |
45 | func _init():
46 | set_level(4)
47 | set_text("")
48 |
49 | func _load_defaults():
50 | pass
51 |
52 | func _ready():
53 | _load_defaults()
54 | set_mode(mode)
55 | add_to_group("supabase_components")
56 |
57 | func set_text_color(_color : Color) -> void:
58 | set("custom_colors/font_color", _color)
59 |
60 |
61 | func set_mode(_mode : int) -> void:
62 | mode = _mode
63 | set_text_color(colors.text[mode])
64 |
65 | func set_font_size(_size : int) -> void:
66 | font_size = _size
67 | get("custom_fonts/font").set("size", _size)
68 |
69 | func set_level(_level : int) -> void:
70 | level = _level
71 | match level:
72 | 0: set_font_size(40)
73 | 1: set_font_size(35)
74 | 2: set_font_size(25)
75 | 3: set_font_size(19)
76 | 4: set_font_size(16)
77 |
--------------------------------------------------------------------------------
/supabase-ui/basic/typography/error_label/err_label.gd:
--------------------------------------------------------------------------------
1 | tool
2 | extends Label
3 | class_name SErrorLabel
4 |
5 | export (int, "Light Mode", "Dark Mode") var mode : int = 0 setget set_mode
6 |
7 | var colors : Dictionary = {
8 | "text" : [Color("#ff3333"), Color("#ff3333")],
9 | }
10 |
11 | var level : int = 5 setget set_level
12 | var font_size : int = 15 setget set_font_size
13 |
14 | var property_list : Array = [
15 | {
16 | "class_name": "SLabel",
17 | "hint": PROPERTY_HINT_NONE,
18 | "usage": PROPERTY_USAGE_CATEGORY,
19 | "name": "SLabel",
20 | "type": TYPE_STRING
21 | },
22 | {
23 | "usage": PROPERTY_USAGE_GROUP,
24 | "name": "Contents",
25 | "type": TYPE_STRING
26 | },
27 | {
28 | "usage": PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_SCRIPT_VARIABLE,
29 | "name": "level",
30 | "hint": PROPERTY_HINT_ENUM,
31 | "hint_string" : "1,2,3,4,5",
32 | "type": TYPE_INT
33 | },
34 | {
35 | "usage": PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_SCRIPT_VARIABLE,
36 | "name": "font_size",
37 | "type": TYPE_INT
38 | }
39 | ]
40 |
41 |
42 | func _get_property_list():
43 | return property_list
44 |
45 |
46 |
47 | func _load_defaults():
48 | pass
49 |
50 | func _ready():
51 | _load_defaults()
52 | set_mode(mode)
53 | set_text("")
54 | set_level(4)
55 |
56 | add_to_group("supabase_components")
57 |
58 | func set_text_color(_color : Color) -> void:
59 | set("custom_colors/font_color", _color)
60 |
61 |
62 | func set_mode(_mode : int) -> void:
63 | mode = _mode
64 | set_text_color(colors.text[mode])
65 |
66 | func set_font_size(_size : int) -> void:
67 | font_size = _size
68 | get("custom_fonts/font").set("size", _size)
69 |
70 | func set_level(_level : int) -> void:
71 | level = _level
72 | match level:
73 | 0: set_font_size(40)
74 | 1: set_font_size(35)
75 | 2: set_font_size(25)
76 | 3: set_font_size(19)
77 | 4: set_font_size(16)
78 |
--------------------------------------------------------------------------------
/supabase-ui/res/icons/email.svg:
--------------------------------------------------------------------------------
1 |
2 |
62 |
--------------------------------------------------------------------------------
/supabase-ui/components/mode_btn/ModeBtn.tscn:
--------------------------------------------------------------------------------
1 | [gd_scene load_steps=7 format=2]
2 |
3 | [ext_resource path="res://supabase-ui/components/mode_btn/mode_btn.gd" type="Script" id=1]
4 | [ext_resource path="res://supabase-ui/res/fonts/roboto/Roboto-Medium.ttf" type="DynamicFontData" id=2]
5 | [ext_resource path="res://supabase-ui/basic/button/default/DefaultButton.tres" type="StyleBox" id=3]
6 | [ext_resource path="res://supabase-ui/res/icons/dark_mode_white_24dp.svg" type="Texture" id=4]
7 | [ext_resource path="res://supabase-ui/res/icons/light_mode_white_36dp.svg" type="Texture" id=5]
8 |
9 | [sub_resource type="DynamicFont" id=1]
10 | size = 15
11 | font_data = ExtResource( 2 )
12 |
13 | [node name="ModeButton" type="PanelContainer"]
14 | margin_right = 162.0
15 | margin_bottom = 42.0
16 | mouse_default_cursor_shape = 2
17 | custom_styles/panel = ExtResource( 3 )
18 | script = ExtResource( 1 )
19 | __meta__ = {
20 | "_edit_use_anchors_": false
21 | }
22 | textures = [ ExtResource( 4 ), ExtResource( 5 ) ]
23 | disabled = false
24 | icon_enabled = true
25 | texture = ExtResource( 4 )
26 | expand = true
27 | size = Vector2( 24, 24 )
28 | text_enabled = true
29 | text = "Dark Mode"
30 | font_size = 15
31 |
32 | [node name="ButtonContainer" type="HBoxContainer" parent="."]
33 | modulate = Color( 0.4, 0.4, 0.4, 1 )
34 | margin_left = 13.0
35 | margin_top = 9.0
36 | margin_right = 149.0
37 | margin_bottom = 33.0
38 | mouse_filter = 2
39 |
40 | [node name="Icon" type="TextureRect" parent="ButtonContainer"]
41 | margin_right = 24.0
42 | margin_bottom = 24.0
43 | rect_min_size = Vector2( 24, 24 )
44 | mouse_filter = 2
45 | size_flags_vertical = 4
46 | texture = ExtResource( 4 )
47 | expand = true
48 |
49 | [node name="Text" type="Label" parent="ButtonContainer"]
50 | margin_left = 28.0
51 | margin_top = 3.0
52 | margin_right = 136.0
53 | margin_bottom = 21.0
54 | size_flags_horizontal = 7
55 | custom_fonts/font = SubResource( 1 )
56 | custom_colors/font_color = Color( 1, 1, 1, 1 )
57 | custom_constants/shadow_offset_x = 0
58 | custom_constants/shadow_offset_y = 0
59 | text = "Dark Mode"
60 | align = 1
61 | valign = 1
62 |
63 | [node name="Tween" type="Tween" parent="."]
64 |
--------------------------------------------------------------------------------
/supabase-ui/res/icons/key.svg:
--------------------------------------------------------------------------------
1 |
2 |
65 |
--------------------------------------------------------------------------------
/supabase-ui/res/icons/lock.svg:
--------------------------------------------------------------------------------
1 |
2 |
72 |
--------------------------------------------------------------------------------
/supabase-ui/data_input/checkbox/Checkbox.tscn:
--------------------------------------------------------------------------------
1 | [gd_scene load_steps=8 format=2]
2 |
3 | [ext_resource path="res://supabase-ui/data_input/checkbox/checkbox.gd" type="Script" id=1]
4 | [ext_resource path="res://supabase-ui/res/icons/checkbox.png" type="Texture" id=2]
5 | [ext_resource path="res://supabase-ui/res/fonts/roboto/Roboto-Medium.ttf" type="DynamicFontData" id=3]
6 | [ext_resource path="res://supabase-ui/res/icons/un_checkbox.png" type="Texture" id=4]
7 |
8 | [sub_resource type="DynamicFont" id=1]
9 | size = 15
10 | font_data = ExtResource( 3 )
11 |
12 | [sub_resource type="Theme" id=2]
13 | resource_local_to_scene = true
14 | default_font = SubResource( 1 )
15 |
16 | [sub_resource type="StyleBoxEmpty" id=3]
17 | content_margin_left = 35.0
18 |
19 | [node name="Checkbox" type="VBoxContainer"]
20 | margin_right = 62.0
21 | margin_bottom = 28.0
22 | theme = SubResource( 2 )
23 | custom_constants/separation = 10
24 | script = ExtResource( 1 )
25 | __meta__ = {
26 | "_edit_use_anchors_": false
27 | }
28 | text = "Text"
29 | show_description = false
30 | description = "Description"
31 | font_size = 15
32 |
33 | [node name="CheckboxContainer" type="HBoxContainer" parent="."]
34 | margin_right = 62.0
35 | margin_bottom = 28.0
36 | mouse_filter = 2
37 |
38 | [node name="CheckBox" type="CheckBox" parent="CheckboxContainer"]
39 | modulate = Color( 1, 0.98, 0.94, 1 )
40 | margin_right = 28.0
41 | margin_bottom = 28.0
42 | mouse_filter = 1
43 | custom_icons/checked = ExtResource( 2 )
44 | custom_icons/unchecked = ExtResource( 4 )
45 | __meta__ = {
46 | "_edit_use_anchors_": false
47 | }
48 |
49 | [node name="Text" type="Label" parent="CheckboxContainer"]
50 | modulate = Color( 0.121569, 0.121569, 0.121569, 1 )
51 | margin_left = 32.0
52 | margin_top = 5.0
53 | margin_right = 62.0
54 | margin_bottom = 23.0
55 | text = "Text"
56 |
57 | [node name="Description" type="Label" parent="."]
58 | visible = false
59 | modulate = Color( 0.4, 0.4, 0.4, 1 )
60 | margin_top = 38.0
61 | margin_right = 114.0
62 | margin_bottom = 56.0
63 | custom_styles/normal = SubResource( 3 )
64 | text = "Description"
65 |
66 | [node name="Tween" type="Tween" parent="."]
67 |
68 | [connection signal="toggled" from="CheckboxContainer/CheckBox" to="." method="_on_CheckBox_toggled"]
69 |
--------------------------------------------------------------------------------
/supabase-ui/res/icons/loader-line.svg:
--------------------------------------------------------------------------------
1 |
2 |
57 |
--------------------------------------------------------------------------------
/supabase-ui/res/icons/inbox.svg:
--------------------------------------------------------------------------------
1 |
2 |
60 |
--------------------------------------------------------------------------------
/supabase-ui/basic/button/primary/PrimaryButton.tscn:
--------------------------------------------------------------------------------
1 | [gd_scene load_steps=5 format=2]
2 |
3 | [ext_resource path="res://supabase-ui/basic/button/primary/primary_button.gd" type="Script" id=1]
4 | [ext_resource path="res://supabase-ui/res/fonts/roboto/Roboto-Medium.ttf" type="DynamicFontData" id=2]
5 |
6 | [sub_resource type="StyleBoxFlat" id=1]
7 | resource_local_to_scene = true
8 | resource_name = "PrimaryButton"
9 | content_margin_left = 13.0
10 | content_margin_right = 13.0
11 | content_margin_top = 9.0
12 | content_margin_bottom = 9.0
13 | bg_color = Color( 0.141176, 0.705882, 0.494118, 1 )
14 | corner_radius_top_left = 5
15 | corner_radius_top_right = 5
16 | corner_radius_bottom_right = 5
17 | corner_radius_bottom_left = 5
18 | corner_detail = 20
19 | shadow_color = Color( 0, 0, 0, 0.0392157 )
20 | shadow_size = 1
21 | shadow_offset = Vector2( 0, 1.5 )
22 | anti_aliasing = false
23 |
24 | [sub_resource type="DynamicFont" id=2]
25 | size = 15
26 | font_data = ExtResource( 2 )
27 |
28 | [node name="PrimaryButton" type="PanelContainer"]
29 | margin_right = 130.0
30 | margin_bottom = 36.0
31 | mouse_default_cursor_shape = 2
32 | size_flags_horizontal = 0
33 | size_flags_vertical = 0
34 | custom_styles/panel = SubResource( 1 )
35 | script = ExtResource( 1 )
36 | __meta__ = {
37 | "_edit_use_anchors_": true
38 | }
39 | disabled = false
40 | icon_enabled = false
41 | texture = null
42 | expand = false
43 | size = Vector2( 24, 24 )
44 | text_enabled = true
45 | text = "Primary Button"
46 | font_size = 15
47 |
48 | [node name="ButtonContainer" type="HBoxContainer" parent="."]
49 | margin_left = 13.0
50 | margin_top = 9.0
51 | margin_right = 117.0
52 | margin_bottom = 27.0
53 | mouse_filter = 2
54 | custom_constants/separation = 10
55 | alignment = 1
56 |
57 | [node name="Icon" type="TextureRect" parent="ButtonContainer"]
58 | visible = false
59 | margin_right = 24.0
60 | margin_bottom = 24.0
61 | rect_min_size = Vector2( 24, 24 )
62 | rect_pivot_offset = Vector2( 12, 12 )
63 | mouse_filter = 2
64 | size_flags_vertical = 4
65 |
66 | [node name="Text" type="Label" parent="ButtonContainer"]
67 | margin_right = 104.0
68 | margin_bottom = 18.0
69 | size_flags_horizontal = 0
70 | custom_fonts/font = SubResource( 2 )
71 | custom_colors/font_color = Color( 1, 1, 1, 1 )
72 | text = "Primary Button"
73 | align = 1
74 | valign = 1
75 |
76 | [node name="Tween" type="Tween" parent="."]
77 |
--------------------------------------------------------------------------------
/supabase-ui/res/icons/loader.svg:
--------------------------------------------------------------------------------
1 |
2 |
86 |
--------------------------------------------------------------------------------
/supabase-ui/res/icons/loading.svg:
--------------------------------------------------------------------------------
1 |
2 |
97 |
--------------------------------------------------------------------------------
/supabase-ui/data_input/input/Input.tscn:
--------------------------------------------------------------------------------
1 | [gd_scene load_steps=12 format=2]
2 |
3 | [ext_resource path="res://supabase-ui/data_input/input/input.gd" type="Script" id=1]
4 | [ext_resource path="res://supabase-ui/res/fonts/roboto/Roboto-Regular.ttf" type="DynamicFontData" id=2]
5 | [ext_resource path="res://supabase-ui/res/fonts/roboto/Roboto-Medium.ttf" type="DynamicFontData" id=3]
6 |
7 | [sub_resource type="DynamicFont" id=1]
8 | size = 15
9 | font_data = ExtResource( 2 )
10 |
11 | [sub_resource type="Theme" id=2]
12 | resource_local_to_scene = true
13 | default_font = SubResource( 1 )
14 |
15 | [sub_resource type="StyleBoxEmpty" id=3]
16 | resource_local_to_scene = true
17 | content_margin_left = 15.0
18 | content_margin_right = 15.0
19 | content_margin_top = 15.0
20 | content_margin_bottom = 15.0
21 |
22 | [sub_resource type="DynamicFont" id=4]
23 | size = 15
24 | font_data = ExtResource( 3 )
25 |
26 | [sub_resource type="StyleBoxFlat" id=5]
27 | resource_local_to_scene = true
28 | content_margin_left = 14.0
29 | content_margin_right = 14.0
30 | content_margin_top = 9.0
31 | content_margin_bottom = 9.0
32 | bg_color = Color( 1, 1, 1, 1 )
33 | border_width_left = 1
34 | border_width_top = 1
35 | border_width_right = 1
36 | border_width_bottom = 1
37 | corner_radius_top_left = 6
38 | corner_radius_top_right = 6
39 | corner_radius_bottom_right = 6
40 | corner_radius_bottom_left = 6
41 | corner_detail = 20
42 | shadow_color = Color( 1, 1, 1, 0 )
43 | anti_aliasing = false
44 |
45 | [sub_resource type="StyleBoxEmpty" id=6]
46 |
47 | [sub_resource type="StyleBoxEmpty" id=7]
48 |
49 | [sub_resource type="StyleBoxEmpty" id=8]
50 |
51 | [node name="Input" type="PanelContainer"]
52 | anchor_right = 1.0
53 | anchor_bottom = 1.0
54 | theme = SubResource( 2 )
55 | custom_styles/panel = SubResource( 3 )
56 | script = ExtResource( 1 )
57 | __meta__ = {
58 | "_edit_use_anchors_": false
59 | }
60 | icon_enabled = false
61 | texture = null
62 | expand = null
63 | size = Vector2( 24, 24 )
64 | text = ""
65 | placeholder = ""
66 | secret = false
67 | show_name = true
68 | input_name = "Input Name"
69 | optional_name = ""
70 | show_description = false
71 | description = "Description"
72 | font_size = 15
73 |
74 | [node name="Container" type="VBoxContainer" parent="."]
75 | margin_left = 15.0
76 | margin_top = 15.0
77 | margin_right = 1009.0
78 | margin_bottom = 585.0
79 | custom_constants/separation = 10
80 | alignment = 1
81 |
82 | [node name="Top" type="HBoxContainer" parent="Container"]
83 | margin_top = 253.0
84 | margin_right = 994.0
85 | margin_bottom = 271.0
86 |
87 | [node name="Name" type="Label" parent="Container/Top"]
88 | modulate = Color( 0.121569, 0.121569, 0.121569, 1 )
89 | margin_right = 80.0
90 | margin_bottom = 18.0
91 | custom_fonts/font = SubResource( 4 )
92 | text = "Input Name"
93 |
94 | [node name="Optional" type="Label" parent="Container/Top"]
95 | modulate = Color( 0.4, 0.4, 0.4, 1 )
96 | margin_left = 84.0
97 | margin_right = 994.0
98 | margin_bottom = 18.0
99 | size_flags_horizontal = 11
100 | align = 2
101 |
102 | [node name="InputContainer" type="PanelContainer" parent="Container"]
103 | margin_top = 281.0
104 | margin_right = 994.0
105 | margin_bottom = 317.0
106 | custom_styles/panel = SubResource( 5 )
107 |
108 | [node name="Box" type="HBoxContainer" parent="Container/InputContainer"]
109 | modulate = Color( 0.254902, 0.254902, 0.254902, 1 )
110 | margin_left = 14.0
111 | margin_top = 9.0
112 | margin_right = 980.0
113 | margin_bottom = 27.0
114 | custom_constants/separation = 10
115 |
116 | [node name="Icon" type="TextureRect" parent="Container/InputContainer/Box"]
117 | visible = false
118 | margin_right = 26.0
119 | margin_bottom = 26.0
120 | rect_min_size = Vector2( 24, 24 )
121 | expand = true
122 |
123 | [node name="Text" type="LineEdit" parent="Container/InputContainer/Box"]
124 | margin_right = 966.0
125 | margin_bottom = 18.0
126 | size_flags_horizontal = 3
127 | custom_styles/read_only = SubResource( 6 )
128 | custom_styles/focus = SubResource( 7 )
129 | custom_styles/normal = SubResource( 8 )
130 | custom_colors/selection_color = Color( 0.145098, 0.376471, 1, 1 )
131 | custom_colors/font_color_selected = Color( 1, 1, 1, 1 )
132 | custom_colors/font_color = Color( 1, 1, 1, 1 )
133 |
134 | [node name="Description" type="Label" parent="Container"]
135 | visible = false
136 | modulate = Color( 0.4, 0.4, 0.4, 1 )
137 | margin_top = 313.0
138 | margin_right = 994.0
139 | margin_bottom = 331.0
140 | text = "Description"
141 |
142 | [node name="Tween" type="Tween" parent="."]
143 |
144 | [connection signal="gui_input" from="Container/InputContainer/Box/Text" to="." method="_on_Text_gui_input"]
145 | [connection signal="text_changed" from="Container/InputContainer/Box/Text" to="." method="_on_Text_text_changed"]
146 | [connection signal="text_entered" from="Container/InputContainer/Box/Text" to="." method="_on_Text_text_entered"]
147 |
--------------------------------------------------------------------------------
/supabase-ui/data_input/checkbox/checkbox.gd:
--------------------------------------------------------------------------------
1 | tool
2 | extends VBoxContainer
3 | class_name SCheckBox
4 |
5 | signal pressed()
6 | signal released()
7 | signal toggled(toggle)
8 | signal hover()
9 |
10 | export (int, "Light Mode", "Dark Mode") var mode : int = 0 setget set_mode
11 |
12 | var colors : Dictionary = {
13 | "text" : [Color("#1F1F1F"), Color.white],
14 | "description" : [Color("#666666"), Color("#BBBBBB")],
15 | "border" : [Color.floralwhite, Color.floralwhite],
16 | "border_hover" : [Color.white, Color.white]
17 | }
18 |
19 | var font_size : int = 15 setget set_font_size
20 |
21 | var text : String = "" setget set_text
22 | var description : String = "Description" setget set_description
23 | var show_description : bool = false setget set_show_description
24 | var pressed : bool = false setget set_pressed
25 | var pressing : bool = false
26 |
27 | var property_list : Array = [
28 | {
29 | "class_name": "SChekBox",
30 | "hint": PROPERTY_HINT_NONE,
31 | "usage": PROPERTY_USAGE_CATEGORY,
32 | "name": "SCheckBox",
33 | "type": TYPE_STRING
34 | },
35 | {
36 | "usage": PROPERTY_USAGE_GROUP,
37 | "name": "Contents",
38 | "type": TYPE_STRING
39 | },
40 | {
41 | "usage": PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_SCRIPT_VARIABLE,
42 | "name": "text",
43 | "type": TYPE_STRING
44 | },
45 | {
46 | "usage": PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_SCRIPT_VARIABLE,
47 | "name": "pressed",
48 | "type": TYPE_BOOL
49 | },
50 | {
51 | "usage": PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_SCRIPT_VARIABLE,
52 | "name": "show_description",
53 | "type": TYPE_BOOL
54 | },
55 | {
56 | "usage": PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_SCRIPT_VARIABLE,
57 | "name": "description",
58 | "type": TYPE_STRING
59 | },
60 | {
61 | "usage": PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_SCRIPT_VARIABLE,
62 | "name": "font_size",
63 | "type": TYPE_INT
64 | }
65 | ]
66 |
67 |
68 | func _get_property_list():
69 | return property_list
70 |
71 |
72 |
73 | func _load_defaults():
74 | pass
75 |
76 | func _connect_signals():
77 | $CheckboxContainer/CheckBox.connect("mouse_entered", self, "_on_focus_entered")
78 | $CheckboxContainer/CheckBox.connect("mouse_exited", self, "_on_focus_exited")
79 |
80 | func _ready():
81 | _connect_signals()
82 | _load_defaults()
83 | set_mode(mode)
84 | set_text(text)
85 | set_pressed(pressed)
86 | add_to_group("supabase_components")
87 |
88 | func set_text(_text : String) -> void:
89 | text = _text
90 | if has_node("CheckboxContainer/Text"):
91 | get_node("CheckboxContainer/Text").set_text(_text)
92 |
93 | func set_pressed(_pressed : bool) -> void:
94 | pressed = _pressed
95 | if has_node("CheckboxContainer/CheckBox"):
96 | get_node("CheckboxContainer/CheckBox").pressed = pressed
97 |
98 | func get_text() -> String:
99 | return $CheckboxContainer/Text.get_text()
100 |
101 | func set_description(_text : String) -> void:
102 | description = _text
103 | if has_node("Description"):
104 | get_node("Description").set_text(_text)
105 |
106 |
107 | func set_text_color(_color : Color) -> void:
108 | if has_node("CheckboxContainer/Text"):
109 | get_node("CheckboxContainer/Text").modulate = _color
110 |
111 | func set_name_color(_color : Color) -> void:
112 | $CheckboxContainer/Text.modulate = _color
113 |
114 | func set_description_color(_color : Color) -> void:
115 | if has_node("Description"):
116 | get_node("Description").modulate = _color
117 |
118 | func get_description_color() -> Color:
119 | if has_node("Description"):
120 | return get_node("Description").modulate
121 | else:
122 | return colors.description[mode]
123 |
124 | func set_mode(_mode : int) -> void:
125 | mode = _mode
126 | set_text_color(colors.text[mode])
127 | set_description_color(colors.description[mode])
128 | set_border(colors.border[mode])
129 |
130 | func set_border(_color : Color) -> void:
131 | $CheckboxContainer/CheckBox.modulate = _color
132 |
133 | func get_border() -> Color:
134 | return $CheckboxContainer/CheckBox.modulate
135 |
136 |
137 | func set_font_size(_size : int) -> void:
138 | font_size = _size
139 | get("theme").get("default_font").set("size", _size)
140 |
141 |
142 | func set_show_description(_value : bool):
143 | show_description = _value
144 | if has_node("Description"): get_node("Description").visible = _value
145 |
146 | func _on_focus_entered():
147 | $Tween.interpolate_method(self, "set_border", get_border(), colors.border_hover[mode], 0.2, Tween.TRANS_LINEAR, Tween.EASE_OUT)
148 | $Tween.start()
149 |
150 | func _on_focus_exited():
151 | if $CheckboxContainer/CheckBox.pressed : return
152 | $Tween.interpolate_method(self, "set_border", get_border(), colors.border[mode], 0.2, Tween.TRANS_LINEAR, Tween.EASE_OUT)
153 | $Tween.start()
154 |
155 | func set_toggled(toggled : bool) -> void:
156 | $CheckboxContainer/CheckBox.pressed = toggled
157 |
158 | func _on_CheckBox_toggled(button_pressed):
159 | emit_signal("toggled", button_pressed)
160 |
--------------------------------------------------------------------------------
/supabase-ui/components/auth/auth.gd:
--------------------------------------------------------------------------------
1 | tool
2 | class_name SupabaseAuthPanel
3 | extends PanelContainer
4 |
5 | const colors : Dictionary = {
6 | "panel" : [Color.white, Color("#2a2a2a")]
7 | }
8 |
9 | signal signed_in(user)
10 | signal signed_up(user)
11 | signal magic_link_send()
12 | signal instructions_send()
13 | signal error(error)
14 |
15 | onready var sign_in_box : VBoxContainer = $Container/SignIn
16 | onready var sign_up_box : VBoxContainer = $Container/SignUp
17 | onready var forgot_password_box : VBoxContainer = $Container/ForgotPassword
18 | onready var with_magic_link_box : VBoxContainer = $Container/WithMagicLink
19 |
20 | onready var sign_in_error_lbl : SErrorLabel = sign_in_box.get_node("ErrorLbl")
21 | onready var sign_up_error_lbl : SErrorLabel = sign_up_box.get_node("ErrorLbl")
22 | onready var forgot_password_error_lbl : SErrorLabel = forgot_password_box.get_node("ErrorLbl")
23 | onready var magic_link_error_lbl : SErrorLabel = with_magic_link_box.get_node("ErrorLbl")
24 |
25 | export var app_name : String = "" setget set_app_name
26 | export (int, "Light Mode", "Dark Mode") var mode : int = 0 setget set_mode
27 |
28 | var remember_me : bool = false
29 |
30 | func _load_boxes():
31 |
32 | sign_in_box.show()
33 | sign_up_box.hide()
34 | forgot_password_box.hide()
35 | with_magic_link_box.hide()
36 |
37 | func load_user() -> void:
38 | if Engine.editor_hint: return
39 | var file : File = File.new()
40 | var err := file.open_encrypted_with_pass("user://user.data", File.READ, OS.get_unique_id())
41 | if err != OK:
42 | remember_me = false
43 | else:
44 | var content : Dictionary = parse_json(file.get_as_text())
45 | remember_me = content.get("remember_me", false)
46 | $Container/SignIn/HBoxContainer/Checkbox.set_toggled(remember_me)
47 | $Container/SignIn/EmailAddress.set_text(content.get("email", ""))
48 | $Container/SignIn/Password.set_text(content.get("pwd", ""))
49 | file.close()
50 |
51 | func save_user() -> void:
52 | if not remember_me: return
53 | var file : File = File.new()
54 | var err := file.open_encrypted_with_pass("user://user.data", File.WRITE, OS.get_unique_id())
55 | if err != OK:
56 | remember_me = false
57 | else:
58 | var content : Dictionary = {
59 | remember_me = remember_me,
60 | email = $Container/SignIn/EmailAddress.get_text(),
61 | pwd = $Container/SignIn/Password.get_text()
62 | }
63 | file.store_string(to_json(content))
64 | file.close()
65 |
66 | func _ready():
67 | add_to_group("supabase_components")
68 | _load_boxes()
69 | load_user()
70 | yield(Supabase, "ready")
71 | Supabase.auth.connect("error", self, "_on_auth_error")
72 |
73 |
74 | func _on_auth_error(error):
75 | printerr(error)
76 |
77 | func set_app_name(_name : String) -> void:
78 | app_name = _name
79 | $Container/Label.set_text(app_name)
80 |
81 | # =========== SIGN IN ==================
82 | func _on_SignInBtn_pressed():
83 | sign_in_error_lbl.hide()
84 | _force_resize()
85 | var user_mail : String = $Container/SignIn/EmailAddress.get_text()
86 | var user_pwd : String = $Container/SignIn/Password.get_text()
87 | if user_mail == "" or user_pwd == "":
88 | show_sign_in_error("You must provide either an email/password combination or a third-party provider.")
89 | return
90 | var sign_in : AuthTask = yield(Supabase.auth.sign_in(user_mail, user_pwd), "completed")
91 | if sign_in.error:
92 | show_sign_in_error(str(sign_in.error))
93 | return
94 | save_user()
95 | emit_signal("signed_in", sign_in.user)
96 | sign_in_box.get_node("SignInBtn").stop_loading()
97 |
98 | func show_sign_in_error(message : String) :
99 | sign_in_error_lbl.set_text(message)
100 | sign_in_error_lbl.show()
101 | emit_signal("error", message)
102 | sign_in_box.get_node("SignInBtn").stop_loading()
103 |
104 |
105 | # =========== SIGN UP ==================
106 | func _on_SignUpBtn_pressed():
107 | sign_up_error_lbl.hide()
108 | _force_resize()
109 | var user_mail : String = $Container/SignUp/EmailAddress.get_text()
110 | var user_pwd : String = $Container/SignUp/Password.get_text()
111 | if user_mail == "" or user_pwd == "":
112 | show_sign_up_error("You must provide either an email/password combination or a third-party provider.")
113 | return
114 | var sign_up : AuthTask = yield(Supabase.auth.sign_up(user_mail, user_pwd), "completed")
115 | if sign_up.error:
116 | show_sign_up_error(str(sign_up.error))
117 | return
118 | save_user()
119 | emit_signal("signed_up", sign_up.user)
120 | sign_up_box.get_node("SignUpBtn").stop_loading()
121 |
122 |
123 | func show_sign_up_error(message : String) :
124 | sign_up_error_lbl.set_text(message)
125 | sign_up_error_lbl.show()
126 | emit_signal("error", message)
127 | sign_up_box.get_node("SignUpBtn").stop_loading()
128 |
129 |
130 | # =========== FORGOT PASSWORD ==================
131 | func _on_SendInstructionsBtn_pressed():
132 | forgot_password_error_lbl.hide()
133 | _force_resize()
134 | var user_mail : String = $Container/ForgotPassword/EmailAddress.get_text()
135 | if user_mail == "":
136 | show_forgot_password_error("You must provide a mail to send the link to.")
137 | return
138 | var forgot_pwd : AuthTask = yield(Supabase.auth.reset_password_for_email(user_mail), "completed")
139 | if forgot_pwd.error:
140 | show_forgot_password_error(str(forgot_pwd.error))
141 | return
142 | emit_signal("instructions_send")
143 | forgot_password_box.get_node("SendInstructionsBtn").stop_loading()
144 |
145 |
146 | func show_forgot_password_error(message : String) :
147 | forgot_password_error_lbl.set_text(message)
148 | forgot_password_error_lbl.show()
149 | emit_signal("error", message)
150 | forgot_password_box.get_node("SendInstructionsBtn").stop_loading()
151 |
152 | # =========== MAGIC LINK ==================
153 | func _on_SendLinkBtn_pressed():
154 | magic_link_error_lbl.hide()
155 | _force_resize()
156 | var user_mail : String = $Container/WithMagicLink/EmailAddress.get_text()
157 | if user_mail == "":
158 | show_magic_link_error("You must provide a mail to send the link to.")
159 | return
160 | var magic_link : AuthTask = yield(Supabase.auth.send_magic_link(user_mail), "completed")
161 | if magic_link.error:
162 | show_magic_link_error(str(magic_link.error))
163 | return
164 | emit_signal("magic_link_send")
165 | with_magic_link_box.get_node("SendLinkBtn").stop_loading()
166 |
167 | func show_magic_link_error(message : String) :
168 | magic_link_error_lbl.set_text(message)
169 | magic_link_error_lbl.show()
170 | emit_signal("error", message)
171 | with_magic_link_box.get_node("SendLinkBtn").stop_loading()
172 |
173 |
174 | # ================================================
175 |
176 | func _on_ForgotPassword_pressed():
177 | sign_in_box.hide()
178 | forgot_password_box.show()
179 | _force_resize()
180 |
181 |
182 | func _on_MagicLink_pressed():
183 | sign_in_box.hide()
184 | with_magic_link_box.show()
185 | _force_resize()
186 |
187 |
188 | func _on_SignUp_pressed():
189 | sign_in_box.hide()
190 | sign_up_box.show()
191 | _force_resize()
192 |
193 |
194 | func _on_SignIn_pressed():
195 | sign_in_box.show()
196 | sign_up_box.hide()
197 | _force_resize()
198 |
199 |
200 | func _on_BackToSignIn_pressed():
201 | sign_in_box.show()
202 | forgot_password_box.hide()
203 | _force_resize()
204 |
205 |
206 | func _on_SignWithPassword_pressed():
207 | sign_in_box.show()
208 | with_magic_link_box.hide()
209 | _force_resize()
210 |
211 | func set_mode(_mode : int) :
212 | mode = _mode
213 | get("custom_styles/panel").set("bg_color", colors.panel[mode])
214 |
215 | func _force_resize() :
216 | hide()
217 | show()
218 |
219 | func _on_Checkbox_toggled(toggle):
220 | remember_me = toggle
221 |
--------------------------------------------------------------------------------
/supabase-ui/basic/button/default/default_button.gd:
--------------------------------------------------------------------------------
1 | tool
2 | extends PanelContainer
3 | class_name DefaultButton
4 |
5 | signal pressed()
6 | signal released()
7 | signal hover()
8 |
9 | export (int, "Light Mode", "Dark Mode") var mode : int = 0 setget set_mode
10 |
11 | var colors : Dictionary = {
12 | "text" : [Color("#414141"), Color.white],
13 | "text_hover" : [Color("#414141"), Color.white],
14 | "icon" : [Color("#414141"), Color.white ],
15 | "button" : [Color.white, Color("#2a2a2a")],
16 | "button_hover" : [Color.white, Color("#181818")],
17 | "button_disabled" : [Color.gray, Color.gray],
18 | "border" : [Color("#cccccc"), Color("#2a2a2a")],
19 | "border_hover" : [Color("#cccccc"), Color("#2a2a2a")],
20 | "shadow_size" : [1.5, 0]
21 | }
22 |
23 | var font_size : int = 15 setget set_font_size
24 |
25 | var icon_enabled : bool = false setget enable_icon
26 | var text_enabled : bool = true setget enable_text
27 | var texture : Texture = null setget set_texture
28 | var expand : bool = false setget set_expand
29 | var size : Vector2 = Vector2(24, 24) setget _set_size
30 | var text : String = "Default Button" setget set_text
31 | var disabled : bool = false setget set_disabled
32 |
33 | var pressing : bool = false
34 |
35 | var property_list : Array = [
36 | {
37 | "class_name": "DefaultButton",
38 | "hint": PROPERTY_HINT_NONE,
39 | "usage": PROPERTY_USAGE_CATEGORY,
40 | "name": "DefaultButton",
41 | "type": TYPE_STRING
42 | },
43 | {
44 | "usage": PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_SCRIPT_VARIABLE,
45 | "name": "disabled",
46 | "type": TYPE_BOOL
47 | },
48 | {
49 | "usage": PROPERTY_USAGE_GROUP,
50 | "name": "Icon",
51 | "type": TYPE_STRING
52 | },
53 | {
54 | "usage": PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_SCRIPT_VARIABLE,
55 | "name": "icon_enabled",
56 | "type": TYPE_BOOL
57 | },
58 | {
59 | "hint": PROPERTY_HINT_RESOURCE_TYPE,
60 | "usage": PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_SCRIPT_VARIABLE,
61 | "name": "texture",
62 | "hint_string": "Texture",
63 | "type": TYPE_OBJECT
64 | },
65 | {
66 | "usage": PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_SCRIPT_VARIABLE,
67 | "name": "expand",
68 | "type": TYPE_BOOL
69 | },
70 | {
71 | "usage": PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_SCRIPT_VARIABLE,
72 | "name": "size",
73 | "type": TYPE_VECTOR2
74 | },
75 | {
76 | "usage": PROPERTY_USAGE_GROUP,
77 | "name": "Contents",
78 | "type": TYPE_STRING
79 | },
80 | {
81 | "usage": PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_SCRIPT_VARIABLE,
82 | "name": "text_enabled",
83 | "type": TYPE_BOOL
84 | },
85 | {
86 | "usage": PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_SCRIPT_VARIABLE,
87 | "name": "text",
88 | "type": TYPE_STRING
89 | },
90 | {
91 | "usage": PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_SCRIPT_VARIABLE,
92 | "name": "font_size",
93 | "type": TYPE_INT
94 | }
95 | ]
96 |
97 |
98 | func _get_property_list():
99 | return property_list
100 |
101 | func _set(property, value):
102 | match property:
103 | "disabled":
104 | set_disabled(value)
105 | return true
106 | "texture":
107 | set_texture(value)
108 | return true
109 | "expand":
110 | set_expand(value)
111 | return true
112 | "size":
113 | _set_size(value)
114 | return true
115 | "icon_enabled":
116 | enable_icon(value)
117 | return true
118 | "text_enabled":
119 | enable_text(value)
120 | return true
121 | "text":
122 | set_text(value)
123 | return true
124 | "font_size":
125 | set_font_size(value)
126 | return true
127 |
128 | func _load_defaults():
129 | pass
130 |
131 | func _connect_signals():
132 | connect("mouse_entered", self, "_on_mouse_entered")
133 | connect("mouse_exited", self, "_on_mouse_exited")
134 |
135 | func _init():
136 | _load_defaults()
137 |
138 | func _ready():
139 | _connect_signals()
140 | set_mode(mode)
141 | set_texture(texture)
142 | set_text(text)
143 | _set_size(size)
144 |
145 | add_to_group("supabase_components")
146 |
147 | func set_disabled(_disabled : bool) -> void:
148 | disabled = _disabled
149 | if disabled:
150 | set_button_color(colors.button_disabled[mode])
151 | else:
152 | set_button_color(colors.button[mode])
153 |
154 | func set_texture(_texture : Texture) -> void:
155 | texture = _texture
156 | if has_node("ButtonContainer/Icon"):
157 | get_node("ButtonContainer/Icon").set_texture(texture)
158 |
159 |
160 | func set_expand(_expand : bool):
161 | expand = _expand
162 | if has_node("ButtonContainer/Icon"):
163 | get_node("ButtonContainer/Icon").expand = expand
164 |
165 | func _set_size(_size : Vector2):
166 | size = _size
167 | if has_node("ButtonContainer/Icon"):
168 | get_node("ButtonContainer/Icon").rect_min_size = size
169 |
170 | func set_text(_text : String) -> void:
171 | text = _text
172 | if has_node("ButtonContainer/Text"):
173 | get_node("ButtonContainer/Text").set_text(text)
174 |
175 |
176 | func set_text_color(_color : Color) -> void:
177 | if has_node("ButtonContainer"):
178 | get_node("ButtonContainer").modulate = _color
179 |
180 | func get_text_color() -> Color:
181 | if has_node("ButtonContainer/Text"):
182 | return get_node("ButtonContainer").modulate
183 | else:
184 | return colors.text[mode]
185 |
186 | func enable_icon(enabled : bool) -> void:
187 | icon_enabled = enabled
188 | if has_node("ButtonContainer/Icon"):
189 | get_node("ButtonContainer/Icon").show() if enabled else hide_icon()
190 |
191 | func enable_text(enabled : bool) -> void:
192 | text_enabled = enabled
193 | if has_node("ButtonContainer/Text"):
194 | get_node("ButtonContainer/Text").visible = enabled
195 |
196 | func set_mode(_mode : int) -> void:
197 | mode = _mode
198 | set_text_color(colors.text[mode])
199 | set_button_color(colors.button[mode])
200 | set_button_border(colors.border[mode])
201 | set_button_shadow(colors.shadow_size[mode])
202 | set_disabled(disabled)
203 |
204 | func get_button_color() -> Color:
205 | return get("custom_styles/panel").get("bg_color")
206 |
207 | func set_button_color(_color : Color) -> void:
208 | get("custom_styles/panel").set("bg_color", _color)
209 |
210 | func get_button_border() -> Color:
211 | return get("custom_styles/panel").get("border_color")
212 |
213 | func set_button_border(_color : Color) -> void:
214 | get("custom_styles/panel").set("border_color", _color)
215 |
216 | func set_button_shadow(_size : int) -> void:
217 | get("custom_styles/panel").set("shadow_size", _size)
218 |
219 | func set_font_size(_size : int) -> void:
220 | font_size = _size
221 | if has_node("ButtonContainer/Text"):
222 | get_node("ButtonContainer/Text").get("custom_fonts/font").set("size", _size)
223 |
224 | func _gui_input(event : InputEvent):
225 | if disabled: return
226 | if event is InputEventMouseButton:
227 | if event.get_button_index() == 1:
228 | if event.pressed:
229 | pressing = true
230 | _pressed()
231 | emit_signal("pressed")
232 | else:
233 | pressing = false
234 | _released()
235 | emit_signal("released")
236 |
237 | func _pressed() -> void:
238 | $Tween.stop_all()
239 |
240 | func _released() -> void:
241 | pass
242 |
243 | func hide_icon():
244 | get_node("ButtonContainer/Icon").hide()
245 | rect_size = Vector2.ZERO
246 |
247 | func _hover_after():
248 | pass
249 |
250 | func _hover_before():
251 | pass
252 |
253 | func hover_after():
254 | _hover_after()
255 | $Tween.interpolate_method(self, "set_button_color", get_button_color(), colors.button_hover[mode], 0.2, Tween.TRANS_LINEAR, Tween.EASE_OUT)
256 | $Tween.interpolate_method(self, "set_button_border", get_button_border(), colors.border_hover[mode], 0.2, Tween.TRANS_LINEAR, Tween.EASE_OUT)
257 | $Tween.interpolate_method(self, "set_text_color", get_text_color(), colors.text_hover[mode], 0.2, Tween.TRANS_LINEAR, Tween.EASE_OUT)
258 | $Tween.start()
259 |
260 |
261 | func hover_before():
262 | _hover_before()
263 | $Tween.interpolate_method(self, "set_button_color", get_button_color(), colors.button[mode], 0.2, Tween.TRANS_LINEAR, Tween.EASE_OUT)
264 | $Tween.interpolate_method(self, "set_button_border", get_button_border(), colors.border[mode], 0.2, Tween.TRANS_LINEAR, Tween.EASE_OUT)
265 | $Tween.interpolate_method(self, "set_text_color", get_text_color(), colors.text[mode], 0.2, Tween.TRANS_LINEAR, Tween.EASE_OUT)
266 | $Tween.start()
267 |
268 |
269 | func _on_mouse_entered():
270 | if disabled : return
271 | emit_signal("hover")
272 | hover_after()
273 |
274 | func _on_mouse_exited():
275 | if disabled : return
276 | hover_before()
277 |
--------------------------------------------------------------------------------
/supabase-ui/data_input/input/input.gd:
--------------------------------------------------------------------------------
1 | tool
2 | extends PanelContainer
3 | class_name SInput
4 |
5 | signal pressed()
6 | signal released()
7 | signal hover()
8 |
9 | signal text_changed(text)
10 | signal text_entered(text)
11 |
12 | export (int, "Light Mode", "Dark Mode") var mode : int = 0 setget set_mode
13 |
14 | var colors : Dictionary = {
15 | "text" : [Color("#414141"), Color.white],
16 | "input_name" : [Color("#1f1f1f"), Color("#E0E0E0")],
17 | "optional_name" : [Color("#666666"), Color("#BBBBBB")],
18 | "description" : [Color("#666666"), Color("#BBBBBB")],
19 |
20 | "panel" : [Color.white, Color("#2a2a2a")],
21 | "shadow" : [Color.transparent, Color.transparent],
22 | "shadow_hover" : [Color("#7755eab2"), Color("#7755eab2")],
23 | "border" : [Color("#cccccc"), Color("#cccccc")],
24 | "border_hover" : [Color("#24b47e"), Color("#24b47e")],
25 | "shadow_size" : [0, 0],
26 | "shadow_size_hover" : [3, 3]
27 | }
28 |
29 | var font_size : int = 15 setget set_font_size
30 |
31 | var icon_enabled : bool = false setget enable_icon
32 | var texture : Texture = null setget set_texture
33 | var size : Vector2 = Vector2(24, 24) setget _set_size
34 |
35 | var text : String = "" setget set_text
36 | var placeholder : String = "" setget set_placeholder
37 | var input_name : String = "Input Name" setget set_input_name
38 | var show_name : bool = true setget set_show_name
39 | var optional_name : String = "" setget set_optional_name
40 | var description : String = "Description" setget set_description
41 | var show_description : bool = false setget set_show_description
42 |
43 | var pressing : bool = false
44 | var secret : bool = false setget set_secret
45 |
46 | var property_list : Array = [
47 | {
48 | "class_name": "SInput",
49 | "hint": PROPERTY_HINT_NONE,
50 | "usage": PROPERTY_USAGE_CATEGORY,
51 | "name": "SInput",
52 | "type": TYPE_STRING
53 | },
54 | {
55 | "usage": PROPERTY_USAGE_GROUP,
56 | "name": "Icon",
57 | "type": TYPE_STRING
58 | },
59 | {
60 | "usage": PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_SCRIPT_VARIABLE,
61 | "name": "icon_enabled",
62 | "type": TYPE_BOOL
63 | },
64 | {
65 | "hint": PROPERTY_HINT_RESOURCE_TYPE,
66 | "usage": PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_SCRIPT_VARIABLE,
67 | "name": "texture",
68 | "hint_string": "Texture",
69 | "type": TYPE_OBJECT
70 | },
71 | {
72 | "usage": PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_SCRIPT_VARIABLE,
73 | "name": "expand",
74 | "type": TYPE_BOOL
75 | },
76 | {
77 | "usage": PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_SCRIPT_VARIABLE,
78 | "name": "size",
79 | "type": TYPE_VECTOR2
80 | },
81 | {
82 | "usage": PROPERTY_USAGE_GROUP,
83 | "name": "Contents",
84 | "type": TYPE_STRING
85 | },
86 | {
87 | "usage": PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_SCRIPT_VARIABLE,
88 | "name": "text",
89 | "type": TYPE_STRING
90 | },
91 | {
92 | "usage": PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_SCRIPT_VARIABLE,
93 | "name": "placeholder",
94 | "type": TYPE_STRING
95 | },
96 | {
97 | "usage": PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_SCRIPT_VARIABLE,
98 | "name": "secret",
99 | "type": TYPE_BOOL
100 | },
101 | {
102 | "usage": PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_SCRIPT_VARIABLE,
103 | "name": "show_name",
104 | "type": TYPE_BOOL
105 | },
106 | {
107 | "usage": PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_SCRIPT_VARIABLE,
108 | "name": "input_name",
109 | "type": TYPE_STRING
110 | },
111 | {
112 | "usage": PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_SCRIPT_VARIABLE,
113 | "name": "optional_name",
114 | "type": TYPE_STRING
115 | },
116 | {
117 | "usage": PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_SCRIPT_VARIABLE,
118 | "name": "show_description",
119 | "type": TYPE_BOOL
120 | },
121 | {
122 | "usage": PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_SCRIPT_VARIABLE,
123 | "name": "description",
124 | "type": TYPE_STRING
125 | },
126 | {
127 | "usage": PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_SCRIPT_VARIABLE,
128 | "name": "font_size",
129 | "type": TYPE_INT
130 | }
131 | ]
132 |
133 |
134 | func _get_property_list():
135 | return property_list
136 |
137 |
138 |
139 | func _load_defaults():
140 | pass
141 |
142 | func _connect_signals():
143 | $Container/InputContainer/Box/Text.connect("focus_entered", self, "_on_focus_entered")
144 | $Container/InputContainer/Box/Text.connect("focus_exited", self, "_on_focus_exited")
145 |
146 | func _ready():
147 | _connect_signals()
148 | _load_defaults()
149 | set_mode(mode)
150 | set_texture(texture)
151 | set_text(text)
152 | set_show_description(false)
153 | _set_size(size)
154 |
155 | add_to_group("supabase_components")
156 |
157 |
158 |
159 | func set_texture(_texture : Texture) -> void:
160 | texture = _texture
161 | if has_node("Container/InputContainer/Box/Icon"):
162 | get_node("Container/InputContainer/Box/Icon").set_texture(texture)
163 |
164 | func _set_size(_size : Vector2):
165 | size = _size
166 | if has_node("Container/InputContainer/Box/Icon"):
167 | get_node("Container/InputContainer/Box/Icon").rect_min_size = size
168 |
169 | func set_text(_text : String) -> void:
170 | text = _text
171 | if has_node("Container/InputContainer/Box/Text"):
172 | get_node("Container/InputContainer/Box/Text").set_text(_text)
173 |
174 | func set_placeholder(_text : String) -> void:
175 | placeholder = _text
176 | if has_node("Container/InputContainer/Box/Text"):
177 | get_node("Container/InputContainer/Box/Text").set_placeholder(_text)
178 |
179 | func get_text() -> String:
180 | return $Container/InputContainer/Box/Text.get_text()
181 |
182 | func set_input_name(_text : String) -> void:
183 | input_name = _text
184 | if has_node("Container/Top/Name"):
185 | get_node("Container/Top/Name").set_text(_text)
186 |
187 | func set_optional_name(_text : String) -> void:
188 | optional_name = _text
189 | if has_node("Container/Top/Optional"):
190 | get_node("Container/Top/Optional").set_text(_text)
191 |
192 | func set_description(_text : String) -> void:
193 | description = _text
194 | if has_node("Container/Description"):
195 | get_node("Container/Description").set_text(_text)
196 |
197 |
198 | func set_text_color(_color : Color) -> void:
199 | if has_node("Container/InputContainer/Box"):
200 | get_node("Container/InputContainer/Box").modulate = _color
201 |
202 | func set_name_color(_color : Color) -> void:
203 | $Container/Top/Name.modulate = _color
204 |
205 | func set_description_color(_color : Color) -> void:
206 | if has_node("Container/Description"):
207 | get_node("Container/Description").modulate = _color
208 | if has_node("Container/Top/Optional"):
209 | get_node("Container/Top/Optional").modulate = _color
210 |
211 | func get_description_color() -> Color:
212 | if has_node("Container/Description"):
213 | return get_node("Container/Description").modulate
214 | else:
215 | return colors.description[mode]
216 |
217 | func enable_icon(enabled : bool) -> void:
218 | icon_enabled = enabled
219 | if has_node("Container/InputContainer/Box/Icon"):
220 | get_node("Container/InputContainer/Box/Icon").show() if enabled else hide_icon()
221 |
222 | func set_mode(_mode : int) -> void:
223 | mode = _mode
224 | set_text_color(colors.text[mode])
225 | set_name_color(colors.input_name[mode])
226 | set_description_color(colors.description[mode])
227 | set_panel_color(colors.panel[mode])
228 | set_border(colors.border[mode])
229 | set_shadow_size(colors.shadow_size[mode])
230 | set_shadow_color(colors.shadow[mode])
231 |
232 | func set_panel_color(_color : Color) -> void:
233 | $Container/InputContainer.get("custom_styles/panel").set("bg_color", _color)
234 |
235 | func set_border(_color : Color) -> void:
236 | $Container/InputContainer.get("custom_styles/panel").set("border_color", _color)
237 |
238 | func get_border() -> Color:
239 | return $Container/InputContainer.get("custom_styles/panel").get("border_color")
240 |
241 | func set_shadow_color(_color : Color) -> void:
242 | $Container/InputContainer.get("custom_styles/panel").set("shadow_color", _color)
243 |
244 | func get_shadow_color() -> Color:
245 | return $Container/InputContainer.get("custom_styles/panel").get("shadow_color")
246 |
247 | func set_shadow_size(_size : int) -> void:
248 | $Container/InputContainer.get("custom_styles/panel").set("shadow_size", _size)
249 |
250 | func get_shadow_size() -> int:
251 | return $Container/InputContainer.get("custom_styles/panel").get("shadow_size")
252 |
253 |
254 | func set_font_size(_size : int) -> void:
255 | font_size = _size
256 | get("theme").get("default_font").set("size", _size)
257 | if has_node("Container/Top/Name"):
258 | get_node("Container/Top/Name").get("custom_fonts/font").set("size", _size)
259 |
260 | func hide_icon():
261 | get_node("Container/InputContainer/Box/Icon").hide()
262 |
263 | func set_show_description(_value : bool):
264 | show_description = _value
265 | if has_node("Container/Description"): get_node("Container/Description").visible = _value
266 |
267 | func set_show_name(_value : bool) :
268 | show_name = _value
269 | if has_node("Container/Top"): get_node("Container/Top").visible = show_name
270 |
271 | func _on_focus_entered():
272 | $Tween.interpolate_method(self, "set_shadow_size", get_shadow_size(), colors.shadow_size_hover[mode], 0.2, Tween.TRANS_LINEAR, Tween.EASE_OUT)
273 | $Tween.interpolate_method(self, "set_shadow_color", get_shadow_color(), colors.shadow_hover[mode], 0.2, Tween.TRANS_LINEAR, Tween.EASE_OUT)
274 | $Tween.interpolate_method(self, "set_border", get_border(), colors.border_hover[mode], 0.2, Tween.TRANS_LINEAR, Tween.EASE_OUT)
275 | $Tween.start()
276 |
277 | func _on_focus_exited():
278 | $Tween.interpolate_method(self, "set_shadow_size", get_shadow_size(), colors.shadow_size[mode], 0.2, Tween.TRANS_LINEAR, Tween.EASE_OUT)
279 | $Tween.interpolate_method(self, "set_shadow_size", get_shadow_color(), colors.shadow[mode], 0.2, Tween.TRANS_LINEAR, Tween.EASE_OUT)
280 | $Tween.interpolate_method(self, "set_border", get_border(), colors.border[mode], 0.2, Tween.TRANS_LINEAR, Tween.EASE_OUT)
281 | $Tween.start()
282 |
283 |
284 | func set_secret(_secret : bool) -> void:
285 | secret = _secret
286 | if has_node("Container/InputContainer/Box/Text"): get_node("Container/InputContainer/Box/Text").secret = _secret
287 |
288 |
289 | func _on_Text_text_changed(new_text):
290 | emit_signal("text_changed", new_text)
291 |
292 |
293 | func _on_Text_text_entered(new_text):
294 | emit_signal("text_entered", new_text)
295 |
296 | func clear():
297 | $Container/InputContainer/Box/Text.clear()
298 |
299 |
300 |
301 | func _on_Text_gui_input(event):
302 | if event is InputEventMouseButton:
303 | if event.get_button_index() == 1 and event.is_pressed():
304 | emit_signal("pressed")
305 |
--------------------------------------------------------------------------------
/supabase-ui/components/auth/Auth.tscn:
--------------------------------------------------------------------------------
1 | [gd_scene load_steps=42 format=2]
2 |
3 | [ext_resource path="res://supabase-ui/data_input/input/Input.tscn" type="PackedScene" id=1]
4 | [ext_resource path="res://supabase-ui/res/icons/email.svg" type="Texture" id=2]
5 | [ext_resource path="res://supabase-ui/res/icons/key.svg" type="Texture" id=3]
6 | [ext_resource path="res://supabase-ui/data_input/checkbox/Checkbox.tscn" type="PackedScene" id=4]
7 | [ext_resource path="res://supabase-ui/basic/button/link/Link.tscn" type="PackedScene" id=5]
8 | [ext_resource path="res://supabase-ui/res/fonts/roboto/Roboto-Regular.ttf" type="DynamicFontData" id=6]
9 | [ext_resource path="res://supabase-ui/res/fonts/roboto/Roboto-Medium.ttf" type="DynamicFontData" id=7]
10 | [ext_resource path="res://supabase-ui/basic/typography/base_label/BaseLabel.tscn" type="PackedScene" id=8]
11 | [ext_resource path="res://supabase-ui/components/auth/auth.gd" type="Script" id=9]
12 | [ext_resource path="res://supabase-ui/res/icons/lock.svg" type="Texture" id=10]
13 | [ext_resource path="res://supabase-ui/res/icons/inbox.svg" type="Texture" id=11]
14 | [ext_resource path="res://supabase-ui/basic/button/primary/primary_button.gd" type="Script" id=12]
15 | [ext_resource path="res://supabase-ui/data_input/input/input.gd" type="Script" id=13]
16 | [ext_resource path="res://supabase-ui/basic/typography/error_label/ErrorLabel.tscn" type="PackedScene" id=14]
17 |
18 | [sub_resource type="StyleBoxFlat" id=1]
19 | content_margin_left = 20.0
20 | content_margin_right = 20.0
21 | content_margin_top = 20.0
22 | content_margin_bottom = 20.0
23 | bg_color = Color( 1, 1, 1, 1 )
24 | border_width_left = 1
25 | border_width_top = 1
26 | border_width_right = 1
27 | border_width_bottom = 1
28 | corner_radius_top_left = 5
29 | corner_radius_top_right = 5
30 | corner_radius_bottom_right = 5
31 | corner_radius_bottom_left = 5
32 | corner_detail = 20
33 |
34 | [sub_resource type="DynamicFont" id=2]
35 | resource_local_to_scene = true
36 | size = 25
37 | font_data = ExtResource( 6 )
38 |
39 | [sub_resource type="DynamicFont" id=3]
40 | size = 15
41 | font_data = ExtResource( 6 )
42 |
43 | [sub_resource type="Theme" id=4]
44 | resource_local_to_scene = true
45 | default_font = SubResource( 3 )
46 |
47 | [sub_resource type="StyleBoxEmpty" id=5]
48 | resource_local_to_scene = true
49 | content_margin_left = 15.0
50 | content_margin_right = 15.0
51 | content_margin_top = 15.0
52 | content_margin_bottom = 15.0
53 |
54 | [sub_resource type="DynamicFont" id=6]
55 | size = 15
56 | font_data = ExtResource( 7 )
57 |
58 | [sub_resource type="StyleBoxFlat" id=7]
59 | resource_local_to_scene = true
60 | content_margin_left = 14.0
61 | content_margin_right = 14.0
62 | content_margin_top = 9.0
63 | content_margin_bottom = 9.0
64 | bg_color = Color( 1, 1, 1, 1 )
65 | border_width_left = 1
66 | border_width_top = 1
67 | border_width_right = 1
68 | border_width_bottom = 1
69 | corner_radius_top_left = 6
70 | corner_radius_top_right = 6
71 | corner_radius_bottom_right = 6
72 | corner_radius_bottom_left = 6
73 | corner_detail = 20
74 | shadow_color = Color( 1, 1, 1, 0 )
75 | anti_aliasing = false
76 |
77 | [sub_resource type="StyleBoxEmpty" id=8]
78 |
79 | [sub_resource type="StyleBoxEmpty" id=9]
80 |
81 | [sub_resource type="StyleBoxEmpty" id=10]
82 |
83 | [sub_resource type="Theme" id=11]
84 | resource_local_to_scene = true
85 | default_font = SubResource( 3 )
86 |
87 | [sub_resource type="StyleBoxEmpty" id=12]
88 | resource_local_to_scene = true
89 | content_margin_left = 15.0
90 | content_margin_right = 15.0
91 | content_margin_top = 15.0
92 | content_margin_bottom = 15.0
93 |
94 | [sub_resource type="DynamicFont" id=13]
95 | size = 15
96 | font_data = ExtResource( 7 )
97 |
98 | [sub_resource type="Theme" id=14]
99 | resource_local_to_scene = true
100 | default_font = SubResource( 13 )
101 |
102 | [sub_resource type="StyleBoxEmpty" id=15]
103 |
104 | [sub_resource type="StyleBoxFlat" id=16]
105 | resource_local_to_scene = true
106 | content_margin_left = 13.0
107 | content_margin_right = 13.0
108 | content_margin_top = 9.0
109 | content_margin_bottom = 9.0
110 | bg_color = Color( 0.141176, 0.705882, 0.494118, 1 )
111 | corner_radius_top_left = 5
112 | corner_radius_top_right = 5
113 | corner_radius_bottom_right = 5
114 | corner_radius_bottom_left = 5
115 | corner_detail = 20
116 | shadow_color = Color( 0, 0, 0, 0.0392157 )
117 | shadow_size = 1
118 | shadow_offset = Vector2( 0, 1.5 )
119 | anti_aliasing = false
120 |
121 | [sub_resource type="DynamicFont" id=17]
122 | size = 15
123 | font_data = ExtResource( 7 )
124 |
125 | [sub_resource type="Theme" id=18]
126 | resource_local_to_scene = true
127 | default_font = SubResource( 3 )
128 |
129 | [sub_resource type="StyleBoxEmpty" id=19]
130 | resource_local_to_scene = true
131 | content_margin_left = 15.0
132 | content_margin_right = 15.0
133 | content_margin_top = 15.0
134 | content_margin_bottom = 15.0
135 |
136 | [sub_resource type="Theme" id=20]
137 | resource_local_to_scene = true
138 | default_font = SubResource( 3 )
139 |
140 | [sub_resource type="StyleBoxEmpty" id=21]
141 | resource_local_to_scene = true
142 | content_margin_left = 15.0
143 | content_margin_right = 15.0
144 | content_margin_top = 15.0
145 | content_margin_bottom = 15.0
146 |
147 | [sub_resource type="Theme" id=22]
148 | resource_local_to_scene = true
149 | default_font = SubResource( 13 )
150 |
151 | [sub_resource type="GDScript" id=23]
152 | script/source = "tool
153 | extends DefaultButton
154 | class_name PrimaryButton
155 |
156 | export var enable_loading : bool = false
157 |
158 | var loading_icon := load(\"res://supabase-ui/res/icons/loader.svg\")
159 | var loading : bool = false
160 |
161 | func load_anim():
162 | enable_icon(true)
163 | set_expand(true)
164 | set_texture(loading_icon)
165 | set_process_internal(true)
166 | loading = true
167 |
168 | func stop_loading() -> void:
169 | enable_icon(false)
170 | set_texture(texture)
171 | set_process_internal(false)
172 | loading = false
173 |
174 | func _notification(what : int) -> void:
175 | if what == NOTIFICATION_INTERNAL_PROCESS:
176 | _internal_process(get_process_delta_time())
177 |
178 | func _internal_process(_delta : float) -> void:
179 | $ButtonContainer/Icon.rect_rotation += _delta*240
180 |
181 |
182 |
183 | func _pressed():
184 | if enable_loading:
185 | if loading:
186 | stop_loading()
187 | else:
188 | load_anim()
189 |
190 | func _load_defaults():
191 | property_list[0][\"class_name\"] = \"PrimaryButton\"
192 | property_list[0][\"name\"] = \"PrimaryButton\"
193 |
194 | colors.text = [Color.white, Color.white]
195 | colors.text_hover = [Color.white, Color.white]
196 | colors.icon = [Color.white, Color.white]
197 | colors.button = [Color(\"#24b47e\"), Color(\"#24b47e\")]
198 | colors.button_hover = [Color(\"#4bd2a0\"), Color(\"#198c61\")]
199 |
200 | text = \"Primary Button\"
201 | "
202 |
203 | [sub_resource type="Theme" id=24]
204 | resource_local_to_scene = true
205 | default_font = SubResource( 3 )
206 |
207 | [sub_resource type="StyleBoxEmpty" id=25]
208 | resource_local_to_scene = true
209 | content_margin_left = 15.0
210 | content_margin_right = 15.0
211 | content_margin_top = 15.0
212 | content_margin_bottom = 15.0
213 |
214 | [sub_resource type="Theme" id=26]
215 | resource_local_to_scene = true
216 | default_font = SubResource( 3 )
217 |
218 | [sub_resource type="StyleBoxEmpty" id=27]
219 | resource_local_to_scene = true
220 | content_margin_left = 15.0
221 | content_margin_right = 15.0
222 | content_margin_top = 15.0
223 | content_margin_bottom = 15.0
224 |
225 | [node name="Auth" type="PanelContainer"]
226 | margin_right = 333.0
227 | margin_bottom = 454.0
228 | mouse_filter = 2
229 | size_flags_horizontal = 0
230 | size_flags_vertical = 0
231 | custom_styles/panel = SubResource( 1 )
232 | script = ExtResource( 9 )
233 | __meta__ = {
234 | "_edit_use_anchors_": false
235 | }
236 |
237 | [node name="Container" type="VBoxContainer" parent="."]
238 | margin_left = 20.0
239 | margin_top = 20.0
240 | margin_right = 313.0
241 | margin_bottom = 446.0
242 | mouse_filter = 2
243 | size_flags_horizontal = 3
244 | size_flags_vertical = 3
245 |
246 | [node name="Label" parent="Container" instance=ExtResource( 8 )]
247 | margin_left = 146.0
248 | margin_right = 146.0
249 | margin_bottom = 31.0
250 | size_flags_horizontal = 6
251 | custom_fonts/font = SubResource( 2 )
252 | custom_colors/font_color = Color( 0.121569, 0.121569, 0.121569, 1 )
253 | level = 2
254 | font_size = 25
255 |
256 | [node name="SignIn" type="VBoxContainer" parent="Container"]
257 | margin_top = 35.0
258 | margin_right = 293.0
259 | margin_bottom = 426.0
260 | mouse_filter = 2
261 | size_flags_horizontal = 3
262 | size_flags_vertical = 3
263 | custom_constants/separation = 10
264 |
265 | [node name="EmailAddress" type="PanelContainer" parent="Container/SignIn"]
266 | margin_right = 293.0
267 | margin_bottom = 100.0
268 | theme = SubResource( 4 )
269 | custom_styles/panel = SubResource( 5 )
270 | script = ExtResource( 13 )
271 | __meta__ = {
272 | "_edit_use_anchors_": false
273 | }
274 | icon_enabled = true
275 | texture = ExtResource( 2 )
276 | expand = null
277 | size = Vector2( 24, 24 )
278 | text = ""
279 | placeholder = ""
280 | secret = false
281 | show_name = true
282 | input_name = "Email Address"
283 | optional_name = ""
284 | show_description = false
285 | description = "Description"
286 | font_size = 15
287 |
288 | [node name="Container" type="VBoxContainer" parent="Container/SignIn/EmailAddress"]
289 | margin_left = 15.0
290 | margin_top = 15.0
291 | margin_right = 278.0
292 | margin_bottom = 85.0
293 | custom_constants/separation = 10
294 | alignment = 1
295 |
296 | [node name="Top" type="HBoxContainer" parent="Container/SignIn/EmailAddress/Container"]
297 | margin_right = 263.0
298 | margin_bottom = 18.0
299 |
300 | [node name="Name" type="Label" parent="Container/SignIn/EmailAddress/Container/Top"]
301 | modulate = Color( 0.121569, 0.121569, 0.121569, 1 )
302 | margin_right = 98.0
303 | margin_bottom = 18.0
304 | custom_fonts/font = SubResource( 6 )
305 | text = "Email Address"
306 |
307 | [node name="Optional" type="Label" parent="Container/SignIn/EmailAddress/Container/Top"]
308 | modulate = Color( 0.4, 0.4, 0.4, 1 )
309 | margin_left = 102.0
310 | margin_right = 263.0
311 | margin_bottom = 18.0
312 | size_flags_horizontal = 11
313 | align = 2
314 |
315 | [node name="InputContainer" type="PanelContainer" parent="Container/SignIn/EmailAddress/Container"]
316 | margin_top = 28.0
317 | margin_right = 263.0
318 | margin_bottom = 70.0
319 | custom_styles/panel = SubResource( 7 )
320 |
321 | [node name="Box" type="HBoxContainer" parent="Container/SignIn/EmailAddress/Container/InputContainer"]
322 | modulate = Color( 0.254902, 0.254902, 0.254902, 1 )
323 | margin_left = 14.0
324 | margin_top = 9.0
325 | margin_right = 249.0
326 | margin_bottom = 33.0
327 | custom_constants/separation = 10
328 |
329 | [node name="Icon" type="TextureRect" parent="Container/SignIn/EmailAddress/Container/InputContainer/Box"]
330 | margin_right = 24.0
331 | margin_bottom = 24.0
332 | rect_min_size = Vector2( 24, 24 )
333 | texture = ExtResource( 2 )
334 | expand = true
335 |
336 | [node name="Text" type="LineEdit" parent="Container/SignIn/EmailAddress/Container/InputContainer/Box"]
337 | margin_left = 34.0
338 | margin_right = 235.0
339 | margin_bottom = 24.0
340 | size_flags_horizontal = 3
341 | custom_styles/read_only = SubResource( 8 )
342 | custom_styles/focus = SubResource( 9 )
343 | custom_styles/normal = SubResource( 10 )
344 | custom_colors/selection_color = Color( 0.145098, 0.376471, 1, 1 )
345 | custom_colors/font_color_selected = Color( 1, 1, 1, 1 )
346 | custom_colors/font_color = Color( 1, 1, 1, 1 )
347 |
348 | [node name="Description" type="Label" parent="Container/SignIn/EmailAddress/Container"]
349 | visible = false
350 | modulate = Color( 0.4, 0.4, 0.4, 1 )
351 | margin_top = 313.0
352 | margin_right = 994.0
353 | margin_bottom = 331.0
354 | text = "Description"
355 |
356 | [node name="Tween" type="Tween" parent="Container/SignIn/EmailAddress"]
357 |
358 | [node name="Password" parent="Container/SignIn" instance=ExtResource( 1 )]
359 | anchor_right = 0.0
360 | anchor_bottom = 0.0
361 | margin_top = 110.0
362 | margin_right = 293.0
363 | margin_bottom = 210.0
364 | theme = SubResource( 11 )
365 | custom_styles/panel = SubResource( 12 )
366 | icon_enabled = true
367 | texture = ExtResource( 3 )
368 | secret = true
369 | input_name = "Password"
370 |
371 | [node name="HBoxContainer" type="HBoxContainer" parent="Container/SignIn"]
372 | margin_top = 220.0
373 | margin_right = 293.0
374 | margin_bottom = 248.0
375 |
376 | [node name="Checkbox" parent="Container/SignIn/HBoxContainer" instance=ExtResource( 4 )]
377 | margin_right = 131.0
378 | theme = SubResource( 14 )
379 | text = "Remember Me"
380 | pressed = false
381 |
382 | [node name="ForgotPassword" parent="Container/SignIn/HBoxContainer" instance=ExtResource( 5 )]
383 | margin_left = 135.0
384 | margin_top = 5.0
385 | margin_right = 293.0
386 | margin_bottom = 23.0
387 | size_flags_horizontal = 10
388 | text = "Forgot your password?"
389 |
390 | [node name="HSeparator" type="HSeparator" parent="Container/SignIn"]
391 | margin_top = 258.0
392 | margin_right = 293.0
393 | margin_bottom = 268.0
394 | custom_styles/separator = SubResource( 15 )
395 | custom_constants/separation = 10
396 |
397 | [node name="SignInBtn" type="PanelContainer" parent="Container/SignIn"]
398 | margin_top = 278.0
399 | margin_right = 293.0
400 | margin_bottom = 320.0
401 | mouse_default_cursor_shape = 2
402 | custom_styles/panel = SubResource( 16 )
403 | script = ExtResource( 12 )
404 | __meta__ = {
405 | "_edit_use_anchors_": true
406 | }
407 | enable_loading = true
408 | disabled = false
409 | icon_enabled = true
410 | texture = ExtResource( 10 )
411 | expand = true
412 | size = Vector2( 24, 24 )
413 | text_enabled = true
414 | text = "Sign In"
415 | font_size = 15
416 |
417 | [node name="ButtonContainer" type="HBoxContainer" parent="Container/SignIn/SignInBtn"]
418 | margin_left = 13.0
419 | margin_top = 9.0
420 | margin_right = 280.0
421 | margin_bottom = 33.0
422 | mouse_filter = 2
423 | alignment = 1
424 |
425 | [node name="Icon" type="TextureRect" parent="Container/SignIn/SignInBtn/ButtonContainer"]
426 | margin_left = 95.0
427 | margin_right = 119.0
428 | margin_bottom = 24.0
429 | rect_min_size = Vector2( 24, 24 )
430 | rect_pivot_offset = Vector2( 12, 12 )
431 | mouse_filter = 2
432 | size_flags_vertical = 4
433 | texture = ExtResource( 10 )
434 | expand = true
435 |
436 | [node name="Text" type="Label" parent="Container/SignIn/SignInBtn/ButtonContainer"]
437 | margin_left = 123.0
438 | margin_top = 3.0
439 | margin_right = 171.0
440 | margin_bottom = 21.0
441 | size_flags_horizontal = 0
442 | custom_fonts/font = SubResource( 17 )
443 | custom_colors/font_color = Color( 1, 1, 1, 1 )
444 | text = "Sign In"
445 | align = 1
446 | valign = 1
447 |
448 | [node name="Tween" type="Tween" parent="Container/SignIn/SignInBtn"]
449 |
450 | [node name="HSeparator2" type="HSeparator" parent="Container/SignIn"]
451 | margin_top = 330.0
452 | margin_right = 293.0
453 | margin_bottom = 335.0
454 | custom_styles/separator = SubResource( 15 )
455 | custom_constants/separation = 5
456 |
457 | [node name="MagicLink" parent="Container/SignIn" instance=ExtResource( 5 )]
458 | margin_top = 345.0
459 | margin_right = 293.0
460 | margin_bottom = 363.0
461 | focus_mode = 2
462 | size_flags_vertical = 1
463 | text = "Sign in with magic link"
464 |
465 | [node name="SignUp" parent="Container/SignIn" instance=ExtResource( 5 )]
466 | margin_top = 373.0
467 | margin_right = 293.0
468 | margin_bottom = 391.0
469 | focus_mode = 2
470 | size_flags_vertical = 1
471 | text = "Don't have an account? Sign up"
472 |
473 | [node name="ErrorLbl" parent="Container/SignIn" instance=ExtResource( 14 )]
474 | visible = false
475 | margin_top = 403.0
476 | margin_right = 984.0
477 | margin_bottom = 422.0
478 | align = 1
479 | valign = 1
480 | level = 4
481 | font_size = 16
482 |
483 | [node name="SignUp" type="VBoxContainer" parent="Container"]
484 | visible = false
485 | margin_top = 442.0
486 | margin_right = 984.0
487 | margin_bottom = 829.0
488 | size_flags_horizontal = 3
489 | size_flags_vertical = 3
490 | custom_constants/separation = 10
491 |
492 | [node name="EmailAddress" parent="Container/SignUp" instance=ExtResource( 1 )]
493 | anchor_right = 0.0
494 | anchor_bottom = 0.0
495 | margin_right = 984.0
496 | margin_bottom = 108.0
497 | theme = SubResource( 18 )
498 | custom_styles/panel = SubResource( 19 )
499 | icon_enabled = true
500 | texture = ExtResource( 2 )
501 | input_name = "Email Address"
502 |
503 | [node name="Password" parent="Container/SignUp" instance=ExtResource( 1 )]
504 | anchor_right = 0.0
505 | anchor_bottom = 0.0
506 | margin_top = 118.0
507 | margin_right = 984.0
508 | margin_bottom = 226.0
509 | theme = SubResource( 20 )
510 | custom_styles/panel = SubResource( 21 )
511 | icon_enabled = true
512 | texture = ExtResource( 3 )
513 | secret = true
514 | input_name = "Password"
515 |
516 | [node name="HBoxContainer" type="HBoxContainer" parent="Container/SignUp"]
517 | margin_top = 236.0
518 | margin_right = 984.0
519 | margin_bottom = 264.0
520 |
521 | [node name="Checkbox" parent="Container/SignUp/HBoxContainer" instance=ExtResource( 4 )]
522 | margin_right = 131.0
523 | theme = SubResource( 22 )
524 | text = "Remember Me"
525 | pressed = false
526 |
527 | [node name="HSeparator" type="HSeparator" parent="Container/SignUp"]
528 | margin_top = 274.0
529 | margin_right = 984.0
530 | margin_bottom = 284.0
531 | custom_styles/separator = SubResource( 15 )
532 | custom_constants/separation = 10
533 |
534 | [node name="SignUpBtn" type="PanelContainer" parent="Container/SignUp"]
535 | margin_top = 294.0
536 | margin_right = 984.0
537 | margin_bottom = 344.0
538 | mouse_default_cursor_shape = 2
539 | custom_styles/panel = SubResource( 16 )
540 | script = SubResource( 23 )
541 | __meta__ = {
542 | "_edit_use_anchors_": true
543 | }
544 | enable_loading = true
545 | disabled = false
546 | icon_enabled = true
547 | texture = ExtResource( 10 )
548 | expand = true
549 | size = Vector2( 24, 24 )
550 | text_enabled = true
551 | text = "Sign Up"
552 | font_size = 15
553 |
554 | [node name="ButtonContainer" type="HBoxContainer" parent="Container/SignUp/SignUpBtn"]
555 | margin_left = 13.0
556 | margin_top = 9.0
557 | margin_right = 971.0
558 | margin_bottom = 41.0
559 | mouse_filter = 2
560 | alignment = 1
561 |
562 | [node name="Icon" type="TextureRect" parent="Container/SignUp/SignUpBtn/ButtonContainer"]
563 | margin_left = 434.0
564 | margin_right = 466.0
565 | margin_bottom = 32.0
566 | rect_min_size = Vector2( 24, 24 )
567 | rect_pivot_offset = Vector2( 12, 12 )
568 | mouse_filter = 2
569 | size_flags_vertical = 4
570 | texture = ExtResource( 10 )
571 | expand = true
572 |
573 | [node name="Text" type="Label" parent="Container/SignUp/SignUpBtn/ButtonContainer"]
574 | margin_left = 470.0
575 | margin_top = 7.0
576 | margin_right = 524.0
577 | margin_bottom = 25.0
578 | size_flags_horizontal = 0
579 | custom_fonts/font = SubResource( 17 )
580 | custom_colors/font_color = Color( 1, 1, 1, 1 )
581 | text = "Sign Up"
582 | align = 1
583 | valign = 1
584 |
585 | [node name="Tween" type="Tween" parent="Container/SignUp/SignUpBtn"]
586 |
587 | [node name="HSeparator2" type="HSeparator" parent="Container/SignUp"]
588 | margin_top = 354.0
589 | margin_right = 984.0
590 | margin_bottom = 359.0
591 | custom_styles/separator = SubResource( 15 )
592 | custom_constants/separation = 5
593 |
594 | [node name="SignIn" parent="Container/SignUp" instance=ExtResource( 5 )]
595 | margin_left = 376.0
596 | margin_top = 369.0
597 | margin_right = 607.0
598 | margin_bottom = 387.0
599 | focus_mode = 2
600 | size_flags_horizontal = 6
601 | text = "Do you have an account? Sign up"
602 |
603 | [node name="ErrorLbl" parent="Container/SignUp" instance=ExtResource( 14 )]
604 | visible = false
605 | margin_top = 403.0
606 | margin_right = 984.0
607 | margin_bottom = 422.0
608 | align = 1
609 | valign = 1
610 | level = 4
611 | font_size = 16
612 |
613 | [node name="ForgotPassword" type="VBoxContainer" parent="Container"]
614 | visible = false
615 | margin_top = 23.0
616 | margin_right = 984.0
617 | margin_bottom = 829.0
618 | size_flags_horizontal = 3
619 | size_flags_vertical = 3
620 |
621 | [node name="EmailAddress" parent="Container/ForgotPassword" instance=ExtResource( 1 )]
622 | anchor_right = 0.0
623 | anchor_bottom = 0.0
624 | margin_right = 984.0
625 | margin_bottom = 108.0
626 | theme = SubResource( 24 )
627 | custom_styles/panel = SubResource( 25 )
628 | icon_enabled = true
629 | texture = ExtResource( 2 )
630 | placeholder = "Your email address"
631 | input_name = "Email Address"
632 |
633 | [node name="SendInstructionsBtn" type="PanelContainer" parent="Container/ForgotPassword"]
634 | margin_top = 112.0
635 | margin_right = 984.0
636 | margin_bottom = 162.0
637 | mouse_default_cursor_shape = 2
638 | custom_styles/panel = SubResource( 16 )
639 | script = SubResource( 23 )
640 | __meta__ = {
641 | "_edit_use_anchors_": true
642 | }
643 | enable_loading = true
644 | disabled = false
645 | icon_enabled = true
646 | texture = ExtResource( 11 )
647 | expand = true
648 | size = Vector2( 24, 24 )
649 | text_enabled = true
650 | text = "Send reset password instructions"
651 | font_size = 15
652 |
653 | [node name="ButtonContainer" type="HBoxContainer" parent="Container/ForgotPassword/SendInstructionsBtn"]
654 | margin_left = 13.0
655 | margin_top = 9.0
656 | margin_right = 971.0
657 | margin_bottom = 41.0
658 | mouse_filter = 2
659 | alignment = 1
660 |
661 | [node name="Icon" type="TextureRect" parent="Container/ForgotPassword/SendInstructionsBtn/ButtonContainer"]
662 | margin_left = 345.0
663 | margin_right = 377.0
664 | margin_bottom = 32.0
665 | rect_min_size = Vector2( 24, 24 )
666 | rect_pivot_offset = Vector2( 12, 12 )
667 | mouse_filter = 2
668 | size_flags_vertical = 4
669 | texture = ExtResource( 11 )
670 | expand = true
671 |
672 | [node name="Text" type="Label" parent="Container/ForgotPassword/SendInstructionsBtn/ButtonContainer"]
673 | margin_left = 381.0
674 | margin_top = 7.0
675 | margin_right = 612.0
676 | margin_bottom = 25.0
677 | size_flags_horizontal = 0
678 | custom_fonts/font = SubResource( 17 )
679 | custom_colors/font_color = Color( 1, 1, 1, 1 )
680 | text = "Send reset password instructions"
681 | align = 1
682 | valign = 1
683 |
684 | [node name="Tween" type="Tween" parent="Container/ForgotPassword/SendInstructionsBtn"]
685 |
686 | [node name="HSeparator3" type="HSeparator" parent="Container/ForgotPassword"]
687 | margin_top = 166.0
688 | margin_right = 984.0
689 | margin_bottom = 171.0
690 | custom_styles/separator = SubResource( 15 )
691 | custom_constants/separation = 5
692 |
693 | [node name="BackToSignIn" parent="Container/ForgotPassword" instance=ExtResource( 5 )]
694 | margin_top = 175.0
695 | margin_right = 125.0
696 | margin_bottom = 193.0
697 | focus_mode = 2
698 | size_flags_horizontal = 0
699 | text = "Go back to sign in"
700 |
701 | [node name="ErrorLbl" parent="Container/ForgotPassword" instance=ExtResource( 14 )]
702 | visible = false
703 | margin_top = 403.0
704 | margin_right = 984.0
705 | margin_bottom = 422.0
706 | align = 1
707 | valign = 1
708 | level = 4
709 | font_size = 16
710 |
711 | [node name="WithMagicLink" type="VBoxContainer" parent="Container"]
712 | visible = false
713 | margin_top = 442.0
714 | margin_right = 984.0
715 | margin_bottom = 635.0
716 | size_flags_horizontal = 3
717 | size_flags_vertical = 3
718 |
719 | [node name="EmailAddress" parent="Container/WithMagicLink" instance=ExtResource( 1 )]
720 | anchor_right = 0.0
721 | anchor_bottom = 0.0
722 | margin_right = 984.0
723 | margin_bottom = 108.0
724 | theme = SubResource( 26 )
725 | custom_styles/panel = SubResource( 27 )
726 | icon_enabled = true
727 | texture = ExtResource( 2 )
728 | placeholder = "Your email address"
729 | input_name = "Email Address"
730 |
731 | [node name="SendLinkBtn" type="PanelContainer" parent="Container/WithMagicLink"]
732 | margin_top = 112.0
733 | margin_right = 984.0
734 | margin_bottom = 162.0
735 | mouse_default_cursor_shape = 2
736 | custom_styles/panel = SubResource( 16 )
737 | script = SubResource( 23 )
738 | __meta__ = {
739 | "_edit_use_anchors_": true
740 | }
741 | enable_loading = true
742 | disabled = false
743 | icon_enabled = true
744 | texture = ExtResource( 11 )
745 | expand = true
746 | size = Vector2( 24, 24 )
747 | text_enabled = true
748 | text = "Send magic link"
749 | font_size = 15
750 |
751 | [node name="ButtonContainer" type="HBoxContainer" parent="Container/WithMagicLink/SendLinkBtn"]
752 | margin_left = 13.0
753 | margin_top = 9.0
754 | margin_right = 971.0
755 | margin_bottom = 41.0
756 | mouse_filter = 2
757 | custom_constants/separation = 10
758 | alignment = 1
759 |
760 | [node name="Icon" type="TextureRect" parent="Container/WithMagicLink/SendLinkBtn/ButtonContainer"]
761 | margin_left = 403.0
762 | margin_right = 435.0
763 | margin_bottom = 32.0
764 | rect_min_size = Vector2( 24, 24 )
765 | rect_pivot_offset = Vector2( 12, 12 )
766 | mouse_filter = 2
767 | size_flags_vertical = 4
768 | texture = ExtResource( 11 )
769 | expand = true
770 |
771 | [node name="Text" type="Label" parent="Container/WithMagicLink/SendLinkBtn/ButtonContainer"]
772 | margin_left = 445.0
773 | margin_top = 7.0
774 | margin_right = 555.0
775 | margin_bottom = 25.0
776 | size_flags_horizontal = 0
777 | custom_fonts/font = SubResource( 17 )
778 | custom_colors/font_color = Color( 1, 1, 1, 1 )
779 | text = "Send magic link"
780 | align = 1
781 | valign = 1
782 |
783 | [node name="Tween" type="Tween" parent="Container/WithMagicLink/SendLinkBtn"]
784 |
785 | [node name="HSeparator3" type="HSeparator" parent="Container/WithMagicLink"]
786 | margin_top = 166.0
787 | margin_right = 984.0
788 | margin_bottom = 171.0
789 | custom_styles/separator = SubResource( 15 )
790 | custom_constants/separation = 5
791 |
792 | [node name="SignWithPassword" parent="Container/WithMagicLink" instance=ExtResource( 5 )]
793 | margin_top = 175.0
794 | margin_right = 152.0
795 | margin_bottom = 193.0
796 | focus_mode = 2
797 | size_flags_horizontal = 0
798 | text = "Sign in with password"
799 |
800 | [node name="ErrorLbl" parent="Container/WithMagicLink" instance=ExtResource( 14 )]
801 | visible = false
802 | margin_top = 403.0
803 | margin_right = 984.0
804 | margin_bottom = 422.0
805 | align = 1
806 | valign = 1
807 | level = 4
808 | font_size = 16
809 |
810 | [connection signal="toggled" from="Container/SignIn/HBoxContainer/Checkbox" to="." method="_on_Checkbox_toggled"]
811 | [connection signal="pressed" from="Container/SignIn/HBoxContainer/ForgotPassword" to="." method="_on_ForgotPassword_pressed"]
812 | [connection signal="pressed" from="Container/SignIn/SignInBtn" to="." method="_on_SignInBtn_pressed"]
813 | [connection signal="pressed" from="Container/SignIn/MagicLink" to="." method="_on_MagicLink_pressed"]
814 | [connection signal="pressed" from="Container/SignIn/SignUp" to="." method="_on_SignUp_pressed"]
815 | [connection signal="pressed" from="Container/SignUp/SignUpBtn" to="." method="_on_SignUpBtn_pressed"]
816 | [connection signal="pressed" from="Container/SignUp/SignIn" to="." method="_on_SignIn_pressed"]
817 | [connection signal="pressed" from="Container/ForgotPassword/SendInstructionsBtn" to="." method="_on_SendInstructionsBtn_pressed"]
818 | [connection signal="pressed" from="Container/ForgotPassword/BackToSignIn" to="." method="_on_BackToSignIn_pressed"]
819 | [connection signal="pressed" from="Container/WithMagicLink/SendLinkBtn" to="." method="_on_SendLinkBtn_pressed"]
820 | [connection signal="pressed" from="Container/WithMagicLink/SignWithPassword" to="." method="_on_SignWithPassword_pressed"]
821 |
--------------------------------------------------------------------------------