# 第13章：スライダー要素

`Slider`構造体は、スライダーのUI要素を表します。背景の長方形、スライダーの長方形、背景とスライダー用の2つの色、値が変更されたときにトリガされるコールバック、および現在のスライダーの値が含まれています。 `render`メソッドは、スライダーを画面に描画する責任を持ち、`handle_mouse_click`メソッドはスライダーをマウスクリックのx座標に移動させます。`update_value`メソッドは、スライダーの長方形の位置に基づいて現在のスライダーの値を計算し、`on_value_changed_callback`をトリガします。 これにより、これらのGUI要素を管理することで、さまざまなアプリケーションのためのさまざまなユーザーインターフェースを作成することができます。


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://lados-organization.gitbook.io/goku/goku-game-engine_jp/13suraid.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
