Skip to content

v2.3.0 - 兼容更新 Compatibility Update

Choose a tag to compare

@ChepleBob30 ChepleBob30 released this 09 Nov 06:45
· 26 commits to main since this release
  • 移除了大量App外的无用函数。
  • 添加FrontResource特征,用于管理基本的前端资源。
  • 添加了Config类结构体,用于快速自定义前端资源。
  • Image添加了多个字段: background_color用于管理显示在图片后方的背景色,rotate_angle用于管理图片旋转的角度(顺时针,搭配std::f32::consts::PI使用,不改变其他资源检测输入范围) rotate_center控制图片旋转的中心点(根据输入数值大小与图片尺寸的比例决定位置)。
  • 移除了Text的write_background字段。
  • 大改SwitchData。
  • Switch的一些字段现已被重命名: switch_image_name -> fill_resource_name,enable_hover_click_image -> enable_hover_click_fill_resource。
  • 移除了Switch的sound_path字段与相关功能。
  • RustConstructorError添加了SwitchFillResourceMismatch和CustomError两种新错误类型。
  • 移除了Config和AppText及其相关字段。
  • App中添加strict_mode字段。
  • 修复了CustomRect的position不会随center_display更新的问题。
  • 大改Switch,现在可以使用多种资源填充Switch主体部分了(Image或CustomRect)。
  • 现在MessageBox的关闭按钮也支持使用多种资源填充了。

  • Removed a large number of useless functions outside of App.
  • Added FrontResource trait for managing basic front-end resources.
  • Added Config class structures for quickly customizing front-end resources.
  • Image added multiple fields: background_color for managing background color displayed behind the image, rotate_angle for managing image rotation angle (clockwise, used with std::f32::consts::PI, does not change other resource detection input range), rotate_center controls the image rotation center point (position determined by the ratio of input values to image dimensions).
  • Removed Text's write_background field.
  • Major refactor of SwitchData.
  • Some fields in Switch have been renamed: switch_image_name -> fill_resource_name, enable_hover_click_image -> enable_hover_click_fill_resource.
  • Removed Switch's sound_path field and related functionality.
  • RustConstructorError added two new error types: SwitchFillResourceMismatch and CustomError.
  • Removed Config and AppText and their related fields.
  • Added strict_mode field in App.
  • Fixed the issue where CustomRect's position would not update with center_display.
  • Major refactor of Switch, now multiple resources can be used to fill the Switch main part (Image or CustomRect).
  • The close button of MessageBox now also supports filling with multiple resources.