Author Topic: Display interactions  (Read 298 times)

garry23

  • Hero Member
  • *****
  • Posts: 1280
Display interactions
« on: September 28, 2017, 07:59:26 PM »
@A1ex

Hope you can help.

In my focus bar script I'm writing text to the screen then, when not required, erasing.

I erase by simply overwriting in the transparent color.

Unfortunately this negatively interactions with ML drawing, eg the spot meter.

Is there a way to deal with this, ie after I've erased then ML, eg the spotmeter, doesn't know I was writing at that point.

Hope this s clear.

Cheers

Garry

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 10326
  • 5D Mark Free
Re: Display interactions
« Reply #1 on: September 28, 2017, 08:16:40 PM »
Not really; you could trigger a redraw, but that doesn't appear to be in the Lua API.

Canon uses a window system, but interfacing with it is not currently understood (we are just drawing over their screen), and writing one from scratch is not trivial.

garry23

  • Hero Member
  • *****
  • Posts: 1280
Re: Display interactions
« Reply #2 on: September 28, 2017, 08:36:53 PM »
@a1ex

Thanks: understood.

garry23

  • Hero Member
  • *****
  • Posts: 1280
Re: Display interactions
« Reply #3 on: September 28, 2017, 11:16:31 PM »
@A1ex

I just had a thought.

Would it be possible, worthwhile, to augment the display.clear() in Lua with display.clear(X1,y1, x2,y2).

Thus way we could clear chunks of the display without impacting key parts of the ML menus and displays.

Just a thought.

Cheers

Garry

garry23

  • Hero Member
  • *****
  • Posts: 1280
Re: (Partially Solved) Display interactions
« Reply #4 on: September 29, 2017, 08:50:48 AM »
@A1ex

I've implemented a 'hack' that is a 99% solution.

What I have done is track that I've changed screen state and need to clear and redraw things, ie

Code: [Select]
if (not last_fd_LT_H) and fd < H then
                        display.clear()
                        display.off()
                        display.on()
                        local menu_item = menu.get("Overlay","Cropmarks")
                        if menu_item == 1 then
                            menu.set("Overlay","Cropmarks",0)
                            menu.set("Overlay","Cropmarks",1)
                        end
                    end

Hardly see the display flash :-)