This gui has been very useful to me.
One question, though. Is there a way to change the font size (or style) of a widget through the layout files?
- local function refreshRenderTable(layerList)
- --MOAIRenderMgr.setRenderTable(layerList)
- end
- mainMenu.onInput = function ( self )
- local x, y, tapCount = inputmgr:getTouch ( )
- mainMenu.g:injectMouseMove ( x, y )
- if ( inputmgr:down ( ) or inputmgr:isDown ( ) ) then
- mainMenu.g:injectMouseButtonDown ( globalData.inputconstants.LEFT_MOUSE_BUTTON )
- else
- mainMenu.g:injectMouseButtonUp ( globalData.inputconstants.LEFT_MOUSE_BUTTON )
- end
- end
- for ii = 1,5 do
- row = wlist:addRow()
- row:getCell(1):setImage( resources.getPath("check box.png"))
- row:setDim(90,5)
- row:getCell(2):setText( "Overdue ToDo item #" .. ii )
- row:getCell(2):setTextAlignment(row:getCell(2).TEXT_ALIGN_LEFT, row:getCell(2).TEXT_ALIGN_CENTER)
- end
- widgetlist1 = {
- widget = "widget list",
- pos = {0, 0},
- dim = {100, 90},
- selectionImage = "selection image.png",
- maxSelect = 1,
- rowHeight = 6,
- columns = {
- {"X", 5 , "image" },
- {"Todo List", 65, "label"},
- },
- },
-
- diff --git a/gui/text.lua b/gui/text.lua
- index b19c1c4..4ebfcab 100644
- --- a/gui/text.lua
- +++ b/gui/text.lua
- @@ -32,6 +32,11 @@
- VERSION: 0.2
- MOAI VERSION: v1.0 r3
-
- + UPDATED: 6-18-12
- + MOAI VERSION: v1.2
- +
- + - Was not properly setting the rect for textbox in setRect()
- +
- NOTES
- - MOAITextBox does not seem to handle setVisible properly, so we blank out the
- string when hiding, and restore it when showing.
- @@ -104,7 +109,7 @@ function _M.Text:setRect(width, align)
- if (nil ~= self._textStyle) then
- local scale = self._textStyle:getSize()
- self._height = scale + scale / 6
- - self._textBox:setRect(0, self._height, self._width, 0)
- + self._textBox:setRect(0, -self._height, self._width, 0)
- end
- end
-
-
-
- function _M.Text:setRect(width, align)
- self._width = width
-
- if (nil ~= self._textStyle) then
- local scale = self._textStyle:getSize()
- local lines = self:getLines()
- self._height = scale + scale / 6
- self._textBox:setRect(0, self._height * lines, self._width, 0)
- end
- end
-
andrew.lundell wrote:One final question, is it possible to make a multi-line edit box?.
Users browsing this forum: No registered users and 0 guests