{"id":276945,"date":"2016-03-25T12:58:02","date_gmt":"2016-03-25T09:58:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=276945"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=276945","title":{"rendered":"3.2 \u041e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0441\u043e\u0431\u044b\u0442\u0438\u0439"},"content":{"rendered":"<p>       <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/bc7\/94a\/b37\/bc794ab377be444f8090426e56ae38bd.png\"\/><\/p>\n<p>  <i>\u041e\u0442 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0447\u0438\u043a\u0430: \u0434\u0430\u043d\u043d\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0434\u0435\u0441\u044f\u0442\u043e\u0439 \u0432 \u0446\u0438\u043a\u043b\u0435 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u043e\u0432 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u0430 \u043f\u043e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0435 SFML. \u041f\u0440\u043e\u0448\u043b\u0443\u044e \u0441\u0442\u0430\u0442\u044c\u044e \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 <a href=\"https:\/\/habrahabr.ru\/post\/279957\/\" title=\"\u041f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f: \u041e\u0442\u043a\u0440\u044b\u0442\u0438\u0435 \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043e\u043a\u043d\u0430\u043c\u0438\">\u0442\u0443\u0442.<\/a> \u0414\u0430\u043d\u043d\u044b\u0439 \u0446\u0438\u043a\u043b \u0441\u0442\u0430\u0442\u0435\u0439 \u0441\u0442\u0430\u0432\u0438\u0442 \u0441\u0432\u043e\u0435\u0439 \u0446\u0435\u043b\u044c\u044e \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043b\u044e\u0434\u044f\u043c, \u043d\u0435 \u0437\u043d\u0430\u044e\u0449\u0438\u043c \u044f\u0437\u044b\u043a \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u0430, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u0441\u044f \u0441 \u044d\u0442\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u043e\u0439. SFML \u2014 \u044d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u0430\u044f \u0438 \u043a\u0440\u043e\u0441\u0441\u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435\u043d\u043d\u0430\u044f \u043c\u0443\u043b\u044c\u0442\u0438\u043c\u0435\u0434\u0438\u0430 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430. SFML \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0438\u0433\u0440 \u0438 \u043f\u0440\u043e\u0447\u0438\u0445 \u043c\u0443\u043b\u044c\u0442\u0438\u043c\u0435\u0434\u0438\u0439\u043d\u044b\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439. \u041e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u0443\u044e \u0441\u0442\u0430\u0442\u044c\u044e \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 <a href=\"http:\/\/www.sfml-dev.org\/tutorials\/2.3\/window-events.php\" title=\"\u041e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f: Events explained\">\u0442\u0443\u0442<\/a>. \u041d\u0430\u0447\u043d\u0435\u043c.<\/i><br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041e\u0433\u043b\u0430\u0432\u043b\u0435\u043d\u0438\u0435:<\/b><\/p>\n<div class=\"spoiler_text\">0.1 \u0412\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u0435<\/p>\n<p>  1. \u041f\u0440\u0438\u0441\u0442\u0443\u043f\u0430\u044f \u043a \u0440\u0430\u0431\u043e\u0442\u0435<\/p>\n<ol>\n<li><a href=\"https:\/\/habrahabr.ru\/post\/278977\/\" title=\"\u041f\u0435\u0440\u0435\u0439\u0442\u0438 \u043a \u0441\u0442\u0430\u0442\u044c\u0435: SFML \u0438 Visual Studio\">SFML \u0438 Visual Studio<\/a><\/li>\n<li><a href=\"https:\/\/habrahabr.ru\/post\/279069\/\" title=\"\u041f\u0435\u0440\u0435\u0439\u0442\u0438 \u043a \u0441\u0442\u0430\u0442\u044c\u0435: SFML \u0438 Code::Blocks (MinGW)\">SFML \u0438 Code::Blocks (MinGW)<\/a><\/li>\n<li><a href=\"https:\/\/habrahabr.ru\/post\/279107\/\" title=\"\u041f\u0435\u0440\u0435\u0439\u0442\u0438 \u043a \u0441\u0442\u0430\u0442\u044c\u0435: SFML \u0438 Linux\">SFML \u0438 Linux<\/a><\/li>\n<li><a href=\"https:\/\/habrahabr.ru\/post\/279147\/\" title=\"\u041f\u0435\u0440\u0435\u0439\u0442\u0438 \u043a \u0441\u0442\u0430\u0442\u044c\u0435: SFML \u0438 Xcode (Mac OS X)\">SFML \u0438 Xcode (Mac OS X)<\/a><\/li>\n<li><a href=\"https:\/\/habrahabr.ru\/post\/279279\/\" title=\"\u041f\u0435\u0440\u0435\u0439\u0442\u0438 \u043a \u0441\u0442\u0430\u0442\u044c\u0435: \u041a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044f SFML \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e CMake\">\u041a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044f SFML \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e CMake<\/a><\/li>\n<\/ol>\n<p>  2. \u041c\u043e\u0434\u0443\u043b\u044c System<\/p>\n<ol>\n<li><a href=\"https:\/\/habrahabr.ru\/post\/279347\/\" title=\"\u041f\u0435\u0440\u0435\u0439\u0442\u0438 \u043a \u0441\u0442\u0430\u0442\u044c\u0435: \u041e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0432\u0440\u0435\u043c\u0435\u043d\u0438\">\u041e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0432\u0440\u0435\u043c\u0435\u043d\u0438<\/a><\/li>\n<li><a href=\"https:\/\/habrahabr.ru\/post\/279653\/\" title=\"\u041f\u0435\u0440\u0435\u0439\u0442\u0438 \u043a \u0441\u0442\u0430\u0442\u044c\u0435: \u041f\u043e\u0442\u043e\u043a\u0438\">\u041f\u043e\u0442\u043e\u043a\u0438<\/a><\/li>\n<li><a href=\"https:\/\/habrahabr.ru\/post\/279689\/\" title=\"\u041f\u0435\u0440\u0435\u0439\u0442\u0438 \u043a \u0441\u0442\u0430\u0442\u044c\u0435: \u0420\u0430\u0431\u043e\u0442\u0430 \u0441 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u043c\u0438 \u043f\u043e\u0442\u043e\u043a\u0430\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u0445\">\u0420\u0430\u0431\u043e\u0442\u0430 \u0441 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u043c\u0438 \u043f\u043e\u0442\u043e\u043a\u0430\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u0445<\/a><\/li>\n<\/ol>\n<p>  3. \u041c\u043e\u0434\u0443\u043b\u044c Window<\/p>\n<ol>\n<li><a href=\"https:\/\/habrahabr.ru\/post\/279957\/\" title=\"\u041f\u0435\u0440\u0435\u0439\u0442\u0438 \u043a \u0441\u0442\u0430\u0442\u044c\u0435: \u041e\u0442\u043a\u0440\u044b\u0442\u0438\u0435 \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043e\u043a\u043d\u0430\u043c\u0438\">\u041e\u0442\u043a\u0440\u044b\u0442\u0438\u0435 \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043e\u043a\u043d\u0430\u043c\u0438<\/a><\/li>\n<li>\u041e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0441\u043e\u0431\u044b\u0442\u0438\u0439<\/li>\n<li>\u0420\u0430\u0431\u043e\u0442\u0430 \u0441 \u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u043e\u0439, \u043c\u044b\u0448\u044c\u044e \u0438 \u0434\u0436\u043e\u0439\u0441\u0442\u0438\u043a\u0430\u043c\u0438<\/li>\n<li>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 OpenGL<\/li>\n<\/ol>\n<p>  4. \u041c\u043e\u0434\u0443\u043b\u044c Graphics<\/p>\n<ol>\n<li>\u0420\u0438\u0441\u043e\u0432\u0430\u043d\u0438\u0435 2D \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432<\/li>\n<li>\u0421\u043f\u0440\u0430\u0439\u0442\u044b \u0438 \u0442\u0435\u043a\u0441\u0442\u0443\u0440\u044b<\/li>\n<li>\u0422\u0435\u043a\u0441\u0442 \u0438 \u0448\u0440\u0438\u0444\u0442\u044b<\/li>\n<li>\u0424\u043e\u0440\u043c\u044b<\/li>\n<li>\u041f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0432\u0430\u0448\u0438\u0445 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u0430\u0441\u0441\u0438\u0432\u043e\u0432 \u0432\u0435\u0440\u0448\u0438\u043d<\/li>\n<li>\u041f\u043e\u0437\u0438\u0446\u0438\u044f, \u0432\u0440\u0430\u0449\u0435\u043d\u0438\u0435, \u043c\u0430\u0441\u0448\u0442\u0430\u0431: \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432<\/li>\n<li>\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u044d\u0444\u0444\u0435\u043a\u0442\u043e\u0432 \u0441 \u0448\u0435\u0439\u0434\u0435\u0440\u0430\u043c\u0438<\/li>\n<li>\u041a\u043e\u043d\u0442\u0440\u043e\u043b\u044c 2D \u043a\u0430\u043c\u0435\u0440\u044b \u0438 \u0432\u0438\u0434\u0430<\/li>\n<\/ol>\n<p>  5. \u041c\u043e\u0434\u0443\u043b\u044c Audio<\/p>\n<ol>\n<li>\u041f\u0440\u043e\u0438\u0433\u0440\u044b\u0432\u0430\u043d\u0438\u0435 \u0437\u0432\u0443\u043a\u043e\u0432 \u0438 \u043c\u0443\u0437\u044b\u043a\u0438<\/li>\n<li>\u0417\u0430\u043f\u0438\u0441\u044c \u0430\u0443\u0434\u0438\u043e<\/li>\n<li>\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0435 \u043f\u043e\u0442\u043e\u043a\u0438 \u0430\u0443\u0434\u0438\u043e<\/li>\n<li>\u0421\u043f\u0430\u0442\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f: \u0437\u0432\u0443\u043a\u0438 \u0432 3D<\/li>\n<\/ol>\n<p>  6. \u041c\u043e\u0434\u0443\u043b\u044c Network<\/p>\n<ol>\n<li>\u041a\u043e\u043c\u043c\u0443\u043d\u0438\u043a\u0430\u0446\u0438\u044f \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0441\u043e\u043a\u0435\u0442\u043e\u0432<\/li>\n<li>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0438 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u043f\u0430\u043a\u0435\u0442\u043e\u0432<\/li>\n<li>\u0412\u0435\u0431-\u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e HTTP<\/li>\n<li>\u041f\u0435\u0440\u0435\u0434\u0430\u0447\u0430 \u0444\u0430\u0439\u043b\u043e\u0432 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e FTP<\/li>\n<\/ol>\n<p>  <\/div>\n<\/div>\n<p>  <\/p>\n<h2>\u0412\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u0435<\/h2>\n<p>  \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u0438 \u043e\u0431\u044a\u044f\u0441\u043d\u044f\u0435\u0442\u0441\u044f, \u043a\u0430\u043a \u044d\u0442\u0438 \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c.<\/p>\n<h2>\u0422\u0438\u043f sf::Event<\/h2>\n<p>  \u0414\u043e \u0434\u0435\u0442\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u0431\u043e\u0440\u0430 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u0432\u0430\u0436\u043d\u043e \u043f\u043e\u043d\u044f\u0442\u044c, \u0447\u0442\u043e \u0438\u0437 \u0441\u0435\u0431\u044f \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0442\u0438\u043f <a href=\"http:\/\/www.sfml-dev.org\/documentation\/2.3\/classsf_1_1Event.php\" title=\"\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u043f\u043e sf::Event\">sf::Event<\/a>, \u0438 \u043a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e. <a href=\"http:\/\/www.sfml-dev.org\/documentation\/2.3\/classsf_1_1Event.php\" title=\"\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u043f\u043e sf::Event\">sf::Event<\/a> \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f, \u0445\u0440\u0430\u043d\u044f\u0449\u0435\u0433\u043e \u0432 \u0441\u0435\u0431\u0435 \u0442\u0438\u043f \u0441\u043e\u0431\u044b\u0442\u0438\u044f, \u0438 \u0432\u0441\u043f\u043e\u043c\u0430\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0438 \u0447\u043b\u0435\u043d\u043e\u0432. \u0414\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u043c\u0443 \u0447\u043b\u0435\u043d\u0443 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0432\u0443\u0435\u0442 \u043e\u0434\u0438\u043d \u0438\u043b\u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0447\u043b\u0435\u043d\u043e\u0432 \u043a\u043b\u0430\u0441\u0441\u0430, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <code>event.key<\/code> \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0441\u043e\u0431\u044b\u0442\u0438\u044e <code>KeyPressed<\/code>. \u041f\u043e\u043f\u044b\u0442\u043a\u0430 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043b\u044e\u0431\u044b\u0445 \u0434\u0440\u0443\u0433\u0438\u0445 \u0447\u043b\u0435\u043d\u043e\u0432 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u0442 \u043a \u043d\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u043c\u0443 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044e (\u0441\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e, \u043a \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u043c\u0443 \u0438\u043b\u0438 \u043f\u043e\u0432\u0440\u0435\u0436\u0434\u0435\u043d\u043d\u043e\u043c\u0443 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044e). \u041d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u043f\u044b\u0442\u0430\u0439\u0442\u0435\u0441\u044c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043d\u0435 \u043f\u0440\u043e\u0438\u0437\u043e\u0448\u0435\u0434\u0448\u0435\u0435 \u0441\u043e\u0431\u044b\u0442\u0438\u0435.<\/p>\n<p>  \u042d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 <a href=\"http:\/\/www.sfml-dev.org\/documentation\/2.3\/classsf_1_1Event.php\" title=\"\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u043f\u043e sf::Event\">sf::Event<\/a> \u043c\u043e\u0436\u043d\u043e \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439 <code>pollEvent<\/code> (\u0438\u043b\u0438 <code>waitEvent<\/code>) \u043a\u043b\u0430\u0441\u0441\u0430 <a href=\"http:\/\/www.sfml-dev.org\/documentation\/2.3\/classsf_1_1Window.php\" title=\"\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u043f\u043e sf::Window\">sf::Window<\/a>. \u0422\u043e\u043b\u044c\u043a\u043e \u044d\u0442\u0438 \u0434\u0432\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043c\u043e\u0433\u0443\u0442 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 <a href=\"http:\/\/www.sfml-dev.org\/documentation\/2.3\/classsf_1_1Event.php\" title=\"\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u043f\u043e sf::Event\">sf::Event<\/a>. <\/p>\n<p>  \u0414\u043b\u044f \u044f\u0441\u043d\u043e\u0441\u0442\u0438, \u0432\u043e\u0442 \u043a\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0438\u043f\u0438\u0447\u043d\u044b\u0439 \u0446\u0438\u043a\u043b \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0441\u043e\u0431\u044b\u0442\u0438\u0439:<\/p>\n<pre><code>sf::Event event;  \/\/ \u043f\u043e\u043a\u0430 \u0435\u0441\u0442\u044c \u0441\u043e\u0431\u044b\u0442\u0438\u044f, \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0438\u0445... while (window.pollEvent(event)) {     \/\/ \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0442\u0438\u043f \u0441\u043e\u0431\u044b\u0442\u0438\u044f...     switch (event.type)     {         \/\/ \u0437\u0430\u043a\u0440\u044b\u0442\u0438\u0435 \u043e\u043a\u043d\u0430         case sf::Event::Closed:             window.close();             break;          \/\/ \u043d\u0430\u0436\u0430\u0442\u0438\u0435 \u043a\u043b\u0430\u0432\u0438\u0448\u0438         case sf::Event::KeyPressed:             ...             break;          \/\/ \u043c\u044b \u043d\u0435 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u043c \u0434\u0440\u0443\u0433\u0438\u0435 \u0442\u0438\u043f\u044b \u0441\u043e\u0431\u044b\u0442\u0438\u0439         default:             break;     } } <\/code><\/pre>\n<p>  \u041f\u0435\u0440\u0435\u0447\u0438\u0442\u0430\u0439\u0442\u0435 \u043f\u0430\u0440\u0430\u0433\u0440\u0430\u0444 \u0432\u044b\u0448\u0435 \u0438 \u0443\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e \u0432\u044b \u0432\u0441\u0435 \u043f\u043e\u043d\u044f\u043b\u0438. \u041a\u043b\u0430\u0441\u0441 <a href=\"http:\/\/www.sfml-dev.org\/documentation\/2.3\/classsf_1_1Event.php\" title=\"\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u043f\u043e sf::Event\">sf::Event<\/a> \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 \u043c\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u0443 \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0449\u0438\u0445 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u043e\u0432.<\/p>\n<p>  \u041b\u0430\u0434\u043d\u043e, \u0442\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u0437\u043d\u0430\u0435\u043c, \u043a\u0430\u043a \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u044b \u0432 SFML, \u043d\u0430\u0441\u0442\u0430\u043b\u043e \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u044f\u0441\u043d\u0438\u0442\u044c, \u0447\u0442\u043e \u043a\u0430\u0436\u0434\u043e\u0435 \u0441\u043e\u0431\u044b\u0442\u0438\u0435 \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442.<\/p>\n<h2>\u0421\u043e\u0431\u044b\u0442\u0438\u0435 Closed<\/h2>\n<p>  \u0421\u043e\u0431\u044b\u0442\u0438\u0435 <code>sf::Event::Closed<\/code> \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442, \u043a\u043e\u0433\u0434\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0445\u043e\u0447\u0435\u0442 \u0437\u0430\u043a\u0440\u044b\u0442\u044c \u043e\u043a\u043d\u043e, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043b\u044e\u0431\u043e\u0439 \u0438\u0437 \u043c\u0435\u0442\u043e\u0434\u043e\u0432, \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c\u044b\u0445 \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u043e\u043c \u043e\u043a\u043e\u043d (\u043a\u043d\u043e\u043f\u043a\u0430 \u0437\u0430\u043a\u0440\u044b\u0442\u0438\u044f, \u043c\u0430\u043a\u0440\u043e\u0441\u044b \u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u044b \u0438 \u0442\u0430\u043a \u0434\u0430\u043b\u0435\u0435). \u042d\u0442\u043e \u0441\u043e\u0431\u044b\u0442\u0438\u0435 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043f\u043e\u043f\u044b\u0442\u0430\u043b\u0441\u044f \u0437\u0430\u043a\u0440\u044b\u0442\u044c \u043e\u043a\u043d\u043e; \u043e\u043d\u043e \u0435\u0449\u0435 \u043d\u0435 \u0437\u0430\u043a\u0440\u044b\u0442\u043e.<\/p>\n<p>  \u041e\u0431\u044b\u0447\u043d\u043e, \u0432 \u043e\u0442\u0432\u0435\u0442 \u043d\u0430 \u044d\u0442\u043e \u0441\u043e\u0431\u044b\u0442\u0438\u0435, \u043a\u043e\u0434 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 <code>window.close()<\/code>, \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u043a\u0440\u044b\u0442\u044c \u043e\u043a\u043d\u043e. \u041e\u0434\u043d\u0430\u043a\u043e, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0435\u0449\u0435 \u0447\u0442\u043e-\u0442\u043e, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0442\u0435\u043a\u0443\u0449\u0435\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0438\u043b\u0438 \u0441\u043f\u0440\u043e\u0441\u0438\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u0447\u0442\u043e \u043d\u0430\u0434\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c. \u0415\u0441\u043b\u0438 \u0432\u044b \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0441\u0434\u0435\u043b\u0430\u0435\u0442\u0435 \u0432 \u043e\u0442\u0432\u0435\u0442 \u043d\u0430 \u044d\u0442\u043e \u0441\u043e\u0431\u044b\u0442\u0438\u0435, \u043e\u043a\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u043e\u0441\u0442\u0430\u0432\u0430\u0442\u044c\u0441\u044f \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u043c.<\/p>\n<p>  \u0427\u043b\u0435\u043d \u043a\u043b\u0430\u0441\u0441\u0430, \u0430\u0441\u0441\u043e\u0446\u0438\u0438\u0440\u0443\u0435\u043c\u044b\u0439 \u0441 \u044d\u0442\u0438\u043c \u0441\u043e\u0431\u044b\u0442\u0438\u0435\u043c, \u043d\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442.<\/p>\n<pre><code>if (event.type == sf::Event::Closed)     window.close(); <\/code><\/pre>\n<p>  <\/p>\n<h2>\u0421\u043e\u0431\u044b\u0442\u0438\u0435 Resized<\/h2>\n<p>  \u0421\u043e\u0431\u044b\u0442\u0438\u0435 <code>sf::Event::Resized<\/code> \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442, \u043a\u043e\u0433\u0434\u0430 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u043e\u043a\u043d\u0430. \u041b\u0438\u0431\u043e \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u043b\u0438\u0431\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e, \u043f\u043e\u0441\u043b\u0435 \u0432\u044b\u0437\u043e\u0432\u0430 <code>window.setSize<\/code>.<\/p>\n<p>  \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u043e \u0441\u043e\u0431\u044b\u0442\u0438\u0435, \u0447\u0442\u043e\u0431\u044b \u043e\u0442\u0440\u0435\u0433\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f: \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430, \u0435\u0441\u043b\u0438 \u0432\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 OpenGL \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e, \u0438\u043b\u0438 \u0442\u0435\u043a\u0443\u0449\u0443\u044e \u0442\u043e\u0447\u043a\u0443 \u043e\u0431\u0437\u043e\u0440\u0430, \u0435\u0441\u043b\u0438 \u0432\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 <code>sfml-graphics<\/code>.<\/p>\n<p>  \u0427\u043b\u0435\u043d \u043a\u043b\u0430\u0441\u0441\u0430, \u0430\u0441\u0441\u043e\u0446\u0438\u0438\u0440\u0443\u0435\u043c\u044b\u0439 \u0441 \u044d\u0442\u0438\u043c \u0441\u043e\u0431\u044b\u0442\u0438\u0435\u043c, \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f event.size \u0438 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043d\u043e\u0432\u044b\u0439 \u0440\u0430\u0437\u043c\u0435\u0440 \u043e\u043a\u043d\u0430.<\/p>\n<pre><code>if (event.type == sf::Event::Resized) {     std::cout &lt;&lt; &quot;new width: &quot; &lt;&lt; event.size.width &lt;&lt; std::endl;     std::cout &lt;&lt; &quot;new height: &quot; &lt;&lt; event.size.height &lt;&lt; std::endl; } <\/code><\/pre>\n<p>  <\/p>\n<h2>\u0421\u043e\u0431\u044b\u0442\u0438\u044f LostFocus \u0438 GainedFocus<\/h2>\n<p>  \u0421\u043e\u0431\u044b\u0442\u0438\u044f <code>sf::Event::LostFocus<\/code> \u0438 <code>sf::Event::GainedFocus<\/code> \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044e\u0442, \u043a\u043e\u0433\u0434\u0430 \u043e\u043a\u043d\u043e \u043f\u043e\u0442\u0435\u0440\u044f\u043b\u043e\/\u043f\u0440\u0438\u043e\u0431\u0440\u0435\u043b\u043e \u0444\u043e\u043a\u0443\u0441; \u044d\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442, \u043a\u043e\u0433\u0434\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043c\u0435\u043d\u044f\u0435\u0442 \u0442\u0435\u043a\u0443\u0449\u0435\u0435 \u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0435 \u043e\u043a\u043d\u043e. \u041a\u043e\u0433\u0434\u0430 \u043e\u043a\u043d\u043e \u0442\u0435\u0440\u044f\u0435\u0442 \u0444\u043e\u043a\u0443\u0441, \u043e\u043d\u043e \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u044b.<\/p>\n<p>  \u042d\u0442\u043e \u0441\u043e\u0431\u044b\u0442\u0438\u0435 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u043b\u044f \u043f\u0440\u0438\u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0438\u0433\u0440\u044b, \u043a\u043e\u0433\u0434\u0430 \u043e\u043a\u043d\u043e \u043d\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u043e.<\/p>\n<p>  \u0427\u043b\u0435\u043d \u043a\u043b\u0430\u0441\u0441\u0430, \u0430\u0441\u0441\u043e\u0446\u0438\u0438\u0440\u0443\u0435\u043c\u044b\u0439 \u0441 \u044d\u0442\u0438\u043c \u0441\u043e\u0431\u044b\u0442\u0438\u0435\u043c, \u043d\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442.<\/p>\n<pre><code>if (event.type == sf::Event::LostFocus)     myGame.pause();  if (event.type == sf::Event::GainedFocus)     myGame.resume(); <\/code><\/pre>\n<p>  <\/p>\n<h2>\u0421\u043e\u0431\u044b\u0442\u0438\u044f TextEntered<\/h2>\n<p>  \u0421\u043e\u0431\u044b\u0442\u0438\u0435 <code>sf::Event::TextEntered<\/code> \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442, \u043a\u043e\u0433\u0434\u0430 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0432\u0432\u043e\u0434 \u0441\u0438\u043c\u0432\u043e\u043b\u0430. \u042d\u0442\u043e \u043d\u0435 \u0441\u043e\u0431\u044b\u0442\u0438\u0435 <code>KeyPressed<\/code>: <code>TextEntered<\/code> \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442, \u043a\u043e\u0433\u0434\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0432\u0432\u043e\u0434\u0438\u0442 \u0441\u0438\u043c\u0432\u043e\u043b, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0432\u044b\u0432\u0435\u0434\u0435\u043d. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043d\u0430\u0436\u0430\u0442\u0438\u0435 &#8216;^&#8217; \u0438 &#8216;e&#8217; \u043d\u0430 \u0444\u0440\u0430\u043d\u0446\u0443\u0437\u0441\u043a\u043e\u0439 \u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u0435 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u0442 \u043a \u0434\u0432\u0443\u043c \u0441\u043e\u0431\u044b\u0442\u0438\u044f\u043c <code>KeyPressed<\/code> \u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u043a \u043e\u0434\u043d\u043e\u043c\u0443 <code>TextEntered<\/code>, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0435\u043c\u0443 \u0441\u0438\u043c\u0432\u043e\u043b &#8216;\u00ea&#8217;. \u042d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0432\u0432\u043e\u0434\u0430, \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u043c \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439.<\/p>\n<p>  \u042d\u0442\u043e \u0441\u043e\u0431\u044b\u0442\u0438\u0435 \u043e\u0431\u044b\u0447\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043e\u0442\u043b\u043e\u0432\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0433\u043e \u0432\u0432\u043e\u0434\u0430 \u0432 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u0435 \u043f\u043e\u043b\u0435.<\/p>\n<p>  \u0427\u043b\u0435\u043d \u043a\u043b\u0430\u0441\u0441\u0430, \u0430\u0441\u0441\u043e\u0446\u0438\u0438\u0440\u0443\u0435\u043c\u044b\u0439 \u0441 \u044d\u0442\u0438\u043c \u0441\u043e\u0431\u044b\u0442\u0438\u0435\u043c, \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f <code>event.text<\/code> \u0438 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043d\u043e\u043c\u0435\u0440 \u0441\u0438\u043c\u0432\u043e\u043b\u0430 Unicode \u0432\u0432\u0435\u0434\u0435\u043d\u043d\u043e\u0433\u043e \u0441\u0438\u043c\u0432\u043e\u043b\u0430. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432 <a href=\"http:\/\/www.sfml-dev.org\/documentation\/2.3\/classsf_1_1String.php\" title=\"\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u043f\u043e sf::String\">sf::String<\/a>, \u0438\u043b\u0438 \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u0435\u0433\u043e \u043a \u0442\u0438\u043f\u0443 <code>char<\/code> \u043f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u0443\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e \u044d\u0442\u043e\u0442 \u0441\u0438\u043c\u0432\u043e\u043b \u043b\u0435\u0436\u0438\u0442 \u0432 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0435 ASCII \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 (0 \u2014 127).<\/p>\n<pre><code>if (event.type == sf::Event::TextEntered) {     if (event.text.unicode &lt; 128)         std::cout &lt;&lt; &quot;ASCII character typed: &quot; &lt;&lt; static_cast&lt;char&gt;(event.text.unicode) &lt;&lt; std::endl; } <\/code><\/pre>\n<p>  \u041c\u043d\u043e\u0433\u0438\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0441\u043e\u0431\u044b\u0442\u0438\u0435 <code>KeyPressed<\/code> \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0433\u043e \u0432\u0432\u043e\u0434\u0430 \u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u044e\u0442 \u0441\u0443\u043c\u0430\u0441\u0448\u0435\u0434\u0448\u0438\u0435 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0433\u043e \u0432\u0432\u043e\u0434\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u044b\u0442\u0430\u044e\u0442\u0441\u044f \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u0438 \u043a\u043b\u0430\u0432\u0438\u0448. \u041d\u0435 \u0434\u0435\u043b\u0430\u0439\u0442\u0435 \u044d\u0442\u043e\u0433\u043e!<\/p>\n<h2>\u0421\u043e\u0431\u044b\u0442\u0438\u044f KeyPressed \u0438 KeyReleased<\/h2>\n<p>  \u0421\u043e\u0431\u044b\u0442\u0438\u044f <code>sf::Event::KeyPressed<\/code> \u0438 <code>sf::Event::KeyReleased<\/code> \u0441\u0440\u0430\u0431\u0430\u0442\u0438\u0432\u0430\u044e\u0442, \u043a\u043e\u0433\u0434\u0430 \u043a\u043b\u0430\u0432\u0438\u0448\u0430 \u043d\u0430 \u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u0435 \u043d\u0430\u0436\u0430\u0442\u0430\/\u043e\u0442\u0436\u0430\u0442\u0430. <\/p>\n<p>  \u0415\u0441\u043b\u0438 \u043a\u043b\u0430\u0432\u0438\u0448\u0430 \u0437\u0430\u0436\u0430\u0442\u0430, \u0441\u043e\u0431\u044b\u0442\u0438\u044f <code>KeyPressed<\/code> \u0431\u0443\u0434\u0443\u0442 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0441 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u043c \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u043e\u0432, \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u043c \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439 (\u0442.\u0435. \u0442\u0430 \u0436\u0435 \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0430, \u0447\u0442\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f, \u043a\u043e\u0433\u0434\u0430 \u0432\u044b \u0432\u0432\u043e\u0434\u0438\u0442\u0435 \u0442\u0435\u043a\u0441\u0442 \u0432 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0435). \u0427\u0442\u043e\u0431\u044b \u043e\u0442\u043c\u0435\u043d\u0438\u0442\u044c \u043f\u043e\u0432\u0442\u043e\u0440\u0435\u043d\u0438\u0435 \u0441\u043e\u0431\u044b\u0442\u0438\u0439 <code>KeyPressed<\/code>, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u044b\u0437\u0432\u0430\u0442\u044c <code>window.setKeyRepeatEnabled(false)<\/code>. \u041e\u0447\u0435\u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u0441\u043e\u0431\u044b\u0442\u0438\u0435 <code>KeyReleased<\/code> \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u0435\u0442\u0441\u044f.<\/p>\n<p>  \u042d\u0442\u0438 \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c, \u0435\u0441\u043b\u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u043a\u0430\u043a\u043e\u0435-\u043d\u0438\u0431\u0443\u0434\u044c \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0440\u043e\u0432\u043d\u043e \u043e\u0434\u0438\u043d \u0440\u0430\u0437, \u043a\u043e\u0433\u0434\u0430 \u043a\u043b\u0430\u0432\u0438\u0448\u0430 \u043d\u0430\u0436\u0430\u0442\u0430 \u0438\u043b\u0438 \u043e\u0442\u0436\u0430\u0442\u0430, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u0436\u0430 \u043f\u0440\u044b\u0433\u043d\u0443\u0442\u044c. <\/p>\n<p>  \u0418\u043d\u043e\u0433\u0434\u0430 \u043b\u044e\u0434\u0438 \u043f\u044b\u0442\u0430\u044e\u0442\u0441\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u043e\u0431\u044b\u0442\u0438\u0435 <code>KeyPressed<\/code> \u0434\u043b\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u043b\u0430\u0432\u043d\u043e\u0433\u043e \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u044f. \u042d\u0442\u043e \u043d\u0435 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a \u043e\u0436\u0438\u0434\u0430\u0435\u043c\u043e\u043c\u0443 \u044d\u0444\u0444\u0435\u043a\u0442\u0443, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u044d\u0442\u043e \u0441\u043e\u0431\u044b\u0442\u0438\u0435 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0441 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u043c \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u043e\u043c. \u0427\u0442\u043e\u0431\u044b \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u043b\u0430\u0432\u043d\u043e\u0435 \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u043e\u0431\u044b\u0442\u0438\u0439, \u0432\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c\u043e\u0435 <code>KeyPressed<\/code> \u0438 \u043e\u0431\u043d\u0443\u043b\u044f\u0435\u043c\u043e\u0435 <code>KeyReleased<\/code>; \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0442\u044c\u0441\u044f, \u043f\u043e\u043a\u0430 \u044d\u0442\u043e \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043e.<\/p>\n<p>  \u0414\u0440\u0443\u0433\u0438\u0435 (\u0431\u043e\u043b\u0435\u0435 \u043f\u0440\u043e\u0441\u0442\u044b\u0435) \u043f\u0443\u0442\u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u043b\u0430\u0432\u043d\u043e\u0433\u043e \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u0435, \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0432\u043e\u0434\u0430 \u0441 \u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u044b \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <a href=\"http:\/\/www.sfml-dev.org\/documentation\/2.3\/classsf_1_1Keyboard.php\" title=\"\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u043f\u043e sf::Keyboard\">sf::Keyboard<\/a> (\u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 <a href=\"http:\/\/www.sfml-dev.org\/tutorials\/2.3\/window-inputs.php\" title=\"\u0421\u0442\u0430\u0442\u044c\u044f \u043e \u0432\u0432\u043e\u0434\u0435 \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0438\">\u043f\u043e\u0441\u0432\u044f\u0449\u0435\u043d\u043d\u0443\u044e \u044d\u0442\u043e\u043c\u0443 \u0441\u0442\u0430\u0442\u044c\u044e<\/a>).<\/p>\n<p>  \u0427\u043b\u0435\u043d \u043a\u043b\u0430\u0441\u0441\u0430, \u0430\u0441\u0441\u043e\u0446\u0438\u0438\u0440\u0443\u0435\u043c\u044b\u0439 \u0441 \u044d\u0442\u0438\u043c \u0441\u043e\u0431\u044b\u0442\u0438\u0435\u043c, \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f <code>event.key<\/code> \u0438 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043a\u043e\u0434 \u043d\u0430\u0436\u0430\u0442\u043e\u0433\u043e\/\u043e\u0442\u0436\u0430\u0442\u043e\u0433\u043e \u0441\u0438\u043c\u0432\u043e\u043b\u0430, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0442\u0435\u043a\u0443\u0449\u0435\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043a\u043b\u0430\u0432\u0438\u0448-\u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u043e\u0432 (alt, control, shift, system).<\/p>\n<pre><code>if (event.type == sf::Event::KeyPressed) {     if (event.key.code == sf::Keyboard::Escape)     {         std::cout &lt;&lt; &quot;the escape key was pressed&quot; &lt;&lt; std::endl;         std::cout &lt;&lt; &quot;control:&quot; &lt;&lt; event.key.control &lt;&lt; std::endl;         std::cout &lt;&lt; &quot;alt:&quot; &lt;&lt; event.key.alt &lt;&lt; std::endl;         std::cout &lt;&lt; &quot;shift:&quot; &lt;&lt; event.key.shift &lt;&lt; std::endl;         std::cout &lt;&lt; &quot;system:&quot; &lt;&lt; event.key.system &lt;&lt; std::endl;     } } <\/code><\/pre>\n<p>  \u041f\u043e\u043c\u043d\u0438\u0442\u0435, \u0447\u0442\u043e \u043d\u0435\u043a\u0442\u043e\u0440\u044b\u0435 \u043a\u043b\u0430\u0432\u0438\u0448\u0438 \u0438\u043c\u0435\u044e\u0442 \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b, \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u044d\u0442\u0438\u0445 \u043a\u043b\u0430\u0432\u0438\u0448 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a \u043d\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u043c\u0443 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044e. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043a\u043b\u0430\u0432\u0438\u0448\u0430 F10 \u0432 Windows, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043c\u0435\u043d\u044f\u0435\u0442 \u0444\u043e\u043a\u0443\u0441, \u0438\u043b\u0438 \u043a\u043b\u0430\u0432\u0438\u0448\u0430 F12, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0434\u0435\u0431\u0430\u0433\u0435\u0440 \u043f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 Visual Studio. \u042d\u0442\u0430 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0431\u0443\u0434\u0435\u0442 \u0440\u0435\u0448\u0435\u043d\u0430 \u0432 \u0431\u0443\u0434\u0443\u0449\u0438\u0445 \u0432\u0435\u0440\u0441\u0438\u044f\u0445 SFML.<\/p>\n<h2>\u0421\u043e\u0431\u044b\u0442\u0438\u0435 MouseWheelMoved<\/h2>\n<p>  \u0421\u043e\u0431\u044b\u0442\u0438\u0435 <code>sf::Event::MouseWheelMoved<\/code> \u0443\u0441\u0442\u0430\u0440\u0435\u043b\u043e \u0438 \u0431\u044b\u043b\u043e \u0443\u043f\u0440\u0430\u0437\u043d\u0435\u043d\u043e \u0432 SFML 2.3. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 <code>MouseWheelScrolled<\/code>. <\/p>\n<h2>\u0421\u043e\u0431\u044b\u0442\u0438\u0435 MouseWheelScrolled<\/h2>\n<p>  \u0421\u043e\u0431\u044b\u0442\u0438\u0435 <code>sf::Event::MouseWheelScrolled<\/code> \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u0435\u0441\u044f, \u043a\u043e\u0433\u0434\u0430 \u043a\u043e\u043b\u0435\u0441\u043e \u043c\u044b\u0448\u0438 \u0434\u0432\u0438\u0433\u0430\u0435\u0442\u0441\u044f \u0432\u0432\u0435\u0440\u0445, \u0432\u043d\u0438\u0437 \u0438\u043b\u0438 \u0432\u0431\u043e\u043a (\u0435\u0441\u043b\u0438 \u044d\u0442\u043e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043c\u044b\u0448\u044c\u044e). <\/p>\n<p>  \u0427\u043b\u0435\u043d \u043a\u043b\u0430\u0441\u0441\u0430, \u0430\u0441\u0441\u043e\u0446\u0438\u0438\u0440\u0443\u0435\u043c\u044b\u0439 \u0441 \u044d\u0442\u0438\u043c \u0441\u043e\u0431\u044b\u0442\u0438\u0435\u043c, \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f <code>event.mouseWheelScroll<\/code> \u0438 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0447\u0438\u0441\u043b\u043e \u0442\u0438\u043a\u043e\u0432, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0441\u043c\u0435\u0441\u0442\u0438\u043b\u043e\u0441\u044c \u043a\u043e\u043b\u0435\u0441\u043e, \u043e\u0440\u0438\u0435\u043d\u0442\u0430\u0446\u0438\u044e \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u044f \u043a\u043e\u043b\u0435\u0441\u0430 \u0438 \u0442\u0435\u043a\u0443\u0449\u0443\u044e \u043f\u043e\u0437\u0438\u0446\u0438\u044e \u043a\u0443\u0440\u0441\u043e\u0440\u0430 \u043c\u044b\u0448\u0438.<\/p>\n<pre><code>if (event.type == sf::Event::MouseWheelScrolled) {     if (event.mouseWheelScroll.wheel == sf::Mouse::VerticalWheel)         std::cout &lt;&lt; &quot;wheel type: vertical&quot; &lt;&lt; std::endl;     else if (event.mouseWheelScroll.wheel == sf::Mouse::HorizontalWheel)         std::cout &lt;&lt; &quot;wheel type: horizontal&quot; &lt;&lt; std::endl;     else         std::cout &lt;&lt; &quot;wheel type: unknown&quot; &lt;&lt; std::endl;     std::cout &lt;&lt; &quot;wheel movement: &quot; &lt;&lt; event.mouseWheelScroll.delta &lt;&lt; std::endl;     std::cout &lt;&lt; &quot;mouse x: &quot; &lt;&lt; event.mouseWheelScroll.x &lt;&lt; std::endl;     std::cout &lt;&lt; &quot;mouse y: &quot; &lt;&lt; event.mouseWheelScroll.y &lt;&lt; std::endl; } <\/code><\/pre>\n<p>  <\/p>\n<h2>\u0421\u043e\u0431\u044b\u0442\u0438\u044f MouseButtonPressed \u0438 MouseButtonReleased<\/h2>\n<p>  \u0421\u043e\u0431\u044b\u0442\u0438\u044f <code>sf::Event::MouseButtonPressed<\/code> \u0438 <code>sf::Event::MouseButtonReleased<\/code> \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044e\u0442, \u043a\u043e\u0433\u0434\u0430 \u043a\u043d\u043e\u043f\u043a\u0430 \u043c\u044b\u0448\u0438 \u043d\u0430\u0436\u0430\u0442\u0430\/\u043e\u0442\u043f\u0443\u0449\u0435\u043d\u0430.<\/p>\n<p>  SFML \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 5 \u043a\u043d\u043e\u043f\u043e\u043a \u043c\u044b\u0448\u0438: \u043b\u0435\u0432\u0443\u044e, \u043f\u0440\u0430\u0432\u0443\u044e, \u0441\u0440\u0435\u0434\u043d\u044e\u044e (\u043a\u043e\u043b\u0435\u0441\u043e \u043c\u044b\u0448\u0438), \u044d\u043a\u0441\u0442\u0440\u0430 #1 \u0438 \u044d\u043a\u0441\u0442\u0440\u0430 #2 (\u043a\u043d\u043e\u043f\u043a\u0438 \u043d\u0430 \u0431\u043e\u043a\u043e\u0432\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u0435).<\/p>\n<p>  \u0427\u043b\u0435\u043d \u043a\u043b\u0430\u0441\u0441\u0430, \u0430\u0441\u0441\u043e\u0446\u0438\u0438\u0440\u0443\u0435\u043c\u044b\u0439 \u0441 \u044d\u0442\u0438\u043c \u0441\u043e\u0431\u044b\u0442\u0438\u0435\u043c, \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f <code>event.mouseButton<\/code> \u0438 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043a\u043e\u0434 \u043d\u0430\u0436\u0430\u0442\u043e\u0439\/\u043e\u0442\u0436\u0430\u0442\u043e\u0439 \u043a\u043d\u043e\u043f\u043a\u0438, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u0437\u0438\u0446\u0438\u044e \u043a\u0443\u0440\u0441\u043e\u0440\u0430 \u043c\u044b\u0448\u0438.<\/p>\n<pre><code>if (event.type == sf::Event::MouseButtonPressed) {     if (event.mouseButton.button == sf::Mouse::Right)     {         std::cout &lt;&lt; &quot;the right button was pressed&quot; &lt;&lt; std::endl;         std::cout &lt;&lt; &quot;mouse x: &quot; &lt;&lt; event.mouseButton.x &lt;&lt; std::endl;         std::cout &lt;&lt; &quot;mouse y: &quot; &lt;&lt; event.mouseButton.y &lt;&lt; std::endl;     } } <\/code><\/pre>\n<p>  <\/p>\n<h2>\u0421\u043e\u0431\u044b\u0442\u0438\u0435 MouseMoved<\/h2>\n<p>  \u0421\u043e\u0431\u044b\u0442\u0438\u0435 <code>sf::Event::MouseMoved<\/code> \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442, \u043a\u043e\u0433\u0434\u0430 \u043a\u0443\u0440\u0441\u043e\u0440 \u043c\u044b\u0448\u0438 \u0434\u0432\u0438\u0436\u0435\u0442\u0441\u044f \u0432\u043d\u0443\u0442\u0440\u0438 \u043e\u043a\u043d\u0430. <\/p>\n<p>  \u042d\u0442\u043e \u0441\u043e\u0431\u044b\u0442\u0438\u0435 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442, \u0434\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u043e\u043a\u043d\u043e \u043d\u0435 \u0432 \u0444\u043e\u043a\u0443\u0441\u0435. \u041e\u0434\u043d\u0430\u043a\u043e, \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043a\u043e\u0433\u0434\u0430 \u043a\u0443\u0440\u0441\u043e\u0440 \u043c\u044b\u0448\u0438 \u0434\u0432\u0438\u0436\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u043f\u0440\u0435\u0434\u0435\u043b\u0430\u0445 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u043e\u043a\u043d\u0430 (\u0432\u043e \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u044e\u044e \u043e\u0431\u043b\u0430\u0441\u044c \u043e\u043a\u043d\u0430 \u043d\u0435 \u0432\u0445\u043e\u0434\u044f\u0442 \u0437\u0430\u0433\u043e\u043b\u043e\u0432 \u0438 \u0433\u0440\u0430\u043d\u0438\u0446\u044b), <\/p>\n<p>  \u0427\u043b\u0435\u043d \u043a\u043b\u0430\u0441\u0441\u0430, \u0430\u0441\u0441\u043e\u0446\u0438\u0438\u0440\u0443\u0435\u043c\u044b\u0439 \u0441 \u044d\u0442\u0438\u043c \u0441\u043e\u0431\u044b\u0442\u0438\u0435\u043c, \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f <code>event.mouseMove<\/code> \u0438 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043f\u043e\u0437\u0438\u0446\u0438\u044e \u043a\u0443\u0440\u0441\u043e\u0440\u0430 \u043c\u044b\u0448\u0438 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043e\u043a\u043d\u0430.<\/p>\n<pre><code>if (event.type == sf::Event::MouseMoved) {     std::cout &lt;&lt; &quot;new mouse x: &quot; &lt;&lt; event.mouseMove.x &lt;&lt; std::endl;     std::cout &lt;&lt; &quot;new mouse y: &quot; &lt;&lt; event.mouseMove.y &lt;&lt; std::endl; } <\/code><\/pre>\n<h2>\u0421\u043e\u0431\u044b\u0442\u0438\u044f MouseEntered \u0438 MouseLeft<\/h2>\n<p>  \u0421\u043e\u0431\u044b\u0442\u0438\u044f <code>sf::Event::MouseEntered<\/code> \u0438 <code>sf::Event::MouseLeft<\/code> \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044e\u0442, \u043a\u043e\u0433\u0434\u0430 \u043a\u0443\u0440\u0441\u043e\u0440 \u043c\u044b\u0448\u0438 \u0432\u0445\u043e\u0434\u0438\u0442 \u0432 \u043e\u0431\u043b\u0430\u0441\u044c \u043e\u043a\u043d\u0430 \u0438\u043b\u0438 \u043f\u043e\u043a\u0438\u0434\u0430\u0435\u0442 \u0435\u0435.<\/p>\n<p>  \u0427\u043b\u0435\u043d \u043a\u043b\u0430\u0441\u0441\u0430, \u0430\u0441\u0441\u043e\u0446\u0438\u0438\u0440\u0443\u0435\u043c\u044b\u0439 \u0441 \u044d\u0442\u0438\u043c \u0441\u043e\u0431\u044b\u0442\u0438\u0435\u043c, \u043d\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442.<\/p>\n<pre><code>if (event.type == sf::Event::MouseEntered)     std::cout &lt;&lt; &quot;the mouse cursor has entered the window&quot; &lt;&lt; std::endl;  if (event.type == sf::Event::MouseLeft)     std::cout &lt;&lt; &quot;the mouse cursor has left the window&quot; &lt;&lt; std::endl; <\/code><\/pre>\n<p>  <\/p>\n<h2>\u0421\u043e\u0431\u044b\u0442\u0438\u044f JoystickButtonPressed \u0438 JoystickButtonReleased<\/h2>\n<p>  \u0421\u043e\u0431\u044b\u0442\u0438\u044f <code>sf::Event::JoystickButtonPressed<\/code> \u0438 <code>sf::Event::JoystickButtonReleased<\/code> \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044e\u0442, \u043a\u043e\u0433\u0434\u0430 \u043a\u043d\u043e\u043f\u043a\u0430 \u0433\u0435\u0439\u043c\u043f\u0430\u0434\u0430 \u043d\u0430\u0436\u0430\u0442\u0430\/\u043e\u0442\u0436\u0430\u0442\u0430. <\/p>\n<p>  SFML \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 8 \u0434\u0436\u043e\u0439\u0441\u0442\u0438\u043a\u043e\u0432 \u0438 32 \u043a\u043d\u043e\u043f\u043a\u0438.<\/p>\n<p>  \u0427\u043b\u0435\u043d \u043a\u043b\u0430\u0441\u0441\u0430, \u0430\u0441\u0441\u043e\u0446\u0438\u0438\u0440\u0443\u0435\u043c\u044b\u0439 \u0441 \u044d\u0442\u0438\u043c \u0441\u043e\u0431\u044b\u0442\u0438\u0435\u043c, \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f <code>event.joystickButton<\/code> \u0438 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0434\u0436\u043e\u0439\u0441\u0442\u0438\u043a\u0430 \u0438 \u0438\u043d\u0434\u0435\u043a\u0441 \u043d\u0430\u0436\u0430\u0442\u043e\u0439\/\u043e\u0442\u0436\u0430\u0442\u043e\u0439 \u043a\u043d\u043e\u043f\u043a\u0438.<\/p>\n<pre><code>if (event.type == sf::Event::JoystickButtonPressed) {     std::cout &lt;&lt; &quot;joystick button pressed!&quot; &lt;&lt; std::endl;     std::cout &lt;&lt; &quot;joystick id: &quot; &lt;&lt; event.joystickButton.joystickId &lt;&lt; std::endl;     std::cout &lt;&lt; &quot;button: &quot; &lt;&lt; event.joystickButton.button &lt;&lt; std::endl; } <\/code><\/pre>\n<p>  <\/p>\n<h2>\u0421\u043e\u0431\u044b\u0442\u0438\u0435 JoystickMoved<\/h2>\n<p>  \u0421\u043e\u0431\u044b\u0442\u0438\u0435 <code>sf::Event::JoystickMoved<\/code> \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442, \u043a\u043e\u0433\u0434\u0430 \u0441\u0442\u0438\u043a \u0433\u0435\u0439\u043c\u043f\u0430\u0434\u0430 \u0434\u0432\u0438\u0436\u0435\u0442\u0441\u044f.<\/p>\n<p>  \u0421\u0442\u0438\u043a\u0438 \u0434\u0436\u043e\u0439\u0441\u0442\u0438\u043a\u0430, \u043a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u043e, \u043e\u0447\u0435\u043d\u044c \u0447\u0443\u0432\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u044b, \u0438\u043c\u0435\u043d\u043d\u043e \u043f\u043e\u044d\u0442\u043e\u043c\u0443 SFML \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u043f\u043e\u0440\u043e\u0433 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0438\u044f, \u0447\u0442\u043e\u0431\u044b \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u044b\u0445 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u0439 <code>JoystickMoved<\/code>. \u042d\u0442\u043e \u043f\u043e\u0440\u043e\u0433\u043e\u0432\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043c\u043e\u0436\u043d\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0432\u044b\u0437\u043e\u0432\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <code>Window::setJoystickThreshold<\/code>.<\/p>\n<p>  SFML \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 8 \u0441\u0442\u0438\u043a\u043e\u0432 \u0434\u0436\u043e\u0439\u0441\u0442\u0438\u043a\u0430: X, Y, Z, R, U, V, POV X \u0438 POV Y. \u041a\u0430\u043a \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0441 \u0433\u0435\u0439\u043c\u043f\u0430\u0434\u043e\u043c \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u0430 \u044d\u0442\u043e\u0433\u043e \u0433\u0435\u0439\u043c\u043f\u0430\u0434\u0430.<\/p>\n<p>  \u0427\u043b\u0435\u043d \u043a\u043b\u0430\u0441\u0441\u0430, \u0430\u0441\u0441\u043e\u0446\u0438\u0438\u0440\u0443\u0435\u043c\u044b\u0439 \u0441 \u044d\u0442\u0438\u043c \u0441\u043e\u0431\u044b\u0442\u0438\u0435\u043c, \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f <code>event.joystickMove<\/code> \u0438 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0434\u0436\u043e\u0439\u0441\u0442\u0438\u043a\u0430, \u0438\u043c\u044f \u0441\u0442\u0438\u043a\u0430 \u0438 \u0435\u0433\u043e \u0442\u0435\u043a\u0443\u0449\u0443\u044e \u043f\u043e\u0437\u0438\u0446\u0438\u044e (\u0432 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u0435 [-100, 100]).<\/p>\n<pre><code>if (event.type == sf::Event::JoystickMoved) {     if (event.joystickMove.axis == sf::Joystick::X)     {         std::cout &lt;&lt; &quot;X axis moved!&quot; &lt;&lt; std::endl;         std::cout &lt;&lt; &quot;joystick id: &quot; &lt;&lt; event.joystickMove.joystickId &lt;&lt; std::endl;         std::cout &lt;&lt; &quot;new position: &quot; &lt;&lt; event.joystickMove.position &lt;&lt; std::endl;     } } <\/code><\/pre>\n<p>  <\/p>\n<h2>\u0421\u043e\u0431\u044b\u0442\u0438\u044f JoystickConnected \u0438 JoystickDisconnected<\/h2>\n<p>  \u0421\u043e\u0431\u044b\u0442\u0438\u044f <code>sf::Event::JoystickConnected<\/code> \u0438 <code>sf::Event::JoystickDisconnected<\/code> \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044e\u0442, \u043a\u043e\u0433\u0434\u0430 \u0434\u0436\u043e\u0439\u0441\u0442\u0438\u043a \u043f\u0440\u0438\u0441\u043e\u0435\u0434\u0438\u043d\u044f\u0435\u0442\u0441\u044f\/\u043e\u0442\u0441\u043e\u0435\u0434\u0438\u043d\u044f\u0435\u0442\u0441\u044f.<\/p>\n<p>  \u0427\u043b\u0435\u043d \u043a\u043b\u0430\u0441\u0441, \u0430\u0441\u0441\u043e\u0446\u0438\u0438\u0440\u0443\u0435\u043c\u044b\u0439 \u0441 \u044d\u0442\u0438\u043c \u0441\u043e\u0431\u044b\u0442\u0438\u0435\u043c, \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f <code>event.joystickConnect<\/code> \u0438 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u043f\u0440\u0438\u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u043d\u043e\u0433\u043e\/\u043e\u0442\u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u043d\u043e\u0433\u043e \u0434\u0436\u043e\u0439\u0441\u0442\u0438\u043a\u0430.<\/p>\n<pre><code>if (event.type == sf::Event::JoystickConnected)     std::cout &lt;&lt; &quot;joystick connected: &quot; &lt;&lt; event.joystickConnect.joystickId &lt;&lt; std::endl;  if (event.type == sf::Event::JoystickDisconnected)     std::cout &lt;&lt; &quot;joystick disconnected: &quot; &lt;&lt; event.joystickConnect.joystickId &lt;&lt; std::endl; <\/code><\/pre>\n<p>  \u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f: \u0420\u0430\u0431\u043e\u0442\u0430 \u0441 \u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u043e\u0439, \u043c\u044b\u0448\u044c\u044e \u0438 \u0434\u0436\u043e\u0439\u0441\u0442\u0438\u043a\u0430\u043c\u0438.       <\/p>\n<div class=\"clear\"><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habrahabr.ru\/post\/280153\/\"> https:\/\/habrahabr.ru\/post\/280153\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>       <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/bc7\/94a\/b37\/bc794ab377be444f8090426e56ae38bd.png\"\/><\/p>\n<p>  <i>\u041e\u0442 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0447\u0438\u043a\u0430: \u0434\u0430\u043d\u043d\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0434\u0435\u0441\u044f\u0442\u043e\u0439 \u0432 \u0446\u0438\u043a\u043b\u0435 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u043e\u0432 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u0430 \u043f\u043e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0435 SFML. \u041f\u0440\u043e\u0448\u043b\u0443\u044e \u0441\u0442\u0430\u0442\u044c\u044e \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 <a href=\"https:\/\/habrahabr.ru\/post\/279957\/\" title=\"\u041f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f: \u041e\u0442\u043a\u0440\u044b\u0442\u0438\u0435 \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043e\u043a\u043d\u0430\u043c\u0438\">\u0442\u0443\u0442.<\/a> \u0414\u0430\u043d\u043d\u044b\u0439 \u0446\u0438\u043a\u043b \u0441\u0442\u0430\u0442\u0435\u0439 \u0441\u0442\u0430\u0432\u0438\u0442 \u0441\u0432\u043e\u0435\u0439 \u0446\u0435\u043b\u044c\u044e \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043b\u044e\u0434\u044f\u043c, \u043d\u0435 \u0437\u043d\u0430\u044e\u0449\u0438\u043c \u044f\u0437\u044b\u043a \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u0430, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u0441\u044f \u0441 \u044d\u0442\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u043e\u0439. SFML \u2014 \u044d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u0430\u044f \u0438 \u043a\u0440\u043e\u0441\u0441\u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435\u043d\u043d\u0430\u044f \u043c\u0443\u043b\u044c\u0442\u0438\u043c\u0435\u0434\u0438\u0430 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430. SFML \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0438\u0433\u0440 \u0438 \u043f\u0440\u043e\u0447\u0438\u0445 \u043c\u0443\u043b\u044c\u0442\u0438\u043c\u0435\u0434\u0438\u0439\u043d\u044b\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439. \u041e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u0443\u044e \u0441\u0442\u0430\u0442\u044c\u044e \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 <a href=\"http:\/\/www.sfml-dev.org\/tutorials\/2.3\/window-events.php\" title=\"\u041e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f: Events explained\">\u0442\u0443\u0442<\/a>. \u041d\u0430\u0447\u043d\u0435\u043c.<\/i>  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-276945","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/276945","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=276945"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/276945\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=276945"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=276945"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=276945"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}