Changed resource names to be lowercase, and to match the filenames (or what they should be);

Replaced all direct construction of bitmaps and icons using wxBitmap("name") with load_resource_* calls.

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@191 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2007-01-30 18:29:02 +00:00
parent 315af1f14a
commit 51546ca2d8
17 changed files with 243 additions and 221 deletions
+7 -12
View File
@@ -48,26 +48,21 @@ Image generateDisabledImage(const Image& imgIn) {
// ----------------------------------------------------------------------------- : IconMenu
void IconMenu::Append(int id, const String& resource, const String& text, const String& help, int style, wxMenu* submenu) {
// create menu, load icon
wxMenuItem* item = new wxMenuItem(this, id, text, help, style, submenu);
Bitmap bitmap = load_resource_tool_image(resource);
// load bitmap
#ifdef __WXMSW__
// load bitmap
Bitmap bitmap(resource);
// make greyed bitmap
bitmap = bitmap.GetSubBitmap(wxRect(0,0,16,16));
Image disabledImage = generateDisabledImage(bitmap.ConvertToImage());
// add menu item
wxMenuItem* item = new wxMenuItem(this, id, text, help, style, submenu);
item->SetBitmaps(bitmap, bitmap);
item->SetDisabledBitmap(disabledImage);
wxMenu::Append(item);
#else
// load bitmap
Bitmap bitmap = load_resource_image(resource);
// add menu
wxMenuItem* item = new wxMenuItem(this, id, text, help, style, submenu);
item->SetBitmap(bitmap);
wxMenu::Append(item);
#endif
// add menu
wxMenu::Append(item);
}
void IconMenu::Append(int id, const String& text, const String& help) {