2013年5月11日 11:01
测试了下TreeView,还不错
control.treeView:setRootVisible(true)
local rootNode = control.treeView:getRoot()
rootNode:add(TreeNode:new("Test1"))
rootNode:add(TreeNode:new("Test2"))
rootNode:add(TreeNode:new("Test3"))
rootNode:getChild(0):add(TreeNode:new("Test4"))
rootNode:getChild(1):add(TreeNode:new("中文"))

Tags: mac OpenGL ios Hybrid Cocos2dx
Posted in Hybrid | 0 Comments
2013年5月04日 01:15
Hybrid封装,纯Lua实现,继续完善

iOS同样效果,自适应窗口

require "editor/BaseControl"
--------------------------------------------
DebugInfoControl = class("DebugInfoControl", function(parent)
return BaseControl.create("DebugInfo.layout", parent)
end)
DebugInfoControl.__index = DebugInfoControl
function DebugInfoControl.create(parent)
local control = DebugInfoControl.new(parent)
control.textbox= GUICast:toTextBox(control:getWidget("_Main"))
control.frames = 0
control.timer = 0
control:registerEvent("Event_Update", control.update)
return control
end
function DebugInfoControl:update(delta)
self.frames = self.frames+1
self.timer = self.timer+delta
if self.timer > 0.5 then
self.textbox:setCaption(string.format("FPS:%d", self.frames / self.timer))
self.frames = 0
self.timer = 0
end
end
Tags: mac ios Hybrid
Posted in Hybrid | 1 Comments
2013年5月04日 01:01
动态字体实现,效果如下

Tags: Hybrid ios mac
Posted in Hybrid | 0 Comments
2013年5月04日 00:53
重新实现opengl监控,独立lib,暂支持mac,ios(opengles2.0 only),更加高效,不占用额外贴图内存,可跟踪任意贴图,包括任意压缩贴图

Tags: Hybrid ios mac OpenGL
Posted in Hybrid | 0 Comments
2013年5月04日 00:38
Hybrid开发记录,Mac下中文输入实现

Tags: Hybrid Mac iOS Cocos2dx
Posted in Hybrid | 2 Comments