Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/unity_build/data/lua/Tools.lua @ 8738

Last change on this file since 8738 was 8687, checked in by rgrieder, 13 years ago

Adjusted implementation of tribool to work well with tolua and integrated it into our GUI code.
Use tribool(true), tribool(false) and tribool(dontcare) in Lua.

  • Property svn:eol-style set to native
File size: 398 bytes
Line 
1function handleDefArg(argument, defaultValue)
2    if argument == nil then
3        return defaultValue
4    else
5        return argument
6    end
7end
8
9function table.findIndex(table, value)
10    for i, v in ipairs(table) do
11        if v == value then
12            return i
13        end
14    end
15    return 0
16end
17
18-- Shortcuts for tribool
19tribool  = orxonox.tribool
20dontcare = orxonox.dontcare_keyword_t()
Note: See TracBrowser for help on using the repository browser.