浏览代码

add raycastablePickerRoom

/add_hero_sample
Xingwei Zhu 3 年前
当前提交
6b532c41
共有 6 个文件被更改,包括 1087 次插入0 次删除
  1. 1001
      AwesomeUIWidgets/Assets/Scenes/RaycastablePickerRoom.unity
  2. 7
      AwesomeUIWidgets/Assets/Scenes/RaycastablePickerRoom.unity.meta
  3. 3
      AwesomeUIWidgets/Assets/Scripts/RaycastableScene.meta
  4. 73
      AwesomeUIWidgets/Assets/Scripts/RaycastableScene/ItemPickerMainUIPanel.cs
  5. 3
      AwesomeUIWidgets/Assets/Scripts/RaycastableScene/ItemPickerMainUIPanel.cs.meta

1001
AwesomeUIWidgets/Assets/Scenes/RaycastablePickerRoom.unity
文件差异内容过多而无法显示
查看文件

7
AwesomeUIWidgets/Assets/Scenes/RaycastablePickerRoom.unity.meta


fileFormatVersion: 2
guid: 3c6477d31549145de9b610e03bcf5555
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

3
AwesomeUIWidgets/Assets/Scripts/RaycastableScene.meta


fileFormatVersion: 2
guid: 75cec3f5c6a8459ba9114fbc9b3b149b
timeCreated: 1627379656

73
AwesomeUIWidgets/Assets/Scripts/RaycastableScene/ItemPickerMainUIPanel.cs


using System.Collections.Generic;
using uiwidgets;
using Unity.UIWidgets.engine;
using Unity.UIWidgets.material;
using Unity.UIWidgets.widgets;
using UnityEngine;
namespace UIWidgetsSample.RaycastableScene
{
public class ItemPickerMainUIPanel : UIWidgetsRaycastablePanel
{
protected override void main()
{
ui_.runApp(new ItemPickerMainUI());
}
}
public class ItemPickerMainUI : StatelessWidget
{
public override Widget build(BuildContext context)
{
return new MaterialApp(
home: new Scaffold(
backgroundColor: Colors.blue.withAlpha(64),
body: new ItemPickerMainWidget()
)
);
}
}
public class ItemPickerMainWidget : StatefulWidget
{
public override State createState()
{
return new ItemPickerMainWidgetState();
}
}
public class ItemPickerMainWidgetState : State<ItemPickerMainWidget>
{
public override Widget build(BuildContext context)
{
return new Column(
children: new List<Widget>
{
buildTop(),
buildMiddle()
}
);
}
private Widget buildTop()
{
return new RaycastableContainer(child: new Container(height: 50f, color: Colors.blue));
}
private Widget buildMiddle()
{
return new Expanded(child: new Row(
children: new List<Widget>
{
buildLeft(),
new Container()
}
));
}
private Widget buildLeft()
{
return new RaycastableContainer(child: new Container(width: 100f, color: Colors.green));
}
}
}

3
AwesomeUIWidgets/Assets/Scripts/RaycastableScene/ItemPickerMainUIPanel.cs.meta


fileFormatVersion: 2
guid: a4fefdc115db482b850fca28f0f7d49d
timeCreated: 1627379721
正在加载...
取消
保存