forked from dolphin-emu/dolphin
-
Notifications
You must be signed in to change notification settings - Fork 0
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
22 changed files
with
517 additions
and
39 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
38 changes: 38 additions & 0 deletions
38
...src/main/java/org/dolphinemu/dolphinemu/features/settings/model/view/ConfirmRunnable.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,38 @@ | ||
package org.dolphinemu.dolphinemu.features.settings.model.view; | ||
|
||
public final class ConfirmRunnable extends SettingsItem | ||
{ | ||
private int mAlertText; | ||
private int mConfirmationText; | ||
private Runnable mRunnable; | ||
|
||
public ConfirmRunnable(int titleId, int descriptionId, int alertText, int confirmationText, | ||
Runnable runnable) | ||
{ | ||
super(null, null, null, titleId, descriptionId); | ||
mAlertText = alertText; | ||
mConfirmationText = confirmationText; | ||
mRunnable = runnable; | ||
} | ||
|
||
public int getAlertText() | ||
{ | ||
return mAlertText; | ||
} | ||
|
||
public int getConfirmationText() | ||
{ | ||
return mConfirmationText; | ||
} | ||
|
||
public Runnable getRunnable() | ||
{ | ||
return mRunnable; | ||
} | ||
|
||
@Override | ||
public int getType() | ||
{ | ||
return TYPE_CONFIRM_RUNNABLE; | ||
} | ||
} |
50 changes: 50 additions & 0 deletions
50
.../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,50 @@ | ||
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 mFile; | ||
private String mDefaultValue; | ||
private int mRequestType; | ||
|
||
public FilePicker(String file, String key, String section, int titleId, int descriptionId, | ||
String defaultVault, int requestType, Setting setting) | ||
{ | ||
super(key, section, setting, titleId, descriptionId); | ||
mFile = file; | ||
mDefaultValue = defaultVault; | ||
mRequestType = requestType; | ||
} | ||
|
||
public String getFile() | ||
{ | ||
return mFile + ".ini"; | ||
} | ||
|
||
public String getSelectedValue() | ||
{ | ||
StringSetting setting = (StringSetting) getSetting(); | ||
|
||
if (setting == null) | ||
{ | ||
return mDefaultValue; | ||
} | ||
else | ||
{ | ||
return setting.getValue(); | ||
} | ||
} | ||
|
||
public int getRequestType() | ||
{ | ||
return mRequestType; | ||
} | ||
|
||
@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
Oops, something went wrong.