Added 'insert symbol' menu for SymbolFonts;

Added scriptable 'enabled' to symbols in symbol font, used instead of scripted filenames. This means changing the tap symbol style now works;
Added localisation for games, stylesheets and symbolfonts;
Warnings from Reader are now shown onIdle;

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@198 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2007-02-07 22:31:21 +00:00
parent b93e5b2ae3
commit 73a2f61e68
36 changed files with 606 additions and 101 deletions
+17 -1
View File
@@ -143,6 +143,20 @@ void DataEditor::doCopy() { if (current_editor) current_ed
void DataEditor::doPaste() { if (current_editor) current_editor->doPaste(); }
void DataEditor::doFormat(int type) { if (current_editor) current_editor->doFormat(type); }
wxMenu* DataEditor::getMenu(int type) const {
if (current_editor) {
return current_editor->getMenu(type);
} else {
return nullptr;
}
}
void DataEditor::onCommand(int id) {
if (current_editor) {
current_editor->onCommand(id);
}
}
// ----------------------------------------------------------------------------- : Mouse events
void DataEditor::onLeftDown(wxMouseEvent& ev) {
@@ -274,7 +288,9 @@ void DataEditor::onContextMenu(wxContextMenuEvent& ev) {
}
void DataEditor::onMenu(wxCommandEvent& ev) {
if (current_editor) {
current_editor->onMenu(ev);
if (!current_editor->onCommand(ev.GetId())) {
ev.Skip();
}
} else {
ev.Skip();
}
+4
View File
@@ -53,6 +53,10 @@ class DataEditor : public CardViewer {
bool canFormat(int type) const;
bool hasFormat(int type) const;
void doFormat (int type);
/// Get a special menu, events should be sent to onCommand
wxMenu* getMenu(int type) const;
/// A menu item from getMenu was selected
void onCommand(int id);
// --------------------------------------------------- : ValueViewers
+3 -1
View File
@@ -282,7 +282,9 @@ void CardListBase::rebuild() {
if (f.second->card_list_align & ALIGN_RIGHT) align = wxLIST_FORMAT_RIGHT;
else if (f.second->card_list_align & ALIGN_CENTER) align = wxLIST_FORMAT_CENTRE;
else align = wxLIST_FORMAT_LEFT;
InsertColumn((long)column_fields.size(), capitalize(f.second->card_list_name), align, cs.width);
InsertColumn((long)column_fields.size(),
tr(*set->game, f.second->card_list_name, capitalize(f.second->card_list_name)),
align, cs.width);
column_fields.push_back(f.second);
}
// find field that determines color
+2 -2
View File
@@ -75,7 +75,7 @@ void CardListColumnSelectDialog::initList() {
// Init items
Color window_color = wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW);
FOR_EACH(c, columns) {
list->Append(capitalize(c.field->card_list_name));
list->Append(tr(*game, c.field->card_list_name, capitalize(c.field->card_list_name)));
// check
int i = list->GetCount() - 1;
list->Check(i, c.settings.visible);
@@ -88,7 +88,7 @@ void CardListColumnSelectDialog::initList() {
void CardListColumnSelectDialog::refreshItem(int i) {
list->Check (i, columns[i].settings.visible);
list->SetString(i, capitalize(columns[i].field->card_list_name));
list->SetString(i, tr(*game, columns[i].field->card_list_name, capitalize(columns[i].field->card_list_name)) );
}
// ----------------------------------------------------------------------------- : Events
+3 -1
View File
@@ -38,7 +38,9 @@ void NativeLookEditor::drawViewer(RotatedDC& dc, ValueViewer& v) {
dc.DrawRectangle(s.getRect().grow(1));
// draw label
dc.SetFont(*wxNORMAL_FONT);
dc.DrawText(capitalize_sentence(s.fieldP->name), RealPoint(margin_left, s.top + 1));
// TODO : tr using stylesheet or using game?
dc.DrawText(tr(*set->game, s.fieldP->name, capitalize_sentence(s.fieldP->name)),
RealPoint(margin_left, s.top + 1));
// draw 3D border
draw_control_border(this, dc.getDC(), RealRect(s.left - 1, s.top - 1, s.width + 2, s.height + 2));
// draw viewer