diff --git a/scripts/loaders/common.gd b/scripts/loaders/common.gd index de8fabf..f3010b1 100644 --- a/scripts/loaders/common.gd +++ b/scripts/loaders/common.gd @@ -61,7 +61,7 @@ func update_window_scale(): # OS.window_size = base_resolution*scale shrink_timer.paused = false shrink_timer.start(1) - get_tree().set_screen_stretch(SceneTree.STRETCH_MODE_DISABLED, SceneTree.STRETCH_ASPECT_KEEP, base_resolution*scale, scale) + get_tree().set_screen_stretch(SceneTree.STRETCH_MODE_VIEWPORT, SceneTree.STRETCH_ASPECT_KEEP, base_resolution*scale, scale) func _ready(): shrink_timer.connect('timeout', self, 'shrink_to_integer') diff --git a/test/battle_sprites.gd b/test/battle_sprites.gd index a65a662..d6b9560 100644 --- a/test/battle_sprites.gd +++ b/test/battle_sprites.gd @@ -1,4 +1,4 @@ -extends Node2D +extends Control var PC = load('res://PC.tscn') var PCs = [] @@ -9,7 +9,7 @@ func _ready() -> void: for i in strips: PCs.append(PC.instance()) #PCs[-1].set_position(Vector2((i%strip_divide)*16, (i/strip_divide)*24*11)) - PCs[-1].set_position(Vector2((i%strip_divide)*24, (i/strip_divide)*32)) + PCs[-1].set_position(Vector2((i%strip_divide)*17, (i/strip_divide)*32)) PCs[-1].material.set_shader_param('palette', SpriteLoader.character_battle_sprite_palette_textures[i]) PCs[-1].texture = SpriteLoader.strip_textures[i] diff --git a/test/battle_sprites.tscn b/test/battle_sprites.tscn index 723869a..3381715 100644 --- a/test/battle_sprites.tscn +++ b/test/battle_sprites.tscn @@ -1,9 +1,10 @@ -[gd_scene load_steps=2 format=2] +[gd_scene load_steps=3 format=2] [ext_resource path="res://test/battle_sprites.gd" type="Script" id=1] +[ext_resource path="res://theme/menu_theme.tres" type="Theme" id=2] -[node name="battle_sprites" type="Node2D"] -scale = Vector2( 2, 2 ) +[node name="battle_sprites" type="Control"] +theme = ExtResource( 2 ) script = ExtResource( 1 ) [node name="OptionButton" type="OptionButton" parent="."] @@ -11,7 +12,6 @@ anchor_bottom = 0.67 margin_top = 160.0 margin_right = 100.0 margin_bottom = 180.0 -rect_scale = Vector2( 0.5, 0.5 ) text = "Stand" items = [ "Stand", null, false, 0, null, "Guard", null, false, 1, null, "Walk", null, false, 2, null, "Down", null, false, 3, null, "R_Swing", null, false, 4, null, "L_Swing", null, false, 5, null, "Cheer", null, false, 6, null, "Recoil", null, false, 7, null, "Chant", null, false, 8, null ] selected = 0 diff --git a/test_scene.tscn b/test_scene.tscn index f300a08..2a67544 100644 --- a/test_scene.tscn +++ b/test_scene.tscn @@ -1,19 +1,20 @@ -[gd_scene load_steps=6 format=2] +[gd_scene load_steps=7 format=2] [ext_resource path="res://palette_mat.tres" type="Material" id=1] [ext_resource path="res://test/worldmap_system.tscn" type="PackedScene" id=2] [ext_resource path="res://test_scene.gd" type="Script" id=3] [ext_resource path="res://test/battle_sprites.tscn" type="PackedScene" id=4] [ext_resource path="res://test/audio_system.tscn" type="PackedScene" id=5] +[ext_resource path="res://theme/menu_theme.tres" type="Theme" id=6] [node name="Control" type="Control"] anchor_right = 1.0 anchor_bottom = 1.0 +theme = ExtResource( 6 ) [node name="Node2D" type="Node2D" parent="."] material = ExtResource( 1 ) position = Vector2( 16, 16 ) -scale = Vector2( 2, 2 ) script = ExtResource( 3 ) [node name="audio_system" parent="." instance=ExtResource( 5 )] diff --git a/theme/menu_theme.tres b/theme/menu_theme.tres index ce8dfcf..befc350 100644 --- a/theme/menu_theme.tres +++ b/theme/menu_theme.tres @@ -61,8 +61,18 @@ Label/constants/line_spacing = 1 Label/constants/shadow_as_outline = 0 Label/constants/shadow_offset_x = 1 Label/constants/shadow_offset_y = 1 +OptionButton/constants/arrow_margin = 0 +OptionButton/constants/hseparation = 0 +OptionButton/styles/disabled = ExtResource( 2 ) +OptionButton/styles/focus = ExtResource( 2 ) +OptionButton/styles/hover = ExtResource( 2 ) +OptionButton/styles/normal = ExtResource( 2 ) +OptionButton/styles/pressed = ExtResource( 2 ) Panel/styles/panel = ExtResource( 2 ) PanelContainer/styles/panel = ExtResource( 2 ) +PopupMenu/styles/hover = ExtResource( 2 ) +PopupMenu/styles/panel = ExtResource( 2 ) +PopupMenu/styles/panel_disabled = ExtResource( 2 ) TabContainer/colors/font_color_bg = Color( 0.501961, 0.501961, 0.501961, 1 ) TabContainer/colors/font_color_fg = Color( 1, 1, 1, 1 ) TabContainer/styles/panel = ExtResource( 2 ) diff --git a/widgets/RomSelect.tscn b/widgets/RomSelect.tscn index b6b9bd7..138cd6e 100644 --- a/widgets/RomSelect.tscn +++ b/widgets/RomSelect.tscn @@ -66,9 +66,9 @@ size_flags_vertical = 1 text = "Filename:" [node name="mc" type="MarginContainer" parent="VBoxContainer/HBoxContainer/VBoxContainer"] -margin_top = 14.0 +margin_top = 15.0 margin_right = 148.0 -margin_bottom = 28.0 +margin_bottom = 29.0 custom_constants/margin_top = 0 custom_constants/margin_left = 12 custom_constants/margin_bottom = 0 @@ -82,16 +82,16 @@ text = "Test" autowrap = true [node name="lbl_type" type="Label" parent="VBoxContainer/HBoxContainer/VBoxContainer"] -margin_top = 28.0 +margin_top = 30.0 margin_right = 148.0 -margin_bottom = 42.0 +margin_bottom = 44.0 size_flags_vertical = 1 text = "Type:" [node name="mc2" type="MarginContainer" parent="VBoxContainer/HBoxContainer/VBoxContainer"] -margin_top = 42.0 +margin_top = 45.0 margin_right = 148.0 -margin_bottom = 56.0 +margin_bottom = 59.0 custom_constants/margin_top = 0 custom_constants/margin_left = 12 custom_constants/margin_bottom = 0 @@ -105,16 +105,16 @@ text = "Test" autowrap = true [node name="lbl_size" type="Label" parent="VBoxContainer/HBoxContainer/VBoxContainer"] -margin_top = 56.0 +margin_top = 60.0 margin_right = 148.0 -margin_bottom = 70.0 +margin_bottom = 74.0 size_flags_vertical = 1 text = "Size:" [node name="mc3" type="MarginContainer" parent="VBoxContainer/HBoxContainer/VBoxContainer"] -margin_top = 70.0 +margin_top = 75.0 margin_right = 148.0 -margin_bottom = 84.0 +margin_bottom = 89.0 custom_constants/margin_top = 0 custom_constants/margin_left = 12 custom_constants/margin_bottom = 0 @@ -128,16 +128,16 @@ text = "Test" autowrap = true [node name="lbl_info" type="Label" parent="VBoxContainer/HBoxContainer/VBoxContainer"] -margin_top = 84.0 +margin_top = 90.0 margin_right = 148.0 -margin_bottom = 98.0 +margin_bottom = 104.0 size_flags_vertical = 1 text = "Info:" [node name="mc4" type="MarginContainer" parent="VBoxContainer/HBoxContainer/VBoxContainer"] -margin_top = 98.0 +margin_top = 105.0 margin_right = 148.0 -margin_bottom = 163.0 +margin_bottom = 162.0 size_flags_vertical = 3 custom_constants/margin_top = 0 custom_constants/margin_left = 12 @@ -146,7 +146,7 @@ custom_constants/margin_bottom = 0 [node name="fileinfo" type="Label" parent="VBoxContainer/HBoxContainer/VBoxContainer/mc4"] margin_left = 12.0 margin_right = 148.0 -margin_bottom = 65.0 +margin_bottom = 57.0 size_flags_vertical = 3 text = "Test" autowrap = true