daid / EmptyEpsilon

Open source bridge simulator. Build with the SeriousProton engine.
https://daid.github.io/EmptyEpsilon/
GNU General Public License v2.0
527 stars 176 forks source link

Warp slider on UI not updated when changed through HTTP api #605

Open Tuhis opened 5 years ago

Tuhis commented 5 years ago

Hi,

Problem: It seems that UI slider for warp is not updated when the value is changed through HTTP api. Related function call is PlayerSpaceship:commandWarp(int8_t target) if I'm correct.

Proposed action: There is also other similar problems or UI controls that cannot be changed through api. Would it be ok if I do some changes and make every UI control to listen for spaceship's state (and so forth save state of every UI control in spaceship's state)? Motivation behind this is a project where we're building custom hardware consoles for controlling the ship.

czenker commented 5 years ago

What is your opinion on that, @daid? Would you consider an UI not showing correct data consider a bug?

I also experienced this behavior and would like to fix it. But I am not sure if it has any bad side effects. I am not sure what it does to performance to add more into onDraw and if lag could become an issue. A slider that jumps while you drag it might not be the best experience. ;) From what I remember EE was never supposed to be played outside a local network, so response times might not be an issue!?

daid commented 5 years ago

I think I prevent the slider from jumping while you drag it (while you have the mouse down on it, it does not take over new values)

In general, these states not updating to the controls can be seen as a bug, as the UI should reflect the state of the ship.

oznogon commented 4 years ago

This seems resolved, just tested in the 20200115 build and the slider updates