UI tweaks

This commit is contained in:
TheKodeToad 2024-09-01 16:25:22 +01:00
parent f90508cedd
commit 4c937d3660
No known key found for this signature in database
GPG key ID: 5E39D70B4C93C38E
4 changed files with 18 additions and 18 deletions

View file

@ -548,7 +548,7 @@
<property name="minimize_button">0</property> <property name="minimize_button">0</property>
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="moveable">1</property> <property name="moveable">1</property>
<property name="name">name_label</property> <property name="name">installation_name_label</property>
<property name="pane_border">1</property> <property name="pane_border">1</property>
<property name="pane_position"></property> <property name="pane_position"></property>
<property name="pane_size"></property> <property name="pane_size"></property>
@ -675,7 +675,7 @@
<property name="minimize_button">0</property> <property name="minimize_button">0</property>
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="moveable">1</property> <property name="moveable">1</property>
<property name="name">game_directory_label</property> <property name="name">installation_dir_label</property>
<property name="pane_border">1</property> <property name="pane_border">1</property>
<property name="pane_position"></property> <property name="pane_position"></property>
<property name="pane_size"></property> <property name="pane_size"></property>
@ -701,7 +701,7 @@
<property name="proportion">1</property> <property name="proportion">1</property>
<object class="wxBoxSizer" expanded="true"> <object class="wxBoxSizer" expanded="true">
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="name">game_dir_options</property> <property name="name">installation_dir_options</property>
<property name="orient">wxHORIZONTAL</property> <property name="orient">wxHORIZONTAL</property>
<property name="permission">none</property> <property name="permission">none</property>
<object class="sizeritem" expanded="true"> <object class="sizeritem" expanded="true">
@ -745,7 +745,7 @@
<property name="minimize_button">0</property> <property name="minimize_button">0</property>
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="moveable">1</property> <property name="moveable">1</property>
<property name="name">game_data_dir_input</property> <property name="name">installation_dir_input</property>
<property name="pane_border">1</property> <property name="pane_border">1</property>
<property name="pane_position"></property> <property name="pane_position"></property>
<property name="pane_size"></property> <property name="pane_size"></property>
@ -818,7 +818,7 @@
<property name="minimize_button">0</property> <property name="minimize_button">0</property>
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="moveable">1</property> <property name="moveable">1</property>
<property name="name">game_data_dir_browse</property> <property name="name">installation_dir_browse</property>
<property name="pane_border">1</property> <property name="pane_border">1</property>
<property name="pane_position"></property> <property name="pane_position"></property>
<property name="pane_size"></property> <property name="pane_size"></property>
@ -919,7 +919,7 @@
<property name="gripper">0</property> <property name="gripper">0</property>
<property name="hidden">0</property> <property name="hidden">0</property>
<property name="id">wxID_ANY</property> <property name="id">wxID_ANY</property>
<property name="label">&amp;Cancel</property> <property name="label">&amp;Exit</property>
<property name="margins"></property> <property name="margins"></property>
<property name="markup">0</property> <property name="markup">0</property>
<property name="max_size"></property> <property name="max_size"></property>
@ -929,7 +929,7 @@
<property name="minimize_button">0</property> <property name="minimize_button">0</property>
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="moveable">1</property> <property name="moveable">1</property>
<property name="name">cancel</property> <property name="name">exit</property>
<property name="pane_border">1</property> <property name="pane_border">1</property>
<property name="pane_position"></property> <property name="pane_position"></property>
<property name="pane_size"></property> <property name="pane_size"></property>

View file

