-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
270 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
.../app/src/main/java/org/dolphinemu/dolphinemu/features/settings/model/view/FilePicker.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
package org.dolphinemu.dolphinemu.features.settings.model.view; | ||
|
||
import org.dolphinemu.dolphinemu.features.settings.model.Setting; | ||
import org.dolphinemu.dolphinemu.features.settings.model.StringSetting; | ||
|
||
public final class FilePicker extends SettingsItem | ||
{ | ||
private String mDefaultValue; | ||
private boolean mIsDirectory; | ||
|
||
public FilePicker(String key, String section, int titleId, int descriptionId, | ||
String defaultVault, boolean isDirectory, Setting setting) | ||
{ | ||
super(key, section, setting, titleId, descriptionId); | ||
mDefaultValue = defaultVault; | ||
mIsDirectory = isDirectory; | ||
} | ||
|
||
public boolean getIsDirectory() | ||
{ | ||
return mIsDirectory; | ||
} | ||
|
||
public String getSelectedValue() | ||
{ | ||
StringSetting setting = (StringSetting) getSetting(); | ||
|
||
if (setting == null) | ||
{ | ||
return mDefaultValue; | ||
} | ||
else | ||
{ | ||
return setting.getValue(); | ||
} | ||
} | ||
|
||
@Override | ||
public int getType() | ||
{ | ||
return TYPE_FILE_PICKER; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.