Code: Select all
-- Get state of softkey
function MFDR_SK_T_1(state)
status = state
print("Status is:")
return status
end
fs2020_variable_subscribe("L:MFDR_SoftKey_Top_1","bool",MFDR_SK_T_1)
if status == o then
function MFDR_Top_1_click()
fs2020_event("L:MFDR_SoftKey_Top_1")
sound_play(click_snd)
fs2020_variable_write("L:MFDR_SoftKey_Top_1", bool, 1)
end
else
fs2020_variable_write("L:MFDR_SoftKey_Top_1", bool, 0)
end
MFDL_L1 = button_add(nil, "top_btn.png", 82,6,32,32, MFDR_Top_1_click)
Mike