SonolusHaniwa
  • 1. 概述
  • 2. ハニプレ
  • 3. ユメステ
  • 4. Stellarity
  • 5. Phigros
  • 首页

    • 1. 概述
  • 玩家

    • 2. 安装服务
    • 3. 配置文件标准
    • 4. 服务使用方法
  • 开发者

    • 5. 自定义搜索函数
    • 6. 自定义资源创建接口
    • 7. 插件开发标准
  • 其他

    • 8. 更新日志
    • 9. 关于 srp 资源包
  • 1. 搭建开发环境
  • 2. Sonolus 基础
  • 3. 配置项目信息
  • 4. 基本数据类型
  • 5. 函数与语句块
  • 6. 注意事项
  • 1. 游玩模式基础
  • Index

    • 1. Introduce
  • Basics

    • 1. Index
    • 2. Types
    • 3. Statements
    • 4. Resources
    • 5. Projects
    • 6. Commands
  • API

    • Index
    • Macros
    • Builtins
    • Engine Options
    • Engine UI
    • Play Mode
    • Tutorial Mode
    • Preview Mode
    • Watch Mode
  • 1. 概述
  • 2. ハニプレ
  • 3. ユメステ
  • 4. Stellarity
  • 5. Phigros
  • 首页

    • 1. 概述
  • 玩家

    • 2. 安装服务
    • 3. 配置文件标准
    • 4. 服务使用方法
  • 开发者

    • 5. 自定义搜索函数
    • 6. 自定义资源创建接口
    • 7. 插件开发标准
  • 其他

    • 8. 更新日志
    • 9. 关于 srp 资源包
  • 1. 搭建开发环境
  • 2. Sonolus 基础
  • 3. 配置项目信息
  • 4. 基本数据类型
  • 5. 函数与语句块
  • 6. 注意事项
  • 1. 游玩模式基础
  • Index

    • 1. Introduce
  • Basics

    • 1. Index
    • 2. Types
    • 3. Statements
    • 4. Resources
    • 5. Projects
    • 6. Commands
  • API

    • Index
    • Macros
    • Builtins
    • Engine Options
    • Engine UI
    • Play Mode
    • Tutorial Mode
    • Preview Mode
    • Watch Mode
  • Index

    • 1. Introduce
  • Basics

    • 1. Index
    • 2. Types
    • 3. Statements
    • 4. Resources
    • 5. Projects
    • 6. Commands
  • API

    • Index
    • Macros
    • Builtins
    • Engine Options
    • Engine UI
    • Play Mode
    • Tutorial Mode
    • Preview Mode
    • Watch Mode

Engine Options

function SliderOption

Description: This function is used to create a slider option in the Sonolus app. It returns a proper Variable pointer pointing to a memory in the LevelOption or PreviewOption block.

Parameters:

ParameterTypeDefaultDescription
namestring""The name of the option. Standardized names start with # and are translated in the client language.
descriptionstring""Description shown below the option. If not specified, it will not be displayed.
standardboolfalseIndicates if the option is a standard option. See the wiki for detailed information.
advancedboolfalseIf true, the option will have a note stating it is for advanced players.
scopestring""The scope of the option. Values are saved and shared between levels based on this scope.
defdouble0The default value of the slider. Must be between min and max.
mindouble0The minimum value of the slider. Must be less than or equal to max.
maxdouble100The maximum value of the slider. Must be greater than or equal to min.
stepdouble1The step value for the slider. Must be greater than 0.
unitstring""The unit of the slider. "" or Text.PercentageUnit is recommended.

Returns:

TypeDescription
VariableA Variable pointer depending on the current build mode.

function ToggleOption

Description: This function is used to create a toggle option in the Sonolus app. It returns a proper Variable pointer pointing to a memory in the LevelOption or PreviewOption block.

Parameters:

ParameterTypeDefaultDescription
namestring""The name of the option. Standardized names start with # and are translated in the client language.
descriptionstring""Description shown below the option. If not specified, it will not be displayed.
standardboolfalseIndicates if the option is a standard option. See the wiki for detailed information.
advancedboolfalseIf true, the option will have a note stating it is for advanced players.
scopestring""The scope of the option. Values are saved and shared between levels based on this scope.
defboolfalseThe default value of the toggle. Only true or false is accepted.

Returns:

TypeDescription
VariableA Variable pointer depending on the current build mode.

function SelectOption

Description: This function is used to create a select option in the Sonolus app. It returns a proper Variable pointer pointing to a memory in the LevelOption or PreviewOption block.

Parameters:

ParameterTypeDefaultDescription
namestring""The name of the option. Standardized names start with # and are translated in the client language.
descriptionstring""Description shown below the option. If not specified, it will not be displayed.
standardboolfalseIndicates if the option is a standard option. See the wiki for detailed information.
advancedboolfalseIf true, the option will have a note stating it is for advanced players.
scopestring""The scope of the option. Values are saved and shared between levels based on this scope.
defint0The default value of the select. Must be between 0 and values.size() - 1.
valuesvector<string>{}The list of values for the select option. Standardized values start with # and are translated.

Returns:

TypeDescription
VariableA Variable pointer depending on the current build mode.
最近更新: 2025/8/2 12:40
Contributors: LittleYang0531
Prev
Builtins
Next
Engine UI