mirror of
https://github.com/SFML/SFML.git
synced 2024-11-28 22:31:09 +08:00
Fix outdated use of the sf::VideoMode constructor
This commit is contained in:
parent
1d4db22d62
commit
a9f33999dc
2
.github/ISSUE_TEMPLATE.md
vendored
2
.github/ISSUE_TEMPLATE.md
vendored
@ -27,7 +27,7 @@ Tell us how to reproduce this issue. Please provide a [minimal, complete and ver
|
|||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
sf::RenderWindow window(sf::VideoMode(1280, 720), "Minimal, complete and verifiable example");
|
sf::RenderWindow window(sf::VideoMode({1280, 720}), "Minimal, complete and verifiable example");
|
||||||
window.setFramerateLimit(60);
|
window.setFramerateLimit(60);
|
||||||
|
|
||||||
while (window.isOpen())
|
while (window.isOpen())
|
||||||
|
2
.github/PULL_REQUEST_TEMPLATE.md
vendored
2
.github/PULL_REQUEST_TEMPLATE.md
vendored
@ -32,7 +32,7 @@ Describe how to best test these changes. Please provide a [minimal, complete and
|
|||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
sf::RenderWindow window(sf::VideoMode(1280, 720), "Minimal, complete and verifiable example");
|
sf::RenderWindow window(sf::VideoMode({1280, 720}), "Minimal, complete and verifiable example");
|
||||||
window.setFramerateLimit(60);
|
window.setFramerateLimit(60);
|
||||||
|
|
||||||
while (window.isOpen())
|
while (window.isOpen())
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
/// int main()
|
/// int main()
|
||||||
/// {
|
/// {
|
||||||
/// // Create the main window
|
/// // Create the main window
|
||||||
/// sf::RenderWindow window(sf::VideoMode(800, 600), "SFML window");
|
/// sf::RenderWindow window(sf::VideoMode({800, 600}), "SFML window");
|
||||||
///
|
///
|
||||||
/// // Load a sprite to display
|
/// // Load a sprite to display
|
||||||
/// sf::Texture texture;
|
/// sf::Texture texture;
|
||||||
|
@ -258,7 +258,7 @@ private:
|
|||||||
///
|
///
|
||||||
/// \code
|
/// \code
|
||||||
/// // Create a new render-window
|
/// // Create a new render-window
|
||||||
/// sf::RenderWindow window(sf::VideoMode(800, 600), "SFML window");
|
/// sf::RenderWindow window(sf::VideoMode({800, 600}), "SFML window");
|
||||||
///
|
///
|
||||||
/// // Create a new render-texture
|
/// // Create a new render-texture
|
||||||
/// sf::RenderTexture texture;
|
/// sf::RenderTexture texture;
|
||||||
|
@ -195,7 +195,7 @@ private:
|
|||||||
///
|
///
|
||||||
/// \code
|
/// \code
|
||||||
/// // Declare and create a new render-window
|
/// // Declare and create a new render-window
|
||||||
/// sf::RenderWindow window(sf::VideoMode(800, 600), "SFML window");
|
/// sf::RenderWindow window(sf::VideoMode({800, 600}), "SFML window");
|
||||||
///
|
///
|
||||||
/// // Limit the framerate to 60 frames per second (this step is optional)
|
/// // Limit the framerate to 60 frames per second (this step is optional)
|
||||||
/// window.setFramerateLimit(60);
|
/// window.setFramerateLimit(60);
|
||||||
@ -230,7 +230,7 @@ private:
|
|||||||
///
|
///
|
||||||
/// \code
|
/// \code
|
||||||
/// // Create the render window
|
/// // Create the render window
|
||||||
/// sf::RenderWindow window(sf::VideoMode(800, 600), "SFML OpenGL");
|
/// sf::RenderWindow window(sf::VideoMode({800, 600}), "SFML OpenGL");
|
||||||
///
|
///
|
||||||
/// // Create a sprite and a text to display
|
/// // Create a sprite and a text to display
|
||||||
/// sf::Sprite sprite;
|
/// sf::Sprite sprite;
|
||||||
|
@ -222,7 +222,7 @@ SFML_WINDOW_API bool operator>=(const VideoMode& left, const VideoMode& right);
|
|||||||
///
|
///
|
||||||
/// // Create a window with the same pixel depth as the desktop
|
/// // Create a window with the same pixel depth as the desktop
|
||||||
/// sf::VideoMode desktop = sf::VideoMode::getDesktopMode();
|
/// sf::VideoMode desktop = sf::VideoMode::getDesktopMode();
|
||||||
/// window.create(sf::VideoMode(1024, 768, desktop.bitsPerPixel), "SFML window");
|
/// window.create(sf::VideoMode({1024, 768}, desktop.bitsPerPixel), "SFML window");
|
||||||
/// \endcode
|
/// \endcode
|
||||||
///
|
///
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
|
@ -329,7 +329,7 @@ private:
|
|||||||
/// Usage example:
|
/// Usage example:
|
||||||
/// \code
|
/// \code
|
||||||
/// // Declare and create a new window
|
/// // Declare and create a new window
|
||||||
/// sf::Window window(sf::VideoMode(800, 600), "SFML window");
|
/// sf::Window window(sf::VideoMode({800, 600}), "SFML window");
|
||||||
///
|
///
|
||||||
/// // Limit the framerate to 60 frames per second (this step is optional)
|
/// // Limit the framerate to 60 frames per second (this step is optional)
|
||||||
/// window.setFramerateLimit(60);
|
/// window.setFramerateLimit(60);
|
||||||
|
@ -508,7 +508,7 @@ private:
|
|||||||
/// Usage example:
|
/// Usage example:
|
||||||
/// \code
|
/// \code
|
||||||
/// // Declare and create a new window
|
/// // Declare and create a new window
|
||||||
/// sf::WindowBase window(sf::VideoMode(800, 600), "SFML window");
|
/// sf::WindowBase window(sf::VideoMode({800, 600}), "SFML window");
|
||||||
///
|
///
|
||||||
/// // The main loop - ends as soon as the window is closed
|
/// // The main loop - ends as soon as the window is closed
|
||||||
/// while (window.isOpen())
|
/// while (window.isOpen())
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
int main(int, char const**)
|
int main(int, char const**)
|
||||||
{
|
{
|
||||||
// Create the main window
|
// Create the main window
|
||||||
sf::RenderWindow window(sf::VideoMode(800, 600), "SFML window");
|
sf::RenderWindow window(sf::VideoMode({800, 600}), "SFML window");
|
||||||
|
|
||||||
// Set the Icon
|
// Set the Icon
|
||||||
sf::Image icon;
|
sf::Image icon;
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
int main(int argc, char const** argv)
|
int main(int argc, char const** argv)
|
||||||
{
|
{
|
||||||
// Create the main window
|
// Create the main window
|
||||||
sf::RenderWindow window(sf::VideoMode(800, 600), "SFML window");
|
sf::RenderWindow window(sf::VideoMode({800, 600}), "SFML window");
|
||||||
|
|
||||||
// Set the Icon
|
// Set the Icon
|
||||||
sf::Image icon;
|
sf::Image icon;
|
||||||
|
Loading…
Reference in New Issue
Block a user