Thread Tools
Aug 12, 2019, 06:26 AM
Registered User
Hobby4Life's Avatar
Thread OP

OpenTX Lua Widget, SHADOWED and BLINK not working on Horus

Hi all,

I am struggling with the SHADOWED and BLINK flags in my widget.
They dont function as expected.

Only when replaceing the variable "shade" for SHADOWED it works.

This my code to test it.

local options = {
	{ "Color", COLOR, WHITE },	
	{ "Shadow", BOOL, 0} 

function create(zone, options)
	local Context = { zone=zone, options=options }
	return Context

-- This function allow updates when you change widgets settings
local function update(Context, options)
  Context.options = options

function ScreenUpdate(Context)

	lcd.drawText(, - 8, "Hello" , CUSTOM_COLOR + DBLSIZE + shade + BLINK)

function update(Context, options)
	Context.options = options
	Context.back = nil

function refresh(Context)
	lcd.setColor(CUSTOM_COLOR, Context.options.Color)
	if Context.options.Shadow == 1 then
		shade = SHADOWED
		shade = 0

return { name="ShadowTest", options=options, create=create, update=update, refresh=refresh }
Sign up now
to remove ads between posts

Quick Reply

Thread Tools

Similar Threads
Category Thread Thread Starter Forum Replies Last Post
Discussion Durafly Tundra on OpenTx/Horus-Taranis IntheTubeDeep Electric Plane Talk 1426 Jul 07, 2019 06:07 AM
Discussion Horus X10S, OpenTX 2.2.1, SxR Lua script issues Kfab1202 Radios 5 Sep 15, 2018 10:10 AM
Question OpenTx Horus LUA Scripts sten1860 Multirotor Drone Electronics 1 Nov 05, 2017 08:13 AM
Question OpenTx Horus LUA Scripts sten1860 Radios 0 Oct 31, 2017 04:11 AM
Question Horus with BF Lua Script - does it run as widget? Jochen_K Radios 2 Apr 17, 2017 07:42 AM