It's not the most elegant way, because i need to pass in the entire object because both constants and variables are required, but it works
function drawBottomLeftCorner(obj, x, y) { g.setColor(obj.C.color.primary.base); const x1 = x - obj.cornerOffset; const y1 = y + obj.cornerOffset; g.fillRect(x1, y1, x1 + obj.cornerSize, y1 - obj.cornerSize); g.setColor("#000000"); g.fillRect(x, y, x + obj.cornerSize - obj.cornerOffset, y - obj.cornerSize + obj.cornerOffset); }
@OmegaRogue started
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
It's not the most elegant way, because i need to pass in the entire object because both constants and variables are required, but it works