Refactor rendering to use an SFML view for placing the main UI within the overall interface

This commit is contained in:
2017-09-04 14:36:55 -04:00
parent e781653483
commit 9c69e006d8
19 changed files with 264 additions and 289 deletions

View File

@@ -29,10 +29,10 @@ using std::vector;
extern bool party_in_memory;
extern long register_flag;
extern sf::RenderWindow mainPtr;
extern location ul;
extern std::vector<scen_header_type> scen_headers;
extern cUniverse univ;
extern eGameMode overall_mode;
extern sf::View mainView;
rectangle startup_button[6];
@@ -42,8 +42,7 @@ bool handle_startup_press(location the_point) {
std::string scen_name;
bool force_party = false;
the_point.x -= ul.x;
the_point.y -= ul.y;
the_point = mainPtr.mapPixelToCoords(the_point, mainView);
for(short i = 0; i < 5; i++)
if(the_point.in(startup_button[i])) {