mirror of
https://github.com/loot/libloot.git
synced 2026-07-27 14:16:01 -07:00
Fixed issue #46.
This commit is contained in:
@@ -1007,6 +1007,7 @@ LoadOrderPreview::LoadOrderPreview(wxWindow *parent, const wxString title, const
|
||||
//Set up event handling.
|
||||
Bind(wxEVT_COMMAND_BUTTON_CLICKED, &LoadOrderPreview::OnMoveUp, this, BUTTON_MoveUp);
|
||||
Bind(wxEVT_COMMAND_BUTTON_CLICKED, &LoadOrderPreview::OnMoveDown, this, BUTTON_MoveDown);
|
||||
Bind(wxEVT_COMMAND_LIST_ITEM_SELECTED, &LoadOrderPreview::OnPluginSelect, this, LIST_LoadOrder);
|
||||
|
||||
//Set up layout.
|
||||
wxBoxSizer * bigBox = new wxBoxSizer(wxVERTICAL);
|
||||
@@ -1027,12 +1028,21 @@ LoadOrderPreview::LoadOrderPreview(wxWindow *parent, const wxString title, const
|
||||
if (sizer != NULL)
|
||||
bigBox->Add(sizer, 0, wxEXPAND|wxLEFT|wxBOTTOM|wxRIGHT, 15);
|
||||
|
||||
//Set initial up/down button states.
|
||||
_moveUp->Enable(false);
|
||||
_moveDown->Enable(false);
|
||||
|
||||
//Now set the layout and sizes.
|
||||
SetBackgroundColour(wxColour(255,255,255));
|
||||
SetIcon(wxIconLocation("BOSS.exe"));
|
||||
SetSizerAndFit(bigBox);
|
||||
}
|
||||
|
||||
void LoadOrderPreview::OnPluginSelect(wxListEvent& event) {
|
||||
_moveUp->Enable(true);
|
||||
_moveDown->Enable(true);
|
||||
}
|
||||
|
||||
void LoadOrderPreview::OnMoveUp(wxCommandEvent& event) {
|
||||
BOOST_LOG_TRIVIAL(debug) << "Moving plugin(s) up the load order.";
|
||||
long selected = _loadOrder->GetFirstSelected();
|
||||
|
||||
+5
-4
@@ -37,7 +37,7 @@ public:
|
||||
bool OnInit(); //Load settings, apply logging and language settings, check if BOSS is already running, detect games, set game to last game or to first detected game if auto, create launcher window.
|
||||
private:
|
||||
wxLocale * wxLoc;
|
||||
|
||||
|
||||
YAML::Node _settings;
|
||||
std::vector<boss::Game> _games;
|
||||
boss::Game _game;
|
||||
@@ -46,11 +46,11 @@ private:
|
||||
class Launcher : public wxFrame {
|
||||
public:
|
||||
Launcher(const wxChar *title, YAML::Node& settings, boss::Game& inGame, std::vector<boss::Game>& games);
|
||||
|
||||
|
||||
void OnSortPlugins(wxCommandEvent& event);
|
||||
void OnEditMetadata(wxCommandEvent& event);
|
||||
void OnViewLastReport(wxCommandEvent& event);
|
||||
|
||||
|
||||
void OnOpenSettings(wxCommandEvent& event);
|
||||
void OnGameChange(wxCommandEvent& event);
|
||||
void OnHelp(wxCommandEvent& event);
|
||||
@@ -61,7 +61,7 @@ public:
|
||||
private:
|
||||
wxMenu * GameMenu;
|
||||
wxButton * ViewButton;
|
||||
|
||||
|
||||
boss::Game& _game;
|
||||
YAML::Node& _settings; //BOSS Settings.
|
||||
std::vector<boss::Game>& _games;
|
||||
@@ -71,6 +71,7 @@ class LoadOrderPreview : public wxDialog {
|
||||
public:
|
||||
LoadOrderPreview(wxWindow *parent, const wxString title, const std::list<boss::Plugin>& plugins);
|
||||
|
||||
void OnPluginSelect(wxListEvent& event);
|
||||
void OnMoveUp(wxCommandEvent& event);
|
||||
void OnMoveDown(wxCommandEvent& event);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user