mirror of
https://github.com/Relintai/broken_seals.git
synced 2025-02-08 14:50:05 +01:00
Set up the rect property to expand horizontally.
This commit is contained in:
parent
a8dfb9a156
commit
11aa1e1b6a
@ -198,27 +198,34 @@ func add_slot_vector3(getter : String, setter : String, slot_name : String, step
|
|||||||
|
|
||||||
func add_slot_rect2(getter : String, setter : String, slot_name : String, step : float = 0.1, prange : Vector2 = Vector2(-10000, 10000)) -> int:
|
func add_slot_rect2(getter : String, setter : String, slot_name : String, step : float = 0.1, prange : Vector2 = Vector2(-10000, 10000)) -> int:
|
||||||
var bc : VBoxContainer = VBoxContainer.new()
|
var bc : VBoxContainer = VBoxContainer.new()
|
||||||
|
bc.size_flags_horizontal = SIZE_EXPAND_FILL
|
||||||
|
|
||||||
var l : Label = Label.new()
|
var l : Label = Label.new()
|
||||||
l.text = slot_name
|
l.text = slot_name
|
||||||
bc.add_child(l)
|
bc.add_child(l)
|
||||||
|
|
||||||
var hc1 : HBoxContainer = HBoxContainer.new()
|
var hc1 : HBoxContainer = HBoxContainer.new()
|
||||||
|
hc1.size_flags_horizontal = SIZE_EXPAND_FILL
|
||||||
bc.add_child(hc1)
|
bc.add_child(hc1)
|
||||||
|
|
||||||
var sbx : SpinBox = SpinBox.new()
|
var sbx : SpinBox = SpinBox.new()
|
||||||
|
sbx.size_flags_horizontal = SIZE_EXPAND_FILL
|
||||||
hc1.add_child(sbx)
|
hc1.add_child(sbx)
|
||||||
|
|
||||||
var sby : SpinBox = SpinBox.new()
|
var sby : SpinBox = SpinBox.new()
|
||||||
|
sby.size_flags_horizontal = SIZE_EXPAND_FILL
|
||||||
hc1.add_child(sby)
|
hc1.add_child(sby)
|
||||||
|
|
||||||
var hc2 : HBoxContainer = HBoxContainer.new()
|
var hc2 : HBoxContainer = HBoxContainer.new()
|
||||||
|
hc2.size_flags_horizontal = SIZE_EXPAND_FILL
|
||||||
bc.add_child(hc2)
|
bc.add_child(hc2)
|
||||||
|
|
||||||
var sbw : SpinBox = SpinBox.new()
|
var sbw : SpinBox = SpinBox.new()
|
||||||
|
sbw.size_flags_horizontal = SIZE_EXPAND_FILL
|
||||||
hc2.add_child(sbw)
|
hc2.add_child(sbw)
|
||||||
|
|
||||||
var sbh : SpinBox = SpinBox.new()
|
var sbh : SpinBox = SpinBox.new()
|
||||||
|
sbh.size_flags_horizontal = SIZE_EXPAND_FILL
|
||||||
hc2.add_child(sbh)
|
hc2.add_child(sbh)
|
||||||
|
|
||||||
var slot_idx : int = add_slot(getter, setter, bc)
|
var slot_idx : int = add_slot(getter, setter, bc)
|
||||||
|
Loading…
Reference in New Issue
Block a user