Skip to content

Commit

Permalink
Added sample theme.
Browse files Browse the repository at this point in the history
  • Loading branch information
makotok committed Oct 26, 2015
1 parent 9fb1c97 commit c372c56
Show file tree
Hide file tree
Showing 2 changed files with 72 additions and 0 deletions.
1 change: 1 addition & 0 deletions projects/flower-samples/src/config.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
-- import
local flower = require "flower"
local Theme = require "theme"
local Config = flower.Config

--------------------------------------------------------------------------------
Expand Down
71 changes: 71 additions & 0 deletions projects/flower-samples/src/theme.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
----------------------------------------------------------------------------------------------------
-- Widget Themes.
--
-- @author Makoto
-- @release V3.0.0
----------------------------------------------------------------------------------------------------

-- import
local ClassFactory = require "flower.ClassFactory"
local ThemeMgr = require "flower.widget.ThemeMgr"

-- Theme
-- You can override the theme individually
local Theme = {
common = {
},
UILabel = {
},
Button = {
},
ImageButton = {
},
SheetButton = {
},
CheckBox = {
},
Joystick = {
},
Slider = {
},
Panel = {
},
TextBox = {
},
TextInput = {
},
MsgBox = {
},
DialogBox = {
},
ListBox = {
},
ListItem = {
},
ScrollGroup = {
},
ScrollView = {
},
PanelView = {
},
TextView = {
},
ListView = {
},
BaseItemRenderer = {
},
LabelItemRenderer = {
},
ImageLabelItemRenderer = {
},
SheetImageLabelItemRenderer = {
},
CheckBoxItemRenderer = {
},
WidgetItemRenderer = {
},
}

ThemeMgr.getInstance():overrideTheme(Theme)

return Theme

0 comments on commit c372c56

Please sign in to comment.