Skip to content

v2.6.0 - 排版大革命 Layout Revolution

Choose a tag to compare

@ChepleBob30 ChepleBob30 released this 01 Jan 02:38
· 22 commits to main since this release
  • 添加ResourcePanel资源,可以对资源进行自动排版、锁定显示范围、拆分窗口等功能。
  • 移除了RustConstructorResource的reg_render_resource方法,取而代之的是active和modify_active方法。
  • 优化了活跃资源管理逻辑,现在可以通过App中print_resource_active_info方法直接打印活跃资源的信息。
  • 为BasicFrontResource扩展了大量方法。
  • 所有基本前端资源中的x_grid和y_grid重命名为x_location_grid和y_location_grid。
  • 所有基本前端资源扩展了x_size_grid和y_size_grid字段,用于快速设置资源大小。
  • 扩展了一系列枚举用于辅助资源调用。
  • 所有资源扩展了active字段,用于标记是否调用资源。
  • 将部分资源原本在add方法中需要传递的字段迁移到了结构体内部。
  • 所有基本前端资源添加了panel_name,panel_layout和allow_scrolling,用于自定义资源在资源板中的样式。
  • 所有基本前端资源扩展了clip_rect字段,用于控制资源显示范围,超出的部分不会显示出来。
  • Text添加了文本框功能,现在超出指定尺寸的文本会被截断并用...替代。
  • Text扩展了actual_size和origin_size字段,用于获取文本渲染部分实际尺寸和文本框原始尺寸。
  • MouseDetector现在可以检测鼠标滚动量了。
  • 为部分资源扩展了字段以适应PositionConfig。
  • 将所有add方法集合成add_resource方法,可以自动根据资源类型执行操作并添加到资源列表中。
  • 更新了get_resource_mut的返回值。
  • 扩展了RustConstructorError以适应新资源。
  • 完善了部分代码。

  • Added ResourcePanel resource, which can automatically layout resources, lock display ranges, split windows, and other features.
  • Removed the reg_render_resource method from RustConstructorResource, replacing it with active and modify_active methods.
  • Optimized active resource management logic, now you can directly print active resource information through the print_resource_active_info method in App.
  • Extended a large number of methods for BasicFrontResource.
  • Renamed x_grid and y_grid to x_location_grid and y_location_grid in all basic front-end resources.
  • Extended all basic front-end resources with x_size_grid and y_size_grid fields for quickly setting resource sizes.
  • Extended a series of enumerations to assist with resource calls.
  • Added an active field to all resources to mark whether the resource should be invoked.
  • Migrated some fields that were originally passed in add methods of certain resources to inside the structures.
  • Added panel_name, panel_layout, and allow_scrolling to all basic front-end resources for customizing resource styles in the resource panel.
  • Extended all basic front-end resources with a clip_rect field to control resource display range, with parts exceeding the range not displayed.
  • Added text box functionality to Text, where text exceeding specified dimensions will now be truncated and replaced with ... .
  • Extended Text with actual_size and origin_size fields to get the actual size of the rendered text portion and the original size of the text box.
  • MouseDetector can now detect mouse scroll amounts.
  • Extended some resources with fields to adapt to PositionConfig.
  • Consolidated all add methods into an add_resource method that can automatically perform operations based on resource type and add to the resource list.
  • Updated the return value of get_resource_mut.
  • Extended RustConstructorError to accommodate new resources.
  • Improved some code.