接入菜单导航并改造通用按钮交互
- 将 CommonButton 改为基于 Unity Button 实现,保留原有 pointer enter、click、pointer exit 三类事件配置,同时接入 Selectable/Button 的导航、选中和提交能力。补充 CommonButton 自定义 Inspector,保留项目自定义事件与背景配置的编辑体验。 - 同步调整菜单相关 UI,将 StartMenuForm 迁移为 MenuForm,并更新 UIForm 配置、菜单 Controller/Form 以及相关 prefab 引用。更新多个 UI prefab 和通用按钮 prefab,使菜单、商店、角色选择、道具展示等界面能够使用新的按钮选中与导航交互。
This commit is contained in:
@@ -55,10 +55,10 @@ namespace SepCore.UI
|
||||
_content.anchoredPosition3D = _targetPos;
|
||||
}
|
||||
|
||||
if (_itemTitle != null) _itemTitle.text = _context.Title ?? string.Empty;
|
||||
if (_itemTypeText != null) _itemTypeText.text = BuildTypeText(_context.ItemType) ?? string.Empty;
|
||||
if (_itemDescription != null) _itemDescription.text = _context.Description ?? string.Empty;
|
||||
if (_itemPrice != null) _itemPrice.text = $"{_context.Price} <sprite name=\"coin\" index=0>";
|
||||
_itemTitle.text = _context.Title ?? string.Empty;
|
||||
_itemTypeText.text = BuildTypeText(_context.ItemType) ?? string.Empty;
|
||||
_itemDescription.text = _context.Description ?? string.Empty;
|
||||
_itemPrice.text = $"{_context.Price} <sprite name=\"coin\" index=0>";
|
||||
|
||||
if (_recycleButton != null)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user