mirror of
https://github.com/SFML/SFML.git
synced 2025-02-18 06:18:01 +08:00
Update documentation of creating Music and Cursor
This commit is contained in:
parent
571eee359f
commit
37ac80dbe5
@ -29,9 +29,7 @@
|
|||||||
/// sf::Text text(font, "Hello SFML", 50);
|
/// sf::Text text(font, "Hello SFML", 50);
|
||||||
///
|
///
|
||||||
/// // Load a music to play
|
/// // Load a music to play
|
||||||
/// sf::Music music;
|
/// auto music = sf::Music::openFromFile("nice_music.ogg").value();
|
||||||
/// if (!music.openFromFile("nice_music.ogg"))
|
|
||||||
/// return EXIT_FAILURE;
|
|
||||||
///
|
///
|
||||||
/// // Play the music
|
/// // Play the music
|
||||||
/// music.play();
|
/// music.play();
|
||||||
|
@ -299,14 +299,8 @@ private:
|
|||||||
///
|
///
|
||||||
/// Usage example:
|
/// Usage example:
|
||||||
/// \code
|
/// \code
|
||||||
/// // Declare a new music
|
/// // Open a music from an audio file
|
||||||
/// sf::Music music;
|
/// auto music = sf::Music::openFromFile("music.ogg").value();
|
||||||
///
|
|
||||||
/// // Open it from an audio file
|
|
||||||
/// if (!music.openFromFile("music.ogg"))
|
|
||||||
/// {
|
|
||||||
/// // error...
|
|
||||||
/// }
|
|
||||||
///
|
///
|
||||||
/// // Change some parameters
|
/// // Change some parameters
|
||||||
/// music.setPosition(0, 1, 10); // change its 3D position
|
/// music.setPosition(0, 1, 10); // change its 3D position
|
||||||
|
@ -245,9 +245,8 @@ private:
|
|||||||
///
|
///
|
||||||
/// // ... create window as usual ...
|
/// // ... create window as usual ...
|
||||||
///
|
///
|
||||||
/// sf::Cursor cursor;
|
/// const auto cursor = sf::Cursor::loadFromSystem(sf::Cursor::Type::Hand).value();
|
||||||
/// if (cursor.loadFromSystem(sf::Cursor::Type::Hand))
|
/// window.setMouseCursor(cursor);
|
||||||
/// window.setMouseCursor(cursor);
|
|
||||||
/// \endcode
|
/// \endcode
|
||||||
///
|
///
|
||||||
/// \see sf::WindowBase::setMouseCursor
|
/// \see sf::WindowBase::setMouseCursor
|
||||||
|
Loading…
x
Reference in New Issue
Block a user