@ -108,7 +108,7 @@
<flag>wxBOTTOM|wxLEFT|wxRIGHT</flag> <flag>wxBOTTOM|wxLEFT|wxRIGHT</flag>
<border>5</border> <border>5</border>
<option>0</option> <option>0</option>
<object class="wxStaticText" name="name_label"> <object class="wxStaticText" name="installation_name_label">
<label>Name</label> <label>Name</label>
<wrap>-1</wrap> <wrap>-1</wrap>
</object> </object>
@ -126,7 +126,7 @@
<flag>wxALL|wxEXPAND</flag> <flag>wxALL|wxEXPAND</flag>
<border>5</border> <border>5</border>
<option>0</option> <option>0</option>
<object class="wxStaticText" name="game_directory_label"> <object class="wxStaticText" name="installation_dir_label">
<label>Game Directory</label> <label>Game Directory</label>
<wrap>-1</wrap> <wrap>-1</wrap>
</object> </object>
@ -135,13 +135,13 @@
<flag>wxEXPAND</flag> <flag>wxEXPAND</flag>
<border>5</border> <border>5</border>
<option>1</option> <option>1</option>
<object class="wxBoxSizer" name="game_dir_options"> <object class="wxBoxSizer" name="installation_dir_options">
<orient>wxHORIZONTAL</orient> <orient>wxHORIZONTAL</orient>
<object class="sizeritem"> <object class="sizeritem">
<flag>wxALIGN_CENTER_VERTICAL|wxALL</flag> <flag>wxALIGN_CENTER_VERTICAL|wxALL</flag>
<border>5</border> <border>5</border>
<option>1</option> <option>1</option>
<object class="wxTextCtrl" name="game_data_dir_input"> <object class="wxTextCtrl" name="installation_dir_input">
<value></value> <value></value>
<maxlength>0</maxlength> <maxlength>0</maxlength>
</object> </object>
@ -150,7 +150,7 @@
<flag>wxALIGN_CENTER_VERTICAL|wxALL</flag> <flag>wxALIGN_CENTER_VERTICAL|wxALL</flag>
<border>5</border> <border>5</border>
<option>0</option> <option>0</option>
<object class="wxButton" name="game_data_dir_browse"> <object class="wxButton" name="installation_dir_browse">
<label>Browse</label> <label>Browse</label>
<default>0</default> <default>0</default>
<auth_needed>0</auth_needed> <auth_needed>0</auth_needed>

View file

@ -9,8 +9,8 @@ InstallerFrame::InstallerFrame() : InstallerFrame_UI(nullptr) {
name_input->SetHint("FrogLoader"); name_input->SetHint("FrogLoader");
game_data_dir_input->SetHint(_("Use Default")); installation_dir_input->SetHint(_("Use Default"));
game_data_dir_browse->Bind(wxEVT_BUTTON, &InstallerFrame::select_game_data_dir, this); installation_dir_browse->Bind(wxEVT_BUTTON, &InstallerFrame::select_installation_dir, this);
cancel->Bind(wxEVT_BUTTON, [this](wxCommandEvent &) { Close(); }); cancel->Bind(wxEVT_BUTTON, [this](wxCommandEvent &) { Close(); });
install->Bind(wxEVT_BUTTON, &InstallerFrame::perform_install, this); install->Bind(wxEVT_BUTTON, &InstallerFrame::perform_install, this);
@ -25,13 +25,13 @@ void InstallerFrame::select_launcher_data_dir(const wxCommandEvent &) {
launcher_data_dir_input->ChangeValue(dialog.GetPath()); launcher_data_dir_input->ChangeValue(dialog.GetPath());
} }
void InstallerFrame::select_game_data_dir(const wxCommandEvent &) { void InstallerFrame::select_installation_dir(const wxCommandEvent &) {
wxDirDialog dialog(this, _("Select game data directory")); wxDirDialog dialog(this, _("Select game data directory"));
if (dialog.ShowModal() != wxID_OK) if (dialog.ShowModal() != wxID_OK)
return; return;
game_data_dir_input->ChangeValue(dialog.GetPath()); installation_dir_input->ChangeValue(dialog.GetPath());
} }
void InstallerFrame::perform_install(const wxCommandEvent &) { void InstallerFrame::perform_install(const wxCommandEvent &) {
@ -44,7 +44,7 @@ void InstallerFrame::perform_install(const wxCommandEvent &) {
.minecraft_version = "1.21", .minecraft_version = "1.21",
.loader_version = *version, .loader_version = *version,
.installation_name = name_input->GetValue(), .installation_name = name_input->GetValue(),
.installation_dir = game_data_dir_input->GetValue(), .installation_dir = installation_dir_input->GetValue(),
}); });
if (result == InstallerResult::OK) { if (result == InstallerResult::OK) {

View file

@ -11,7 +11,7 @@ public:
private: private:
void select_launcher_data_dir(const wxCommandEvent &); void select_launcher_data_dir(const wxCommandEvent &);
void select_game_data_dir(const wxCommandEvent &); void select_installation_dir(const wxCommandEvent &);
void perform_install(const wxCommandEvent &); void perform_install(const wxCommandEvent &);
}; };