Show/Hide a bmp based on data received

Questions and information about Crank Software's Storyboard Designer

Moderator: jamiev

Show/Hide a bmp based on data received

Postby saravananinec » Tue Mar 27, 2018 9:20 am

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???
saravananinec
 
Posts: 1
Joined: Tue Mar 27, 2018 9:02 am

Re: Show/Hide a bmp based on data received

Postby jason » Tue Apr 17, 2018 3:04 pm

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
User avatar
jason
 
Posts: 193
Joined: Mon Nov 02, 2009 4:53 pm

Re: Show/Hide a bmp based on data received

Postby Benjamin » Mon Sep 10, 2018 8:19 am

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.
Benjamin
 
Posts: 7
Joined: Mon Sep 10, 2018 7:11 am


Return to Storyboard Designer

Who is online

Users browsing this forum: No registered users and 3 guests

cron