mirror of
https://github.com/skyline-emu/skyline.git
synced 2024-11-25 20:46:55 +01:00
Add Preference For Always Showing Game Information
This commit mainly adds a preference for always showing the game information. In addition to a tiny tweak to the contributing guidelines.
This commit is contained in:
parent
11e24620b8
commit
91644255da
@ -32,6 +32,7 @@ This can also be done by using `Ctrl + Alt + L` on Windows, `Ctrl + Shift + Alt
|
|||||||
* Member Variables: `camelCase`
|
* Member Variables: `camelCase`
|
||||||
* Global Variables: `PascalCase`
|
* Global Variables: `PascalCase`
|
||||||
* Functions: `PascalCase`
|
* Functions: `PascalCase`
|
||||||
|
* Template Parameters: `PascalCase`
|
||||||
* Parameters: `camelCase`
|
* Parameters: `camelCase`
|
||||||
* Files and Directories: `snake_case` except for when they correspond to a HOS structure (EG: Services, Kernel Objects)
|
* Files and Directories: `snake_case` except for when they correspond to a HOS structure (EG: Services, Kernel Objects)
|
||||||
|
|
||||||
@ -209,6 +210,7 @@ In addition, try to `constexpr` as much as possible including constructors and f
|
|||||||
* Global Variables: `PascalCase`
|
* Global Variables: `PascalCase`
|
||||||
* Functions: `PascalCase`
|
* Functions: `PascalCase`
|
||||||
* Parameters: `camelCase`
|
* Parameters: `camelCase`
|
||||||
|
* Generics: `PascalCase`
|
||||||
* Files: `PascalCase`
|
* Files: `PascalCase`
|
||||||
* Directories: `camelCase`
|
* Directories: `camelCase`
|
||||||
|
|
||||||
|
@ -230,16 +230,19 @@ class MainActivity : AppCompatActivity(), View.OnClickListener, View.OnLongClick
|
|||||||
|
|
||||||
R.id.app_item_linear, R.id.app_item_grid -> {
|
R.id.app_item_linear, R.id.app_item_grid -> {
|
||||||
val tag = view.tag
|
val tag = view.tag
|
||||||
|
|
||||||
if (tag is AppItem) {
|
if (tag is AppItem) {
|
||||||
|
if (sharedPreferences.getBoolean("select_action", false)) {
|
||||||
|
val dialog = AppDialog(tag)
|
||||||
|
dialog.show(supportFragmentManager, "game")
|
||||||
|
} else {
|
||||||
val intent = Intent(this, EmulationActivity::class.java)
|
val intent = Intent(this, EmulationActivity::class.java)
|
||||||
intent.data = tag.uri
|
intent.data = tag.uri
|
||||||
|
|
||||||
startActivity(intent)
|
startActivity(intent)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This handles long-click interaction with [R.id.app_item_linear] and [R.id.app_item_grid]
|
* This handles long-click interaction with [R.id.app_item_linear] and [R.id.app_item_grid]
|
||||||
@ -248,10 +251,10 @@ class MainActivity : AppCompatActivity(), View.OnClickListener, View.OnLongClick
|
|||||||
when (view?.id) {
|
when (view?.id) {
|
||||||
R.id.app_item_linear, R.id.app_item_grid -> {
|
R.id.app_item_linear, R.id.app_item_grid -> {
|
||||||
val tag = view.tag
|
val tag = view.tag
|
||||||
|
|
||||||
if (tag is AppItem) {
|
if (tag is AppItem) {
|
||||||
val dialog = AppDialog(tag)
|
val dialog = AppDialog(tag)
|
||||||
dialog.show(supportFragmentManager, "game")
|
dialog.show(supportFragmentManager, "game")
|
||||||
|
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
<androidx.recyclerview.widget.RecyclerView
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
android:id="@+id/app_list"
|
android:id="@+id/app_list"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="match_parent"
|
||||||
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
|
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
@ -25,6 +25,10 @@
|
|||||||
<!-- Settings -->
|
<!-- Settings -->
|
||||||
<string name="emulator">Emulator</string>
|
<string name="emulator">Emulator</string>
|
||||||
<string name="search_location">Search Location</string>
|
<string name="search_location">Search Location</string>
|
||||||
|
<string name="layout_type">Game Container Layout</string>
|
||||||
|
<string name="select_action">Always Show Game Information</string>
|
||||||
|
<string name="select_action_desc_on">Game information will be shown on clicking a game</string>
|
||||||
|
<string name="select_action_desc_off">Game information will only be shown on long-clicking a game</string>
|
||||||
<string name="log_level">Log Level</string>
|
<string name="log_level">Log Level</string>
|
||||||
<string name="log_compact">Compact Logs</string>
|
<string name="log_compact">Compact Logs</string>
|
||||||
<string name="log_compact_desc_on">Logs will be displayed in a compact form factor</string>
|
<string name="log_compact_desc_on">Logs will be displayed in a compact form factor</string>
|
||||||
@ -34,10 +38,6 @@
|
|||||||
<string name="handheld_enabled">The system will emulate being in handheld mode</string>
|
<string name="handheld_enabled">The system will emulate being in handheld mode</string>
|
||||||
<string name="docked_enabled">The system will emulate being in docked mode</string>
|
<string name="docked_enabled">The system will emulate being in docked mode</string>
|
||||||
<string name="theme">Theme</string>
|
<string name="theme">Theme</string>
|
||||||
<string name="layout_type">Application Layout</string>
|
|
||||||
<string name="audio">Audio</string>
|
|
||||||
<string name="audren_buffer_size">Audio Buffer Size</string>
|
|
||||||
<string name="audren_buffer_desc">The size of the buffer used to store audio samples for ROMs using audren. A lower value will result in less latency but potentially increased audio stutter depending on the performance of the device</string>
|
|
||||||
<!-- Licenses -->
|
<!-- Licenses -->
|
||||||
<string name="licenses">Licenses</string>
|
<string name="licenses">Licenses</string>
|
||||||
<string name="skyline_license_description">The license of Skyline (LGPLv3 or later)</string>
|
<string name="skyline_license_description">The license of Skyline (LGPLv3 or later)</string>
|
||||||
|
@ -37,6 +37,12 @@
|
|||||||
app:key="layout_type"
|
app:key="layout_type"
|
||||||
app:title="@string/layout_type"
|
app:title="@string/layout_type"
|
||||||
app:useSimpleSummaryProvider="true" />
|
app:useSimpleSummaryProvider="true" />
|
||||||
|
<CheckBoxPreference
|
||||||
|
android:defaultValue="false"
|
||||||
|
android:summaryOff="@string/select_action_desc_off"
|
||||||
|
android:summaryOn="@string/select_action_desc_on"
|
||||||
|
app:key="select_action"
|
||||||
|
app:title="@string/select_action" />
|
||||||
<ListPreference
|
<ListPreference
|
||||||
android:defaultValue="2"
|
android:defaultValue="2"
|
||||||
android:entries="@array/log_level"
|
android:entries="@array/log_level"
|
||||||
@ -61,18 +67,6 @@
|
|||||||
app:key="operation_mode"
|
app:key="operation_mode"
|
||||||
app:title="@string/use_docked" />
|
app:title="@string/use_docked" />
|
||||||
</PreferenceCategory>
|
</PreferenceCategory>
|
||||||
<PreferenceCategory
|
|
||||||
android:key="category_audio"
|
|
||||||
android:title="@string/audio">
|
|
||||||
<SeekBarPreference
|
|
||||||
android:defaultValue="960"
|
|
||||||
android:max="2880"
|
|
||||||
app:key="audren_buffer_size"
|
|
||||||
app:min="320"
|
|
||||||
app:showSeekBarValue="true"
|
|
||||||
app:summary="@string/audren_buffer_desc"
|
|
||||||
app:title="@string/audren_buffer_size" />
|
|
||||||
</PreferenceCategory>
|
|
||||||
<PreferenceCategory
|
<PreferenceCategory
|
||||||
android:key="category_licenses"
|
android:key="category_licenses"
|
||||||
android:title="@string/licenses"
|
android:title="@string/licenses"
|
||||||
|
Loading…
Reference in New Issue
Block a user