mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-11 21:27:01 -04:00
Added icons to window menu and to the tab bar
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@523 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -8,12 +8,15 @@
|
||||
|
||||
#include <gui/value/symbol.hpp>
|
||||
#include <gui/symbol/window.hpp>
|
||||
#include <gui/util.hpp>
|
||||
|
||||
// ----------------------------------------------------------------------------- : SymbolValueEditor
|
||||
|
||||
IMPLEMENT_VALUE_EDITOR(Symbol)
|
||||
, button_down(-2)
|
||||
{}
|
||||
{
|
||||
button_images[0] = Bitmap(load_resource_image(_("edit_symbol")));
|
||||
}
|
||||
|
||||
void SymbolValueEditor::draw(RotatedDC& dc) {
|
||||
SymbolValueViewer::draw(dc);
|
||||
@@ -27,8 +30,8 @@ void SymbolValueEditor::draw(RotatedDC& dc) {
|
||||
if (nativeLook()) {
|
||||
// draw editor buttons
|
||||
dc.SetFont(*wxNORMAL_FONT);
|
||||
drawButton(dc, 0, _("Edit"));
|
||||
drawButton(dc, 1, _("Gallery"));
|
||||
drawButton(dc, 0, _BUTTON_("edit symbol"));
|
||||
//drawButton(dc, 1, _BUTTON_("symbol gallery"));
|
||||
}
|
||||
}
|
||||
void SymbolValueEditor::drawButton(RotatedDC& dc, int button, const String& text) {
|
||||
@@ -49,6 +52,10 @@ void SymbolValueEditor::drawButton(RotatedDC& dc, int button, const String& text
|
||||
// draw text
|
||||
RealSize text_size = dc.GetTextExtent(text);
|
||||
dc.DrawText(text, align_in_rect((Alignment)(ALIGN_BOTTOM | ALIGN_CENTER), text_size, RealRect(x, y, size,size*0.9)));
|
||||
// draw image
|
||||
const Bitmap& bmp = button_images[button];
|
||||
RealSize image_size(bmp.GetWidth(), bmp.GetHeight());
|
||||
dc.DrawBitmap(bmp, align_in_rect(ALIGN_MIDDLE_CENTER, image_size, RealRect(x,y,size,size * 0.8)));
|
||||
}
|
||||
|
||||
int SymbolValueEditor::findButton(const RealPoint& pos) {
|
||||
|
||||
Reference in New Issue
Block a user