2012-12-16 5 views
0

저는 코로나를 사용하는 루아를 처음 접했고 글꼴 색상을 변경하는 방법을 알아 내려는 데 어려움을 겪고 있습니다. color = { 163, 25, 12 }이 작동하지 않습니다.루아에서 글꼴 색상을 변경하려면 어떻게해야합니까?

myButton = widget.newButton{ 
     id = "open_id", 
     left = 12, 
     top = 360, 
     label = "open", 
     fontSize = 16, 
    font = "Helvetica Neue Bold", 
    color = { 163, 25, 12 }, 
     width = 294, 
     height = 40, 
     cornerRadius = 2, 
     onEvent = onButtonEvent 
    } 

답변

2

이 시도 :

myButton = widget.newButton{ 
    id = "open_id", 
    left = 12, 
    top = 360, 
    label = "open", 
    fontSize = 16, 
    font = "Helvetica Neue Bold", 
    labelColor = { default = { 163, 25, 12 }, over = { 163, 25, 12} }, 
    width = 294, 
    height = 40, 
    cornerRadius = 2, 
    onEvent = onButtonEvent 
} 

참조 :

http://docs.coronalabs.com/api/library/widget/newButton.html

+0

방법 게임의 중간에 버튼 레이블 색상을 변경할 수 있습니까? – Sudhakar

+0

위젯은 실제로 그 용도로 사용되지 않습니다. 이런 식으로해야 할 경우, setFillColor() on을 할 수있는 터치 핸들러가있는 이미지를 고려할 것입니다. –

관련 문제