Skip to content

Commit

Permalink
Save minimap export directory in configs
Browse files Browse the repository at this point in the history
  • Loading branch information
Mignari committed May 19, 2020
1 parent ac2dd10 commit 34567ed
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions source/common_windows.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,7 @@ ExportMiniMapWindow::ExportMiniMapWindow(wxWindow* parent, Editor& editor) :
// Output folder
directory_text_field = newd wxTextCtrl(this, wxID_ANY, "", wxDefaultPosition, wxDefaultSize);
directory_text_field->Bind(wxEVT_KEY_UP, &ExportMiniMapWindow::OnDirectoryChanged, this);
directory_text_field->SetValue(wxString(g_settings.getString(Config::MIMIMAP_EXPORT_DIR)));
tmpsizer = newd wxStaticBoxSizer(wxHORIZONTAL, this, "Output Folder");
tmpsizer->Add(directory_text_field, 1, wxALL, 5);
tmpsizer->Add(newd wxButton(this, MAP_WINDOW_FILE_BUTTON, "Browse"), 0, wxALL, 5);
Expand Down Expand Up @@ -542,6 +543,7 @@ void ExportMiniMapWindow::OnClickOK(wxCommandEvent& WXUNUSED(event))
try
{
FileName directory(directory_text_field->GetValue());
g_settings.setString(Config::MIMIMAP_EXPORT_DIR, directory_text_field->GetValue().ToStdString());

switch(floor_options->GetSelection())
{
Expand Down
1 change: 1 addition & 0 deletions source/settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,7 @@ void Settings::IO(IOMode mode)
IntToSave(USE_MEMCACHED_SPRITES, 0);
Int(MINIMAP_UPDATE_DELAY, 333);
Int(MINIMAP_VIEW_BOX, 1);
String(MIMIMAP_EXPORT_DIR, "");

Int(CURSOR_RED, 0);
Int(CURSOR_GREEN, 166);
Expand Down
1 change: 1 addition & 0 deletions source/settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ namespace Config {
MINIMAP_LAYOUT,
MINIMAP_UPDATE_DELAY,
MINIMAP_VIEW_BOX,
MIMIMAP_EXPORT_DIR,
WINDOW_HEIGHT,
WINDOW_WIDTH,
WINDOW_MAXIMIZED,
Expand Down

0 comments on commit 34567ed

Please sign in to comment.