Author Topic: [DONE - lv.overlays] Lua graphics question/help  (Read 320 times)

garry23

  • Hero Member
  • *****
  • Posts: 1311
[DONE - lv.overlays] Lua graphics question/help
« on: October 31, 2017, 05:07:46 PM »
I have a script that draws to the screen and all is well, until I switch to Canon menus, eg INFO or MENU.

I'm detecting these screens via a property change, ie:

Code: [Select]
function property.GUI_STATE:handler(value)
    if value == 1 then
        fb_dirty = true
    else
        fb_dirty = false
    end
end

Both MENU and INFO return the value 1.

The issue I have is how to decouple me not (sic) drawing and the Canon side drawing MENU or INFO screens.

Has anyone worked out how to manage the Lua and Canon side graphics? That is cleanly doing one or the other.

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 10439
  • 5D Mark Free
Re: Lua graphics question/help
« Reply #1 on: November 05, 2017, 07:56:28 PM »
If I understood well, testing lv.overlays should do the trick.

garry23

  • Hero Member
  • *****
  • Posts: 1311
Re: [DONE - lv.overlays] Lua graphics question/help
« Reply #2 on: November 06, 2017, 01:03:38 PM »
@a1ex

Have now used lv.overlays and also exploited event.keypress to delay the Canon MENU or INFO key presses until I can clean up my Lua drawing stuff. This fully deconflicts Lua drawing from Canon drawing :-)

However, one thing I noticed was that lv.overlays returns false when the full MENU or INFO screens are showing.

When INFO is toggled through its options, then lv.overlays returns 1.

As expected lv.overlays returns 2 if ML overlays active.

Is the above what is expected, ie false for MENU and INFO full displays?

Cheers

Garry


a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 10439
  • 5D Mark Free
Re: [DONE - lv.overlays] Lua graphics question/help
« Reply #3 on: November 06, 2017, 03:01:24 PM »
You mean, outside LiveView (lv.enabled == false) ?

What should be the return value in this case?

garry23

  • Hero Member
  • *****
  • Posts: 1311
Re: [DONE - lv.overlays] Lua graphics question/help
« Reply #4 on: November 06, 2017, 03:09:02 PM »
On an EOSM, with Canon MENU or INFO showing, lv.overlays returns false.

As you toggle through the INFO screens lv.overlays returns 1.

Do I infer that on the EOSM, which I thought was always in LV, disables LV when showing the Canon MENU or INFO screens?

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 10439
  • 5D Mark Free
Re: [DONE - lv.overlays] Lua graphics question/help
« Reply #5 on: November 06, 2017, 03:11:05 PM »
I don't know, you tell me the return value of lv.enabled in these modes.

Canon menu disables LiveView on all models; the INFO screen is usually outside LiveView, but I don't know what happens on M.

garry23

  • Hero Member
  • *****
  • Posts: 1311
Re: [DONE - lv.overlays] Lua graphics question/help
« Reply #6 on: November 06, 2017, 03:36:42 PM »
Just tested and lv.enabled = false when showing the full MENU and INFO screens.

All is well with the world and ML  ;)

Cheers

Garry

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 10439
  • 5D Mark Free
Re: [DONE - lv.overlays] Lua graphics question/help
« Reply #7 on: November 06, 2017, 03:50:12 PM »
Alright, good to know.

Just out of curiosity - does pressing half-shutter go back to LiveView from the INFO screen?

garry23

  • Hero Member
  • *****
  • Posts: 1311
Re: [DONE - lv.overlays] Lua graphics question/help
« Reply #8 on: November 06, 2017, 03:59:57 PM »
Yes, but only from the full INFO screen.

If you have started toggling through the various INFO screens, and returned to LV, the half-shutter does nothing.