javier.serrano Posted November 26, 2018 Share Posted November 26, 2018 Hi, I have a WidgetSprite following mouse position as a kind of animated cursor. I have set it to ALIGN_OVERLAP and ALIGN_FIXED and stays over all other widgets. The proble, comes when I expand a WidgetComboBox and the sprite stays behind expanded items. I have tried to set my sprite cursor order to 127 as it says here and also tried to remove sprite from GUI and add it again, but there is no way to make my sprite to stay over WidgetComboBox items. Any tip or example of how can I make it work? Regards, Javier Link to comment
morbid Posted November 26, 2018 Share Posted November 26, 2018 Hello Javier, may I ask you to send us a sample to check this behavior? Thank you. How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
javier.serrano Posted November 26, 2018 Author Share Posted November 26, 2018 Sure, sample is attached. Thanks! Widgets.7z Link to comment
morbid Posted November 26, 2018 Share Posted November 26, 2018 You can use this method for your custom cursor: https://developer.unigine.com/en/docs/2.7.2/api/library/gui/class.gui?rlang=cpp#setMouseSprite_WidgetSprite_void Please check the modified Widgets.usc file. Thanks! Widgets.zip How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
javier.serrano Posted November 26, 2018 Author Share Posted November 26, 2018 Hi, I missed that function when reading the docs, it works perfectly. I have disabled code where I set sprite position and now sprite does the effect shown at the attached image. Before, I had a delay with mouse position and sprite position but no 'motion blur' effect appeared. Application is rendiring between 30-35 fps so this might be the reason, is there any way to avoid this effect? Thanks a lot, Javier. Link to comment
morbid Posted November 27, 2018 Share Posted November 27, 2018 Javier, I tried to reproduce this effect by dropping framerate to 20 and 30 fps but no blurring appeared. Can you confirm that in an empty scene with fps locked to 30 (render_max_fps 30) cursor is acting as you described? I'm wondering could it be dependent on the display you're using. By the way, is this a photo or a screen capture? Thank you. How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
javier.serrano Posted November 27, 2018 Author Share Posted November 27, 2018 Hi, this was a screen capture. I've tested render_max_fps in the sample and blurring did not appear. Can this be related to moving mouse with XPad joystick in the update() loop? By the way, our main problem was solved. I have to do more research with my code to check this blurring. Thank you, Javier Link to comment
morbid Posted November 27, 2018 Share Posted November 27, 2018 I'm afraid we can't give you any advice based only on the screenshot. It actually looks like you have two sprites at the same time. If you need our assistance with this, please, try building a sample. Thank you! How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
Recommended Posts