public void _init(EditorWindow win) { _rootPath = new ELabelInput("文件名:", 80, "", 400); _searchFileBtn = new EButton("文件名检索", 150); _searchFileBtn.OnClick += OnSearchFileByPath; ERect item = _rootPath; AddComponent(_rootPath, 5, 5); item = AddComponentRight(_searchFileBtn, item); _effectTable = new TableView(win, typeof(CheckEffectReportCnf)); _effectTable.OnSelected += OnRuleSelected; _effectTable.AddColumn("_assetPath", CheckEffectReportCnf.ASSET_PATH, 0.4f); _effectTable.AddColumn("_effName", CheckEffectReportCnf.EFFECT_NAME, 0.15f); _effectTable.AddColumn("_loadTime", CheckEffectReportCnf.LOAD_TIME, 0.05f); _effectTable.AddColumn("_instTime", CheckEffectReportCnf.INST_TIME, 0.05f); _effectTable.AddColumn("_dc", CheckEffectReportCnf.DRAWCALL, 0.05f); _effectTable.AddColumn("_triangles", CheckEffectReportCnf.TRIANGLES, 0.05f); _effectTable.AddColumn("_materialCount", CheckEffectReportCnf.MATERIAL_COUNT, 0.05f); _effectTable.AddColumn("_totalPsCount", CheckEffectReportCnf.TOTAL_PS_COUNT, 0.05f); _effectTable.AddColumn("_texMemBytes", CheckEffectReportCnf.TEX_MEM_BYTES, 0.05f); _effectTable.AddColumn("_texMemCount", CheckEffectReportCnf.TEX_MEM_COUNT, 0.05f); _effectTable.AddColumn("_animationCount", CheckEffectReportCnf.ANIM_COUNT, 0.05f); _effectTablePanel = new TableViewPanel(Ew - 10, 200); _effectTablePanel.AddTableView(_effectTable); _effectTablePanel.RefreshData(_shows); AddComponent(_effectTablePanel, 5, 10 + _rootPath.Eh); _effectTexTable = new TableView(win, typeof(TmpStringInfo)); _effectTexTable.AddColumn("_param1", "路径", 0.45f, TextAnchor.MiddleLeft); _effectTexTable.AddColumn("_param2", "内存占用", 0.05f, TextAnchor.MiddleCenter); _effectTexTablePanel = new TableViewPanel(Ew - 10, Eh - 10 - _rootPath.Eh - _effectTablePanel.Eh); _effectTexTablePanel.AddTableView(_effectTexTable); AddComponentDown(_effectTexTablePanel, _effectTablePanel); }
public void _init(EditorWindow win) { _rootPath = new ELabelInput("根目录:", 80, "", 400); _searchBtn = new EButton("根据目录检索", 150); _serchAllBtn = new EButton("检索所有目录", 150); _loadRuleBtn = new EButton("加载纹理规则", 150); _formatBtn = new EButton("格式化纹理", 150); _searchBtn.OnClick += OnSearchByPath; _serchAllBtn.OnClick += OnSearchAll; _loadRuleBtn.OnClick += OnloadRuleBtn; _formatBtn.OnClick += OnFormatBtn; ERect item = _rootPath; AddComponent(_rootPath, 5, 5); item = AddComponentRight(_searchBtn, item); item = AddComponentRight(_serchAllBtn, item); item = AddComponentRight(_loadRuleBtn, item); item = AddComponentRight(_formatBtn, item); _texRuleTable = new TableView(win, typeof(AssetFormatRule)); _texRuleTable.OnSelected += OnRuleSelected; _texRuleTable.AddColumn("FilterPath", "过滤的路径", 0.45f); _texRuleTable.AddColumn("FilterRule", "过滤规则", 0.35f); _texRuleTable.AddColumn("FormatRule", "格式化", 0.25f); _texRuleTablePanel = new TableViewPanel(Ew - 10, 200); _texRuleTablePanel.AddTableView(_texRuleTable); AddComponent(_texRuleTablePanel, 5, 10 + _rootPath.Eh); _texShowTable = new TableView(win, typeof(TextureFormatInfo)); _texShowTable.OnSelected += OnInfoSelected; _texShowTable.AddColumn("Path", "路径", 0.35f, TextAnchor.MiddleLeft); _texShowTable.AddColumn("MemSize", "内存占用", 0.05f, TextAnchor.MiddleCenter, "<fmt_bytes>"); _texShowTable.AddColumn("ReadWriteEnable", "R/W", 0.05f); _texShowTable.AddColumn("MipmapEnable", "Mipmap", 0.05f); _texShowTable.AddColumn("IsSpriteTag", "图集(和Format冲突)", 0.1f); _texShowTable.AddColumn("AndroidFormat", "AndroidFormat", 0.1f); _texShowTable.AddColumn("IosFormat", "IosFormat", 0.1f); _texShowTable.AddColumn("ImportType", "纹理格式", 0.1f); _texShowTable.AddColumn("ImportShape", "ImportShape", 0.1f); _texShowTablePanel = new TableViewPanel(Ew - 10, Eh - 10 - _rootPath.Eh - _texRuleTablePanel.Eh); _texShowTablePanel.AddTableView(_texShowTable); AddComponentDown(_texShowTablePanel, _texRuleTablePanel); }