示例#1
0
 public static void CopyToNode(Godot.LineEdit control, Props?oldProps, Props props)
 {
     ControlComponent.CopyToNode(control, oldProps, props);
     if (control.Text != props.text)
     {
         control.Text = props.text;
     }
     props.onTextChanged?.Connect(control, "text_changed", oldProps?.onTextChanged);
     props.onTextEntered?.Connect(control, "text_entered", oldProps?.onTextEntered);
 }
示例#2
0
 public static void CopyToNode(Godot.BaseButton control, IBaseButtonProps?oldProps, IBaseButtonProps props)
 {
     ControlComponent.CopyToNode(control, oldProps, props);
     control.Disabled = props.disabled;
     props.onPressed?.Connect(control, "pressed", oldProps?.onPressed);
 }
示例#3
0
 public static void CopyToNode(Godot.BoxContainer control, IBoxContainerProps?oldProps, IBoxContainerProps props)
 {
     ControlComponent.CopyToNode(control, oldProps, props);
     control.Alignment = props.alignment;
 }
示例#4
0
 public static void CopyToNode(Godot.Label control, Props?oldProps, Props props)
 {
     ControlComponent.CopyToNode(control, oldProps, props);
     control.Text = props.text;
 }