惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

S
Securelist
C
Cybersecurity and Infrastructure Security Agency CISA
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
S
Security Affairs
Hacker News: Ask HN
Hacker News: Ask HN
L
Lohrmann on Cybersecurity
PCI Perspectives
PCI Perspectives
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
C
Cyber Attacks, Cyber Crime and Cyber Security
Recent Commits to openclaw:main
Recent Commits to openclaw:main
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
MyScale Blog
MyScale Blog
月光博客
月光博客
W
WeLiveSecurity
T
Threat Research - Cisco Blogs
Martin Fowler
Martin Fowler
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Recorded Future
Recorded Future
The GitHub Blog
The GitHub Blog
Webroot Blog
Webroot Blog
Security Archives - TechRepublic
Security Archives - TechRepublic
TaoSecurity Blog
TaoSecurity Blog
P
Proofpoint News Feed
Google DeepMind News
Google DeepMind News
F
Full Disclosure
U
Unit 42
Jina AI
Jina AI
博客园 - 司徒正美
阮一峰的网络日志
阮一峰的网络日志
L
LINUX DO - 最新话题
宝玉的分享
宝玉的分享
大猫的无限游戏
大猫的无限游戏
The Hacker News
The Hacker News
The Last Watchdog
The Last Watchdog
T
Troy Hunt's Blog
腾讯CDC
T
Threatpost
H
Hacker News: Front Page
P
Palo Alto Networks Blog
博客园 - 聂微东
Last Week in AI
Last Week in AI
有赞技术团队
有赞技术团队
Help Net Security
Help Net Security
L
LINUX DO - 热门话题
N
News and Events Feed by Topic
人人都是产品经理
人人都是产品经理
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Application and Cybersecurity Blog
Application and Cybersecurity Blog
Spread Privacy
Spread Privacy

博客园 - 辰

【破解】webix 9.1.6 试用版 弹窗提示破解教程 【经验】微信小程序 canvas 图片拉伸 对 wx.canvasToTempFilePath 截图导出的影响。 【经验】微信小程序Canvas 的画图尺寸学习研究。 [入门到吐槽系列] 微信小程序 上传图片 前端压缩 保存到云存储 使用Canvas新API的巨坑! [入门到吐槽系列] 微信小程序 敏感违规图片检测 mediaCheckAsync,客服接口 消息推送 的各种坑分享! [突发救援] 网站突发被腾讯云因未备案 屏蔽,60分钟内抢救恢复成功! [入门到吐槽系列] Webix 10分钟入门 二 表单Form的使用 [入门到吐槽系列] Webix 10分钟入门 一 管理后台制作 租了一台华为云耀云服务器,却直接被封公网ip,而且是官方的bug导致! 从事游戏行业也有10年,让我来说下游戏的本质,为什么上瘾。 Egret 生成 自带EUI 的微信小游戏 踩坑! JMeter入门 像屎一样的 Spring Boot入门,总算有反应了 亲测有效!一种完美动态阈值白平衡算法 Java实现。 Windows 2008 - 由于管理员设置的策略,该磁盘处于脱机状态 egret调用页面js的方法。 Egret 集成第三方库 记录 乐高情报站7月份抽奖数据汇总。 今天是第二个最值得纪念的日子。
egret GUI 和 egret Wing 是我看到h5 最渣的设计
· 2015-07-18 · via 博客园 - 辰

一个抄袭FlexLite抄的连自己思想都没有,别人精髓都不懂的垃圾框架。也不学学MornUI,好歹有点自己想法。

先来个最小可用集合吧:

1. egret create legogame --type gui。生成一个带gui的项目。

2. 用webstorm打开这个傻逼项目。

3. 修改theme.thm:

{
    "skins":
    {
        "egret.gui.Button":"skins.simple.ButtonSkin"
    }
}

4. 修改resource.json

{
    "groups":[
    {
        "keys":"button_disabled_png,button_down_png,button_normal_png,bgImage",
        "name":"preload"
    }],
    "resources":[
    {
        "name":"button_disabled_png",
        "scale9grid":"3,4,14,13",
        "type":"image",
        "url":"assets/simple/NormalButton/button_disabled.png"
    },
    {
        "name":"button_down_png",
        "scale9grid":"4,3,13,14",
        "type":"image",
        "url":"assets/simple/NormalButton/button_down.png"
    },
    {
        "name":"button_normal_png",
        "scale9grid":"4,3,13,15",
        "type":"image",
        "url":"assets/simple/NormalButton/button_normal.png"
    },
    {
        "name":"bgImage",
        "type":"image",
        "url":"assets/bg.jpg"
    }
    ]
}

5. 进入resource/assets/simple目录,保留NormalButton,其他删掉。进入src/skins/simple/ 除了buttonskin.exml,其他删掉。

6. 进入ShowcaseSkin.exml, 删除List,得到:

<?xml version='1.0' encoding='utf-8'?>
<e:Skin width="480" height="800" xmlns:e="http://ns.egret-labs.org/egret" xmlns:w="http://ns.egret-labs.org/wing">
    <w:HostComponent name="egret.gui.SkinnableComponent"/>
    <w:Declarations/>
    <e:states>
        <e:State name="normal"/>
        <e:State name="disabled"/>a
    </e:states>
    <e:Button id="btnShowMessage" label="click" y="50" horizontalCenter="0"/>
</e:Skin>

7. 进入Showcase.ts,除了button,其他都删除:

class Showcase extends egret.gui.SkinnableComponent {

    public constructor() {
        super();
        this.skinName = "skins.scene.ShowcaseSkin";
    }

    public btnShowMessage:egret.gui.Button;

    public partAdded(partName:string, instance:any):void {
        super.partAdded(partName, instance);
    }
}

8. 在legogame目录下面,运行egret build, egret startserver。得到只有一个button的结果。

这个就是最小可用集:Mininum available set。

继续研究resource.json和theme.thm是不是多余的。还有那个buttonskin.exml 文件