added slate-border selection style to attack dialog

also, minor warning fix and documentation
This commit is contained in:
Patrick Parker 2006-05-23 17:39:22 +00:00
parent abeb1ccf43
commit cfb19e2583
6 changed files with 11 additions and 8 deletions

View file

@ -17,7 +17,7 @@
class display;
class gamestatus;
class replay;
class combatant;
struct combatant;
#include "global.hpp"

View file

@ -405,9 +405,9 @@ struct save_info_less_time {
}
};
std::vector<save_info> get_saves_list()
std::vector<save_info> get_saves_list(const std::string *dir)
{
const std::string& saves_dir = get_saves_dir();
const std::string& saves_dir = (dir) ? *dir : get_saves_dir();
std::vector<std::string> saves;
get_files_in_dir(saves_dir,&saves);

View file

@ -155,7 +155,7 @@ struct save_info {
};
//function to get a list of available saves.
std::vector<save_info> get_saves_list();
std::vector<save_info> get_saves_list(const std::string *dir = NULL);
//enum WRITE_GAME_MODE { WRITE_SNAPSHOT_ONLY, WRITE_FULL_GAME };

View file

@ -1242,7 +1242,7 @@ bool mouse_handler::attack_enemy(unit_map::iterator attacker, unit_map::iterator
preview_panes.push_back(&attacker_preview);
preview_panes.push_back(&defender_preview);
res = gui::show_dialog(*gui_,NULL,_("Attack Enemy"),
res = gui::show_dialog2(*gui_,NULL,_("Attack Enemy"),
_("Choose weapon:")+std::string("\n"),
gui::OK_CANCEL,&items,&preview_panes,"",NULL,-1,NULL,NULL,-1,-1,
NULL,&buttons);

View file

@ -27,7 +27,7 @@ SDL_Rect screen_area();
bool non_interactive();
//which areas of the screen will be updated when the buffer is flipped?
void update_rect(size_t x, size_t y, size_t w, size_t h);
void update_rect(const SDL_Rect& rect);
void update_whole_screen();

View file

@ -49,7 +49,10 @@ menu::style::~style()
{}
menu::imgsel_style::imgsel_style(const std::string &img_base) : img_base_(img_base),
initialized_(false), load_failed_(false)
{}
{
cell_padding_ = 0; //FIXME: why was it needed in the parent class?
}
menu::imgsel_style::~imgsel_style()
{}
@ -83,7 +86,7 @@ bool menu::imgsel_style::load_images()
thickness_ = minimum(
img_map_["border-top"]->h,
img_map_["border-left"]->w);
cell_padding_ = maximum(cell_padding_, thickness_);
//cell_padding_ = maximum(cell_padding_, thickness_);
selected_rgb_ = 0x000000;
selected_alpha_ = 0.9;