Jump to content

helibrewer

Registered Users
  • Posts

    2
  • Joined

helibrewer's Achievements

FlightSimmer

FlightSimmer (1/7)

  • Week One Done
  • One Month Later
  • One Year In
  • First Post Rare
  • Conversation Starter Rare

Recent Badges

10

Reputation

  1. 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)
  2. Reworking the GNS530 for FS2020 and want to create a function for the "CLR" button which returns to the default nav page with a long press. Mobiflight already has an event ID to handle the long press, MobiFlight.AS530_CLR_Push_Long, I just need to create a function that detects a long press....thinking probably 2000ms should work.
×
×
  • Create New...