Some style tweaks
This commit is contained in:
@@ -60,7 +60,7 @@ extern location spell_targets[8];
|
||||
extern std::shared_ptr<cScrollbar> text_sbar,item_sbar,shop_sbar;
|
||||
extern std::shared_ptr<cButton> done_btn, help_btn;
|
||||
extern sf::Texture bg_gworld;
|
||||
extern rectangle const sbar_rect,item_sbar_rect,shop_sbar_rect;
|
||||
extern const rectangle sbar_rect,item_sbar_rect,shop_sbar_rect;
|
||||
extern rectangle startup_top;
|
||||
extern rectangle talk_area_rect, word_place_rect;
|
||||
extern location store_anim_ul;
|
||||
@@ -202,7 +202,7 @@ sf::FloatRect compute_viewport(const sf::RenderWindow& mainPtr, int mode, float
|
||||
|
||||
// Buffer in pixels between ui edge and window edge. There seem to be
|
||||
// implicit (builtin) buffers the top and bottom of the UI so this is just for the sides.
|
||||
int const extra_horizontal_buffer { 7 };
|
||||
const int extra_horizontal_buffer { 7 };
|
||||
|
||||
// Left and top: where the viewport is.
|
||||
// Left and top seem to be in terms *target* dimensions,
|
||||
|
@@ -49,7 +49,7 @@ bool is_nature(short i, short j, unsigned short ground_t);
|
||||
void put_dialog_graphic(short graphic_num,short spec_g,rectangle draw_rect);
|
||||
void draw_startup_stats();
|
||||
void draw_trim(short q,short r,short which_trim,ter_num_t ground_ter);
|
||||
sf::FloatRect compute_viewport (sf::RenderWindow const &, int mode, float ui_scale, float width, float height);
|
||||
sf::FloatRect compute_viewport(const sf::RenderWindow&, int mode, float ui_scale, float width, float height);
|
||||
|
||||
void draw_startup_anim(bool advance);
|
||||
|
||||
|
@@ -46,9 +46,9 @@ bool party_in_memory = false;
|
||||
std::shared_ptr<cScrollbar> text_sbar, item_sbar, shop_sbar;
|
||||
std::shared_ptr<cButton> done_btn, help_btn;
|
||||
// TODO: move these 3 to boe.ui.cpp ?
|
||||
extern rectangle const sbar_rect = {285,560,423,576};
|
||||
extern rectangle const shop_sbar_rect = {69,272,359,288};
|
||||
extern rectangle const item_sbar_rect = {148,560,255,576};
|
||||
extern const rectangle sbar_rect = {285,560,423,576};
|
||||
extern const rectangle shop_sbar_rect = {69,272,359,288};
|
||||
extern const rectangle item_sbar_rect = {148,560,255,576};
|
||||
bool bgm_on = false,bgm_init = false;
|
||||
location store_anim_ul;
|
||||
cUniverse univ;
|
||||
@@ -147,7 +147,7 @@ int main(int argc, char* argv[]) {
|
||||
}
|
||||
}
|
||||
|
||||
static void init_sbar(std::shared_ptr<cScrollbar>& sbar, std::string const name, rectangle rect, rectangle events_rect, int max, int pgSz, int start = 0) {
|
||||
static void init_sbar(std::shared_ptr<cScrollbar>& sbar, const std::string& name, rectangle rect, rectangle events_rect, int max, int pgSz, int start = 0) {
|
||||
sbar.reset(new cScrollbar(mainPtr));
|
||||
sbar->setBounds(rect);
|
||||
sbar->setMaximum(max);
|
||||
@@ -163,7 +163,7 @@ static void init_sbar(std::shared_ptr<cScrollbar>& sbar, std::string const name,
|
||||
static void init_scrollbars() {
|
||||
|
||||
// Cover entire transcript + scrollbar
|
||||
rectangle const transcript_events_rect {
|
||||
const rectangle transcript_events_rect {
|
||||
win_to_rects[WINRECT_TRANSCRIPT].top,
|
||||
win_to_rects[WINRECT_TRANSCRIPT].left,
|
||||
sbar_rect.bottom,
|
||||
@@ -171,7 +171,7 @@ static void init_scrollbars() {
|
||||
};
|
||||
|
||||
// Cover entire inventory + scrollbar
|
||||
rectangle const inventory_events_rect {
|
||||
const rectangle inventory_events_rect {
|
||||
win_to_rects[WINRECT_INVEN].top,
|
||||
win_to_rects[WINRECT_INVEN].left,
|
||||
item_sbar_rect.bottom,
|
||||
@@ -402,7 +402,7 @@ void redraw_everything() {
|
||||
if(map_visible) draw_map(false);
|
||||
}
|
||||
|
||||
void Mouse_Pressed(sf::Event const & event) {
|
||||
void Mouse_Pressed(const sf::Event& event) {
|
||||
|
||||
// What is this stuff? Why is it here?
|
||||
if(had_text_freeze > 0) {
|
||||
|
@@ -4,7 +4,7 @@
|
||||
int main(int argc, char* argv[]);
|
||||
void update_everything();
|
||||
void redraw_everything();
|
||||
void Mouse_Pressed(sf::Event const &);
|
||||
void Mouse_Pressed(const sf::Event&);
|
||||
void close_program();
|
||||
void change_cursor(location where_curs);
|
||||
void set_up_apple_events(int argc, char* argv[]);
|
||||
@@ -18,6 +18,6 @@ void plop_fancy_startup();
|
||||
void update_terrain_animation();
|
||||
void update_startup_animation();
|
||||
void handle_events();
|
||||
void handle_one_event(sf::Event const &);
|
||||
void handle_one_minimap_event(sf::Event const &);
|
||||
void handle_one_event(const sf::Event&);
|
||||
void handle_one_minimap_event(const sf::Event &);
|
||||
|
||||
|
@@ -16,7 +16,7 @@ extern sf::RenderWindow mainPtr;
|
||||
extern cUniverse univ;
|
||||
extern bool party_in_memory;
|
||||
extern eGameMode overall_mode;
|
||||
extern std::unordered_map<std::string, std::shared_ptr<iEventListener>>event_listeners;
|
||||
extern std::unordered_map<std::string, std::shared_ptr<iEventListener>> event_listeners;
|
||||
extern cDrawableManager drawable_mgr;
|
||||
|
||||
std::shared_ptr<OpenBoEMenu> menu_ptr;
|
||||
|
Reference in New Issue
Block a user