How to render a circular/radial progress bar in Libgdx?

后端 未结 2 1098
天涯浪人
天涯浪人 2020-12-16 20:25

For a game we develop with libgdx, we need to show the user the remaining time for making a move. How can we render a circular progress bar which shows the remaining second

2条回答
  •  执念已碎
    2020-12-16 20:57

    You could use an OpenGL shader to generate a circular progress bar. Here is an animated timer that would be a good place to start: http://glsl.heroku.com/e#10201.0

    However, I don't think there is any good Libgdx infrastructure for dropping in shaders like this. You would have to use the OpenGL APIs (see https://code.google.com/p/libgdx/wiki/OpenGLShader).

提交回复
热议问题