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.

ScrollBar

繼承: Range < Control < CanvasItem < Node < Object

被繼承: HScrollBar, VScrollBar

捲軸的抽象基底類別。

說明

捲軸的抽象基底類別,通常用於對超出控制項可視區域的內容進行導覽。捲軸是基於 Range 的控制項。

屬性

float

custom_step

-1.0

FocusMode

focus_mode

3 (overrides Control)

float

step

0.0 (overrides Range)

主題屬性

Texture2D

decrement

Texture2D

decrement_highlight

Texture2D

decrement_pressed

Texture2D

increment

Texture2D

increment_highlight

Texture2D

increment_pressed

StyleBox

grabber

StyleBox

grabber_highlight

StyleBox

grabber_pressed

StyleBox

scroll

StyleBox

scroll_focus


訊號

scrolling() 🔗

當捲軸滾動時發出。


屬性說明

float custom_step = -1.0 🔗

  • void set_custom_step(value: float)

  • float get_custom_step()

覆蓋 在按下增和減按鈕時或在 ScrollBar 已獲得焦點且使用方向鍵時 的步長。


主題屬性說明

Texture2D decrement 🔗

作為按鈕使用的圖示,它用於使 ScrollBar 向左滾動。滾動步長由 custom_step 屬性值自訂。


Texture2D decrement_highlight 🔗

當滑鼠指標懸停在遞減按鈕上時顯示。


Texture2D decrement_pressed 🔗

在按下遞減按鈕時顯示。


Texture2D increment 🔗

作為按鈕使用的圖示,它用於使 ScrollBar 向右滾動。滾動步長由 custom_step 屬性值自訂。


Texture2D increment_highlight 🔗

當滑鼠指標懸停在差異量按鈕上時顯示。


Texture2D increment_pressed 🔗

在按下差異量按鈕時顯示。


StyleBox grabber 🔗

用作拖動條的紋理,表示目前的可拖動元素。


StyleBox grabber_highlight 🔗

當滑鼠懸停在拖動條上時使用。


StyleBox grabber_pressed 🔗

在拖動條被拖動時使用。


StyleBox scroll 🔗

用作此 ScrollBar 的背景。


StyleBox scroll_focus 🔗

ScrollBar 具有 GUI 焦點時用作背景。