SFML community forums
Help => Graphics => Topic started by: ngocdung93 on December 05, 2013, 08:07:45 pm
-
Can you help me with displaying a digital clock? With both minute and second please.
-
My first attempt would be time(0) from ctime and sf::Text
-
Probably not the best way to create clock with SFML but at least it'll give you an idea and a working example :) Here is example code [1] which mostly based on this analog clock [2]. And here is digital clock's screenshot [3]. Also I give a try to do a binary clock similar to this [4].
Edit: There is already a binary clock written with SFML [5].
[1] http://pastebin.kde.org/pee140834
[2] https://github.com/SFML/SFML/wiki/Source%3A-Analog-Clock
[3] (http://wstaw.org/m/2013/12/05/plasma-desktopAD1321.png)
[4] http://www.youtube.com/watch?v=SHwYsUWZLrI
[5] https://github.com/Gjum/BinClock
-
thanks u very much. i'll give it a try
-
if i have a texture and a clock, how could i bring the clock to the front? the texture is always in front of it and i can't see the clock
-
Draw the clock after the texture?
-
ok i got it.thanks you all.