@@ -22,7 +22,7 @@ struct Scene
2222 Scene (sf::RenderWindow& window_)
2323 : window(window_)
2424 , event_manager(window_, false )
25- , root(toVector2f(window_.getSize()) / Item::SCALE )
25+ , root(toVector2f(window_.getSize()) / Conf::GUI_SCALE )
2626 {
2727 initializeEventsCallbacks ();
2828 }
@@ -49,7 +49,7 @@ struct Scene
4949 {
5050 const auto size = window.getSize ();
5151 const sf::Vector2f new_size{to<float >(size.x ), to<float >(size.y )};
52- root.setSize (new_size / Item::SCALE );
52+ root.setSize (new_size / Conf::GUI_SCALE );
5353 window.setView (sf::View (new_size * 0 .5f , new_size));
5454 onSizeChange ();
5555 }
@@ -73,7 +73,7 @@ struct Scene
7373
7474 void dispatchClick (const sf::Event& e)
7575 {
76- root.defaultOnClick (mouse_position / Item::SCALE , e.mouseButton .button );
76+ root.defaultOnClick (mouse_position / Conf::GUI_SCALE , e.mouseButton .button );
7777 }
7878
7979 void unclick (const sf::Event& e)
@@ -105,7 +105,7 @@ struct Scene
105105
106106 void mouseMove (int32_t x, int32_t y)
107107 {
108- mouse_position = sf::Vector2f (to<float >(x), to<float >(y)) / Item::SCALE ;
108+ mouse_position = sf::Vector2f (to<float >(x), to<float >(y)) / Conf::GUI_SCALE ;
109109 root.defaultOnMouseMove (mouse_position);
110110 }
111111};
0 commit comments