Skip to content

Commit

Permalink
Themed popup dialogs
Browse files Browse the repository at this point in the history
  • Loading branch information
NiclasEriksen committed Sep 1, 2022
1 parent 2c08bd4 commit 9c87557
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 2 deletions.
48 changes: 47 additions & 1 deletion LeifProject/gui/theme.tres
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[gd_resource type="Theme" load_steps=6 format=2]
[gd_resource type="Theme" load_steps=9 format=2]

[ext_resource path="res://assets/Overpass-Medium.ttf" type="DynamicFontData" id=1]

Expand Down Expand Up @@ -51,10 +51,56 @@ corner_radius_bottom_left = 5
extra_spacing_top = 2
font_data = ExtResource( 1 )

[sub_resource type="StyleBoxFlat" id=8]
bg_color = Color( 0.0901961, 0.0901961, 0.0901961, 0.576471 )

[sub_resource type="StyleBoxFlat" id=10]
content_margin_left = 12.0
content_margin_right = 12.0
content_margin_top = 12.0
content_margin_bottom = 12.0
bg_color = Color( 0.196078, 0.196078, 0.196078, 0.952941 )
corner_radius_top_left = 8
corner_radius_top_right = 8
corner_radius_bottom_right = 8
corner_radius_bottom_left = 8
shadow_color = Color( 0, 0, 0, 0.556863 )
shadow_size = 16

[sub_resource type="StyleBoxFlat" id=9]
content_margin_left = 12.0
content_margin_right = 12.0
content_margin_top = 12.0
content_margin_bottom = 12.0
bg_color = Color( 0.196078, 0.196078, 0.196078, 0.952941 )
corner_radius_top_left = 8
corner_radius_top_right = 8
corner_radius_bottom_right = 8
corner_radius_bottom_left = 8
expand_margin_top = 24.0
shadow_color = Color( 0, 0, 0, 0.556863 )
shadow_size = 16

[resource]
default_font = SubResource( 3 )
Button/styles/focus = SubResource( 6 )
Button/styles/hover = SubResource( 5 )
Button/styles/normal = SubResource( 6 )
Button/styles/pressed = SubResource( 7 )
Label/fonts/font = SubResource( 3 )
Panel/styles/panel = SubResource( 8 )
PopupMenu/colors/font_color = Color( 0.88, 0.88, 0.88, 1 )
PopupMenu/colors/font_color_accel = Color( 0.7, 0.7, 0.7, 0.8 )
PopupMenu/colors/font_color_disabled = Color( 0.4, 0.4, 0.4, 0.8 )
PopupMenu/colors/font_color_hover = Color( 0.88, 0.88, 0.88, 1 )
PopupMenu/colors/font_color_separator = Color( 0.88, 0.88, 0.88, 1 )
PopupMenu/constants/hseparation = 4
PopupMenu/constants/vseparation = 4
PopupMenu/icons/checked = null
PopupMenu/icons/radio_checked = null
PopupMenu/icons/radio_unchecked = null
PopupMenu/icons/submenu = null
PopupMenu/icons/unchecked = null
PopupMenu/styles/panel = SubResource( 10 )
WindowDialog/colors/title_color = Color( 1, 1, 1, 1 )
WindowDialog/styles/panel = SubResource( 9 )
2 changes: 1 addition & 1 deletion LeifProject/simulation/WorldContainer.gd
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ func _on_RestartButton_pressed():


func _on_LoadButton_pressed():
$CanvasLayer/LoadMenu.popup(Rect2(40, 40, 350, 200))
$CanvasLayer/LoadMenu.popup(Rect2(40, 40, 250, 200))
$CanvasLayer/LoadMenu.grab_focus()


Expand Down

0 comments on commit 9c87557

Please sign in to comment.