понедельник, 2 августа 2010 г.

Editor UI

Finally returned to editor development.
Editor UI will be written by Lua scripts.

I started my UI from simple and usable source of Recast library,
For example, button usage:

if ( imguiButton("Start game") )
LoadLevel("super-duper mega Quake level.mdl")

this is button creation, displaying and logic in one place. After
years on Windows it was amazing!

I mapped API into Lua script language by luabind library, and
now UI script code looks like here:

if object_selected then
rollout( "Object", 0, 0, width, height )
show_object_properties()

if collapse("physics", true, true) then
show_physics_properties()
end
if collapse("visual", true, true) then
show_visual_properties()
end

if collapse("script", true, true) then
show_object_script()
end
end_rollout()

end

Комментариев нет:

Отправить комментарий