Remove CCS viewport letterboxing

This commit is contained in:
hz
2026-08-07 19:17:20 -05:00
parent 91690b2fe9
commit 2b25e25424
4 changed files with 18 additions and 12 deletions
+4 -3
View File
@@ -346,7 +346,8 @@ func _render_choice_page() -> void:
var option_text := str(option.get("text", ""))
var button := TextureButton.new()
button.set_meta("choice_id", choice_id)
button.custom_minimum_size = Vector2(350.0, 136.0)
button.custom_minimum_size = Vector2(0.0, 136.0)
button.size_flags_horizontal = Control.SIZE_EXPAND_FILL
button.ignore_texture_size = true
button.stretch_mode = TextureButton.STRETCH_SCALE
button.texture_normal = _crop_choice_texture(CHOICE_NORMAL)
@@ -363,9 +364,9 @@ func _render_choice_page() -> void:
var label := Label.new()
label.set_anchors_and_offsets_preset(Control.PRESET_FULL_RECT)
label.offset_left = 48.0
label.offset_left = 28.0
label.offset_top = 12.0
label.offset_right = -48.0
label.offset_right = -28.0
label.offset_bottom = -12.0
label.mouse_filter = Control.MOUSE_FILTER_IGNORE
label.add_theme_color_override("font_color", Color(0.055, 0.105, 0.145))
+3 -3
View File
@@ -379,6 +379,6 @@ func _fit_stage() -> void:
var available := size
if available.x <= 0.0 or available.y <= 0.0:
return
var fit_scale := minf(available.x / DESIGN_SIZE.x, available.y / DESIGN_SIZE.y)
stage_root.scale = Vector2.ONE * fit_scale
stage_root.position = (available - DESIGN_SIZE * fit_scale) * 0.5
stage_root.scale = Vector2.ONE
stage_root.position = Vector2.ZERO
stage_root.size = available