mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 13:06:59 -04:00
CMake file
Update to C++ 11: std::shared_ptr, for each loops Update to wxWidgets 3.0+
This commit is contained in:
@@ -21,7 +21,7 @@ IMPLEMENT_VALUE_EDITOR(Image) {}
|
||||
bool ImageValueEditor::onLeftDClick(const RealPoint&, wxMouseEvent&) {
|
||||
String filename = wxFileSelector(_("Open image file"), settings.default_image_dir, _(""), _(""),
|
||||
_("All images|*.bmp;*.jpg;*.png;*.gif|Windows bitmaps (*.bmp)|*.bmp|JPEG images (*.jpg;*.jpeg)|*.jpg;*.jpeg|PNG images (*.png)|*.png|GIF images (*.gif)|*.gif|TIFF images (*.tif;*.tiff)|*.tif;*.tiff"),
|
||||
wxOPEN, wxGetTopLevelParent(&editor()));
|
||||
wxFD_OPEN, wxGetTopLevelParent(&editor()));
|
||||
if (!filename.empty()) {
|
||||
settings.default_image_dir = wxPathOnly(filename);
|
||||
wxImage image;
|
||||
|
||||
@@ -24,7 +24,7 @@ void SymbolValueEditor::draw(RotatedDC& dc) {
|
||||
SymbolValueViewer::draw(dc);
|
||||
// draw helper text if there are no symbols
|
||||
if (symbols.empty()) {
|
||||
dc.SetFont(wxFont(10,wxSWISS,wxNORMAL,wxNORMAL));
|
||||
dc.SetFont(wxFont(10,wxFONTFAMILY_SWISS,wxFONTSTYLE_NORMAL,wxFONTWEIGHT_NORMAL));
|
||||
dc.SetTextForeground(*wxBLACK);
|
||||
RealSize text_size = dc.GetTextExtent(_("double click to edit symbol"));
|
||||
dc.DrawText(_("double click to edit symbol"), align_in_rect(ALIGN_MIDDLE_CENTER, text_size, style().getInternalRect()));
|
||||
|
||||
@@ -733,7 +733,7 @@ bool TextValueEditor::containsPoint(const RealPoint& pos) const {
|
||||
RealPoint pos2(pos.x * style().getStretch(), pos.y);
|
||||
if (TextValueViewer::containsPoint(pos2)) return true;
|
||||
if (word_lists.empty()) return false;
|
||||
return findWordList(pos);
|
||||
return (bool) findWordList(pos);
|
||||
}
|
||||
RealRect TextValueEditor::boundingBox() const {
|
||||
if (word_lists.empty()) return ValueViewer::boundingBox();
|
||||
|
||||
Reference in New Issue
Block a user