mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 04:57:00 -04:00
Option to show/hide editing hints (i.e. word list boxes)
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@727 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -482,6 +482,7 @@ button:
|
||||
browse: &Browse...
|
||||
high quality: &High quality rendering
|
||||
show lines: Show &lines around fields
|
||||
show editing hints: Show boxes and hints for &editing
|
||||
zoom export: Use zoom and rotation settings when e&xporting
|
||||
check now: Check &Now
|
||||
always: Always
|
||||
|
||||
@@ -108,6 +108,7 @@ StyleSheetSettings::StyleSheetSettings()
|
||||
, card_angle (0, true)
|
||||
, card_anti_alias (true, true)
|
||||
, card_borders (true, true)
|
||||
, card_draw_editing (true, true)
|
||||
, card_normal_export(true, true)
|
||||
{}
|
||||
|
||||
@@ -116,6 +117,7 @@ void StyleSheetSettings::useDefault(const StyleSheetSettings& ss) {
|
||||
if (card_angle .isDefault()) card_angle .assignDefault(ss.card_angle);
|
||||
if (card_anti_alias .isDefault()) card_anti_alias .assignDefault(ss.card_anti_alias);
|
||||
if (card_borders .isDefault()) card_borders .assignDefault(ss.card_borders);
|
||||
if (card_draw_editing .isDefault()) card_draw_editing .assignDefault(ss.card_draw_editing);
|
||||
if (card_normal_export.isDefault()) card_normal_export.assignDefault(ss.card_normal_export);
|
||||
}
|
||||
|
||||
@@ -124,6 +126,7 @@ IMPLEMENT_REFLECTION_NO_SCRIPT(StyleSheetSettings) {
|
||||
REFLECT(card_angle);
|
||||
REFLECT(card_anti_alias);
|
||||
REFLECT(card_borders);
|
||||
REFLECT(card_draw_editing);
|
||||
REFLECT(card_normal_export);
|
||||
}
|
||||
|
||||
|
||||
@@ -94,6 +94,7 @@ class StyleSheetSettings : public IntrusivePtrBase<StyleSheetSettings> {
|
||||
Defaultable<int> card_angle;
|
||||
Defaultable<bool> card_anti_alias;
|
||||
Defaultable<bool> card_borders;
|
||||
Defaultable<bool> card_draw_editing;
|
||||
Defaultable<bool> card_normal_export;
|
||||
|
||||
/// Where the settings are the default, use the value from ss
|
||||
|
||||
@@ -42,7 +42,8 @@ bool DataEditor::drawBorders() const {
|
||||
settings.stylesheetSettingsFor(set->stylesheetFor(card)).card_borders();
|
||||
}
|
||||
bool DataEditor::drawEditing() const {
|
||||
return true;
|
||||
return nativeLook() ||
|
||||
settings.stylesheetSettingsFor(set->stylesheetFor(card)).card_draw_editing();
|
||||
}
|
||||
bool DataEditor::drawFocus() const {
|
||||
return FindFocus() == this;
|
||||
|
||||
@@ -49,7 +49,7 @@ class DisplayPreferencesPage : public PreferencesPage {
|
||||
private:
|
||||
DECLARE_EVENT_TABLE();
|
||||
|
||||
wxCheckBox* high_quality, *borders;
|
||||
wxCheckBox* high_quality, *borders, *draw_editing;
|
||||
wxSpinCtrl* zoom;
|
||||
wxCheckBox* non_normal_export;
|
||||
|
||||
@@ -170,12 +170,14 @@ DisplayPreferencesPage::DisplayPreferencesPage(Window* parent)
|
||||
// init controls
|
||||
high_quality = new wxCheckBox(this, wxID_ANY, _BUTTON_("high quality"));
|
||||
borders = new wxCheckBox(this, wxID_ANY, _BUTTON_("show lines"));
|
||||
draw_editing = new wxCheckBox(this, wxID_ANY, _BUTTON_("show editing hints"));
|
||||
zoom = new wxSpinCtrl(this, wxID_ANY);
|
||||
non_normal_export = new wxCheckBox(this, wxID_ANY, _BUTTON_("zoom export"));
|
||||
//wxButton* columns = new wxButton(this, ID_SELECT_COLUMNS, _BUTTON_("select"));
|
||||
// set values
|
||||
high_quality-> SetValue( settings.default_stylesheet_settings.card_anti_alias());
|
||||
borders-> SetValue( settings.default_stylesheet_settings.card_borders());
|
||||
draw_editing-> SetValue( settings.default_stylesheet_settings.card_draw_editing());
|
||||
non_normal_export->SetValue(!settings.default_stylesheet_settings.card_normal_export());
|
||||
zoom->SetRange(1, 1000);
|
||||
zoom-> SetValue(static_cast<int>(settings.default_stylesheet_settings.card_zoom() * 100));
|
||||
@@ -184,6 +186,7 @@ DisplayPreferencesPage::DisplayPreferencesPage(Window* parent)
|
||||
wxSizer* s2 = new wxStaticBoxSizer(wxVERTICAL, this, _LABEL_("card display"));
|
||||
s2->Add(high_quality, 0, wxEXPAND | wxALL, 4);
|
||||
s2->Add(borders, 0, wxEXPAND | wxALL, 4);
|
||||
s2->Add(draw_editing, 0, wxEXPAND | wxALL, 4);
|
||||
wxSizer* s3 = new wxBoxSizer(wxHORIZONTAL);
|
||||
s3->Add(new wxStaticText(this, wxID_ANY, _LABEL_("zoom")), 0, wxALL & ~wxLEFT, 4);
|
||||
s3->Add(zoom);
|
||||
@@ -207,6 +210,7 @@ DisplayPreferencesPage::DisplayPreferencesPage(Window* parent)
|
||||
void DisplayPreferencesPage::store() {
|
||||
settings.default_stylesheet_settings.card_anti_alias = high_quality->GetValue();
|
||||
settings.default_stylesheet_settings.card_borders = borders->GetValue();
|
||||
settings.default_stylesheet_settings.card_draw_editing = draw_editing->GetValue();
|
||||
settings.default_stylesheet_settings.card_zoom = zoom->GetValue() / 100.0;
|
||||
settings.default_stylesheet_settings.card_normal_export = !non_normal_export->GetValue();
|
||||
}
|
||||
|
||||
@@ -1329,9 +1329,11 @@ void TextValueEditor::drawWordListIndicators(RotatedDC& dc, bool redrawing) {
|
||||
if (!redrawing) {
|
||||
wl->behind = dc.GetBackground(RealRect(r.right(), r.top() - 1, 10, r.height + 3));
|
||||
}
|
||||
// draw rectangle around value
|
||||
dc.SetBrush(*wxTRANSPARENT_BRUSH);
|
||||
dc.DrawRectangle(r.move(-1,-1,2,2));
|
||||
if (current || viewer.drawEditing()) {
|
||||
// draw rectangle around value
|
||||
dc.SetBrush(*wxTRANSPARENT_BRUSH);
|
||||
dc.DrawRectangle(r.move(-1,-1,2,2));
|
||||
}
|
||||
}
|
||||
// Draw drop down arrows
|
||||
FOR_EACH_REVERSE(wl, word_lists) {
|
||||
@@ -1350,7 +1352,9 @@ void TextValueEditor::drawWordListIndicators(RotatedDC& dc, bool redrawing) {
|
||||
small = (wl.get() != hovered_words);
|
||||
}
|
||||
if (small) {
|
||||
dc.DrawRectangle(RealRect(r.right(), r.top() - 1, 2, r.height + 2));
|
||||
if (viewer.drawEditing()) {
|
||||
dc.DrawRectangle(RealRect(r.right(), r.top() - 1, 2, r.height + 2));
|
||||
}
|
||||
} else {
|
||||
// draw background of drop down button
|
||||
dc.DrawRectangle(RealRect(r.right(), r.top() - 1, 9, r.height + 2));
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# This file contains the keys expected to be in MSE locales
|
||||
# It was automatically generated by tools/locale/locale.pl
|
||||
# Generated on Thu Sep 20 23:50:25 2007
|
||||
# Generated on Fri Sep 21 14:19:24 2007
|
||||
|
||||
action:
|
||||
add control point: 0
|
||||
@@ -67,6 +67,7 @@ button:
|
||||
select all: 0
|
||||
select none: 0
|
||||
show: 0
|
||||
show editing hints: 0
|
||||
show lines: 0
|
||||
symbol gallery: optional, 0
|
||||
use auto replace: 0
|
||||
|
||||
Reference in New Issue
Block a user