Skip to content

v2.4.0 - 鼠标更新 Mouse Update

Choose a tag to compare

@ChepleBob30 ChepleBob30 released this 23 Nov 07:39
· 24 commits to main since this release
  • 重命名FrontResource为BasicFrontResource。
  • 为部分资源添加了offset字段,用于改变资源位置(在完成位置计算后进行操作)。
  • 添加了PositionConfig,用于配置资源位置。
  • 移除了get_text_size方法,改为在调用时自动计算并添加到Text的新字段size中。
  • 新增MouseDetector(鼠标检测器)资源,用于检查特定范围内鼠标的操作。
  • 新增枚举MouseDetectorLevel,可以控制检测量,从而减少性能损耗。
  • 新增配套结构体MouseDetectorResult,用于储存鼠标检测结果。
  • 扩展了一个RustConstructorError错误类型: MouseDetectorNotFound。
  • 为几乎所有需要调用资源的函数添加safe_mode可选项,留空即可使用App的新字段safe_mode进行控制,开启后可以对所有需要使用的资源进行安全检查,避免报错。
  • 修复了在使用多个Text时部分Text无法框选的问题。
  • 修复了Text的超链接遇到表情符号等文本时索引错误的问题。
  • 现在Text在框选后按下全选组合键即可将整段文本选中。
  • Switch新增switched字段,用于判定是否点击切换了开关状态。
  • SwitchData已被重命名为SwitchAppearance。
  • 新增SwitchData结构体,包含几个常用判定字段。
  • check_switch_click_index和check_switch_state现已被check_switch_data取代。
  • 完善了部分代码。
  • 修复了一些已知问题。

  • Renamed FrontResource to BasicFrontResource.
  • Added an offset field to certain resources for adjusting their position (applied after position calculation).
  • Added PositionConfig for configuring resource positions.
  • Removed the get_text_size method; text size is now automatically calculated upon use and stored in the new size field of Text.
  • Added MouseDetector resource for detecting mouse actions within specific areas.
  • Added MouseDetectorLevel enum to control detection intensity and reduce performance overhead.
  • Added accompanying struct MouseDetectorResult for storing mouse detection results.
  • Extended RustConstructorError with a new error type: MouseDetectorNotFound.
  • Added a safe_mode optional parameter to nearly all functions that require resource access. When left empty, it uses the new safe_mode field in App for control. When enabled, it performs safety checks on required resources to prevent errors.
  • Fixed an issue where some Text elements couldn't be selected when multiple Texts were used.
  • Fixed index errors in Text hyperlinks when encountering emojis or other special characters.
  • Now, when Text is selected, pressing the select-all shortcut key will select the entire text block.
  • Added switched field to Switch to indicate whether the switch state was toggled by a click.
  • SwitchData has been renamed to SwitchAppearance.
  • Introduced a new SwitchData struct containing several commonly used judgment fields.
  • Replaced check_switch_click_index and check_switch_state with check_switch_data.
  • Improved parts of the codebase.
  • Fixed several known issues.