• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

arcadefx/material-ui: Material Design UI for Corona Labs SDK

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

arcadefx/material-ui

开源软件地址(OpenSource Url):

https://github.com/arcadefx/material-ui

开源编程语言(OpenSource Language):

Lua 100.0%

开源软件介绍(OpenSource Introduction):

Material Design UI for Corona Labs SDK

This README is just an overview document. You can find more detailed documentation within the repo in future updates.

What is material-ui?

A loosely based Material UI library for Corona Labs SDK. It is written in Lua using the free edition of the SDK. The library will help build a UI based on Material Design.

  • Requires Corona SDK build 2017.3135 or greater.

  • Supports: iOS 9+, Android 6.x+ and other Corona SDK supported platforms.

Installing material-ui from the repo on GitHub

  • Clone the repo or download archive
git clone git://github.com/arcadefx/material-ui.git
  • Copy the required folders into your project:
materialui (folder)
icon-font (folder)
  • Read config.lua to copy to your config.lua the "MUI SET UP" section and also follow the 'content' section for specifying width and height.

Using material-ui

Warning: The latest update could break your code if you used an older copy. I have not updated the documentation yet. I will get it updated :).

  • If using the GitHub repo, edit your scene file and be sure to include at the top:
local mui = require( "materialui.mui" )
local muiData = require( "materialui.mui-data" )
  • In the scene create function add in the initializer and any user-interface elements
    mui.init()
    mui.newRoundedRectButton({
        name = "newGame",
        text = "New Game",
        width = 150,
        height = 30,
        x = 100,
        y = 100,
        font = native.systemFont,
        fillColor = { 0, 0.82, 1 },
        textColor = { 1, 1, 1 },
        callBack = mui.actionForButton
    })
  • In the scene destroy function add in the destroy method to remove all user-interface elements in the scene.
    mui.destroy()

Building for Device

Due to device keyboard possibly covering up input fields, be sure to include "coronaWindowMovesWhenKeyboardAppears=true" into iOS settings->iphone->plist table and Android settings.

For an example, see build.settings file.

  • For iOS devices, please add to you "plist": UILaunchStoryboardName = "LaunchScreen",
  • For iOS devices, copy the folder "LaunchScreen.storyboardc" to your project ONLY if it doesn't

Try a Demo

Using Corona Simulator open up the "main.lua" file in the folder.

Sample Screenshot

Alt text

Available Methods and Documentation

  • See Documentation. View Documentation for more information on methods, examples and properties.

Contributing

  • Feel free to contribute code, testing and feedback.
  • Once we get additional authors they will be included in the repo and get recognition for their efforts.
  • Please follow the licensing terms for any software included.
  • See materialui/mui-example.lua for creating additional modules or review any mui-[name].lua module to see the format.

Contributors (by code, testing, helping, etc):

willcastillo
bluetardis
StevenWarren
bodily11
taigak
lmy46

Change Log

  • Please see "CHANGELOG.md" in this repo for information on latest changes.

To-Do

  • Expand the library (new widgets: card, clock, calendar, etc)
  • Develop a layout engine
  • Develop a palette engine

Summary

There are also many other files not described here, please review the .lua files for additional information. :-)

Enjoy!




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap