Got some help on it. It's just a logic issue, the events are all in place. This works great:
----button hold----
function button_press()
button_held_timer_id = timer_start(500, 0, button_held)
end
function button_held()
timer_stop(button_held_timer_id) --should already be stopped, but just in case.
button_hold_active = true
print("button held!!")
end
function instrument_btn_name()
timer_stop(button_held_timer_id)
if (button_hold_active) then
PUT LONG PRESS EVENT CODE HERE
button_hold_active = false
else
PUT CLICK EVENT CODE HERE
print("button click")
end
end
//button_id = button_add(img_normal,img_pressed,x,y,width,height,press_callback,release_callback)
button_add(nil, "panel_btn_image.png", PosX, PosY, ImageX, ImageY, button_press, instrument_btn_name)