Page 1 of 1

Show/Hide a bmp based on data received

PostPosted: Tue Mar 27, 2018 9:20 am
by saravananinec
How to design a feature in SB, if the bitmap is to be shown or hide based on another data.

If the data is 1, show the bitmap
If the data is 0, dont show the bitmap

Is it possible to do, without having the bitmap in a separate UI layer???

Re: Show/Hide a bmp based on data received

PostPosted: Tue Apr 17, 2018 3:04 pm
by jason
Is the idea is you want the two images in the same control and only one image to be hidden? In that case, you'll need to set a variable on the alpha of one of the images and set it to 0 to hide it.

Jason

Re: Show/Hide a bmp based on data received

PostPosted: Mon Sep 10, 2018 8:19 am
by Benjamin
You can hide images in your Lua code like this:

Code: Select all
function setData(key, value)
    local dk_data = {}
    dk_data = gre.get_data(key)
    dk_data[key] = value
    gre.set_data(dk_data)
end

setData("topnav_layer.wifi_indicator.grd_hidden", 1)


In this case, I hide the wifi indicator.