1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2024-06-25 22:53:22 +00:00

Merge pull request #577 from SquidDev-CC/ComputerCraft/feature/get-blink

Add .getCursorBlink to monitors and terminals
This commit is contained in:
SquidDev 2018-09-28 16:23:00 +01:00
commit 33fad2da15
3 changed files with 16 additions and 3 deletions

View File

@ -64,7 +64,8 @@ public String[] getMethodNames()
"setPaletteColour",
"setPaletteColor",
"getPaletteColour",
"getPaletteColor"
"getPaletteColor",
"getCursorBlink",
};
}
@ -284,6 +285,9 @@ public Object[] callMethod( @Nonnull ILuaContext context, int method, @Nonnull O
}
return null;
}
case 23:
// getCursorBlink
return new Object[] { m_terminal.getCursorBlink() };
default:
{
return null;

View File

@ -66,7 +66,8 @@ public String[] getMethodNames()
"setPaletteColor",
"getPaletteColour",
"getPaletteColor",
"getTextScale"
"getTextScale",
"getCursorBlink",
};
}
@ -245,8 +246,12 @@ public Object[] callMethod( @Nonnull IComputerAccess computer, @Nonnull ILuaCont
// getTextScale
return new Object[] { monitor.getTextScale() / 2.0 };
}
case 25:
// getCursorBlink
return new Object[] { terminal.getCursorBlink() };
default:
return null;
}
return null;
}
@Override

View File

@ -258,6 +258,10 @@ function create( parent, nX, nY, nWidth, nHeight, bStartVisible )
end
end
function window.getCursorBlink()
return bCursorBlink
end
local function isColor()
return parent.isColor()
end