-
-
Notifications
You must be signed in to change notification settings - Fork 611
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
1 parent
681b1ff
commit 3ea9d07
Showing
11 changed files
with
293 additions
and
102 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"id":1,"name":"Default","groups":[{"name":"Steam","desc":"","enabled":true,"items":[{"processName":"steam.exe","desc":"","vars":{"BOX64_CEFDISABLEGPU":"1","BOX64_DYNAREC_STRONGMEM":"1"}},{"processName":"steamwebhelper.exe","desc":"","vars":{"BOX64_DYNAREC_STRONGMEM":"1"}}]},{"name":"Flatout","desc":"","enabled":true,"items":[{"processName":"flatout.exe","desc":"","vars":{"BOX64_DYNAREC_BIGBLOCK":"3","BOX64_DYNAREC_CALLRET":"1"}}]}]} |
224 changes: 134 additions & 90 deletions
224
app/src/main/java/com/winlator/Box86_64RCFragment.java
Large diffs are not rendered by default.
Oops, something went wrong.
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
56 changes: 56 additions & 0 deletions
56
app/src/main/java/com/winlator/contentdialog/ImportGroupDialog.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,56 @@ | ||
package com.winlator.contentdialog; | ||
|
||
import android.view.View; | ||
import android.widget.AdapterView; | ||
import android.widget.ArrayAdapter; | ||
import android.widget.ListView; | ||
import android.widget.Spinner; | ||
|
||
import com.winlator.R; | ||
import com.winlator.box86_64.rc.RCFile; | ||
import com.winlator.box86_64.rc.RCGroup; | ||
import com.winlator.box86_64.rc.RCManager; | ||
import com.winlator.core.Callback; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
public class ImportGroupDialog extends ContentDialog { | ||
public ImportGroupDialog(View anchor, RCManager manager, Callback<RCGroup> callback) { | ||
super(anchor.getContext(), R.layout.box86_64_rc_groups_dialog); | ||
setIcon(R.drawable.icon_settings); | ||
setTitle(anchor.getContext().getString(R.string.import_group)); | ||
|
||
final Spinner sProfile = findViewById(R.id.SProfile); | ||
final ListView lvGroup = findViewById(R.id.LVGroup); | ||
|
||
findViewById(R.id.BTConfirm).setVisibility(View.GONE); | ||
|
||
List<RCFile> rcfiles = manager.getRCFiles(); | ||
List<String> rcfilesName = new ArrayList<>(); | ||
for (RCFile rcfile : rcfiles) | ||
rcfilesName.add(rcfile.getName()); | ||
sProfile.setAdapter(new ArrayAdapter<>(anchor.getContext(), android.R.layout.simple_spinner_dropdown_item, rcfilesName)); | ||
sProfile.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() { | ||
@Override | ||
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) { | ||
List<RCGroup> groups = rcfiles.get(position).getGroups(); | ||
List<String> groupsName = new ArrayList<>(); | ||
for (RCGroup group : groups) | ||
groupsName.add(group.getGroupName()); | ||
lvGroup.setAdapter(new ArrayAdapter<>(anchor.getContext(), android.R.layout.simple_list_item_1, groupsName)); | ||
lvGroup.setOnItemClickListener((parent1, view1, position1, id1) -> { | ||
RCGroup group = RCGroup.copy(groups.get(position1)); | ||
callback.call(group); | ||
dismiss(); | ||
}); | ||
} | ||
|
||
@Override | ||
public void onNothingSelected(AdapterView<?> parent) { | ||
|
||
} | ||
}); | ||
sProfile.setSelection(0, false); | ||
} | ||
} |
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,22 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:layout_width="300dp" | ||
android:layout_height="200dp" | ||
android:orientation="vertical"> | ||
|
||
<TextView | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:text="@string/profile" /> | ||
|
||
<Spinner | ||
android:id="@+id/SProfile" | ||
style="@style/ComboBox" | ||
android:layout_width="match_parent" /> | ||
|
||
<ListView | ||
android:id="@+id/LVGroup" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
android:layout_marginTop="5dp" /> | ||
</LinearLayout> |
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