Attention: Here be dragons
This is the latest
(unstable) version of this documentation, which may document features
not available in or compatible with released stable versions of Godot.
Checking the stable version of the documentation...
SubViewportContainer
繼承: Container < Control < CanvasItem < Node < Object
用於顯示 SubViewport 內容的容器。
說明
顯示其 SubViewport 子節點內容的容器。除非啟用 stretch,否則會使用 SubViewport 的大小作為最小尺寸。
注意:更改 SubViewportContainer 的 Control.scale,將導致其內容出現扭曲。要更改其視覺大小,並且不造成失真,請改為調整節點的邊距(如果還不在容器中)。
注意:該 SubViewportContainer 會將滑鼠進入和滑鼠退出通知轉發到子視口。
屬性
focus_mode |
|
|
|
||
|
||
|
方法
_propagate_input_event(event: InputEvent) virtual const |
屬性說明
Configure, if either the SubViewportContainer or alternatively the Control nodes of its SubViewport children should be available as targets of mouse-related functionalities, like identifying the drop target in drag-and-drop operations or cursor shape of hovered Control node.
If false, the Control nodes inside its SubViewport children are considered as targets.
If true, the SubViewportContainer itself will be considered as a target.
如果為 true,子視口將自動調整為該控制項的大小。
注意:如果為 true,則會禁止手動改變其子節點的 SubViewport.size。
將子視口的有效解析度除以該值,同時保持比例。可以用來加速算繪。
例如子視口的大小為 1280×720,當 stretch_shrink 被設定為 2 時,將以 640×360 算繪,同時在該容器中佔據相同大小。
注意:stretch 必須為 true,才能使此屬性生效。
方法說明
bool _propagate_input_event(event: InputEvent) virtual const 🔗
實驗性: 此方法可能在未來版本中變更或移除。
Virtual method to be implemented by the user. If it returns true, the event is propagated to SubViewport children. Propagation doesn't happen if it returns false. If the function is not implemented, all events are propagated to SubViewports.