What Would A Bit-Coded Value look like in a Non-Threaded Child Script

Typically: "How do I... ", "How can I... " questions
Post Reply
UGV_robotics
Posts: 2
Joined: 12 Mar 2019, 00:03

What Would A Bit-Coded Value look like in a Non-Threaded Child Script

Post by UGV_robotics » 13 Mar 2019, 22:40

What would an example of an API function in LUA look like with the use of Bit-Coded Values?

coppelia
Site Admin
Posts: 7335
Joined: 14 Dec 2012, 00:25

Re: What Would A Bit-Coded Value look like in a Non-Threaded Child Script

Post by coppelia » 14 Mar 2019, 07:26

Hello,

sorry, missed your other post..

Using your example, you would use sim.auxiliaryConsoleOpen like this:

Code: Select all

    local title="Console title"
    local maxLines=9
    local mode=0
    mode=mode+1 -- console will automatically close at sim. end
    mode=mode+2 -- lines will be wrapped
    mode=mode+4 -- console is closable
    local position={10,10}
    local size={640,480}
    local textColor={1,1,0} -- yellow text
    local backgroundColor={0.1,0.1,0.1} -- dark background
    consoleHandle=sim.auxiliaryConsoleOpen(title,maxLines,mode,position,size,textColor,backgroundColor)
Cheers

Post Reply