Jump to content

How to make a sticky refreshable message(box)?


Go to solution Solved by Grimes,

Recommended Posts

Posted (edited)

Hello together,

I tried to make a sticky messagebox with changing (text-)content, native LUA and MOOSE but everything failed.
Has anyone a hint for me? The goal is to only have one grey message-box in the upper-right corner, no additional messages.
The MESSAGE:New("fooBazBar",15,"",true) with clearScreen-flag on makes this flickering and this is ugly, in my task every 0.33 seccond a string should be refreshed in such a message-box. This box contains some debugging-variables.

How to realize this without flickering?

Thanks and best regards!

 

EDIT: here's my prototype of how I try to solve thisI

IR_TIMER = 0
DISPLAY = ""

function interrupt()
  IR_TIMER = IR_TIMER + 1
  if IR_TIMER % 5 == 0 then
    DISPLAY = IR_TIMER .. ". call..."
  end
  refreshStatus(DISPLAY)
  timer.scheduleFunction(interrupt, nil, ( timer.getTime()+0.3) )
end

function refreshStatus(txt)
  if DISPLAY ~= txt then -- only when DISPLAY changed:
    -- at this point I need some magic please:
    magicRefresh(DISPLAY)
    DISPLAY = txt
  end
end

-- Missionlogics a.s.o.


interrupt()

 

Edited by Atari800XL

DCS MT😍, all maps except channel, FC3, F-16C Viper, F-15E, F/A-18C, AH-64D, F-5E, F-4E, P-51D, Spitfire, Fw-190D, MiG-21bis, L-39, AJS-37
Supercarrier, WWII-AP, CA, TrackIR5, F/A-18-Stick + Thrustmaster 16000, Stream Deck 8x4, 2x MFD Cougar
Ryzen9 5950X SMT off, 64GB RAM, RTX 4070 SUPER TI, UWQHD 3440x1440, Win11+DCS from separate M.2

  • Solution
Posted

The clearview option is the only way. Try experimenting with timing of the message, it used to be pretty even, but if the flickering is that bad then it might warrant a bug report. 

The right man in the wrong place makes all the difference in the world.

Current Projects:  Grayflag ServerScripting Wiki

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread)

 SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum

Posted

Yes, I think the best solution is only to refresh if the content has changed. And no timers or something fast changing.

DCS MT😍, all maps except channel, FC3, F-16C Viper, F-15E, F/A-18C, AH-64D, F-5E, F-4E, P-51D, Spitfire, Fw-190D, MiG-21bis, L-39, AJS-37
Supercarrier, WWII-AP, CA, TrackIR5, F/A-18-Stick + Thrustmaster 16000, Stream Deck 8x4, 2x MFD Cougar
Ryzen9 5950X SMT off, 64GB RAM, RTX 4070 SUPER TI, UWQHD 3440x1440, Win11+DCS from separate M.2

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...