@@ -137,69 +137,79 @@ fun AdvancedSettingsScreen(
137137 Scaffold (
138138 modifier = Modifier
139139 .nestedScroll(topBarScrollBehavior.nestedScrollConnection)
140- .then(modifier), topBar = {
140+ .then(modifier),
141+ topBar = {
141142 val titlePath = path.replace(" @@" , " / " ).removePrefix(" / " )
142- LargeTopAppBar (title = {
143- if (isSearching) {
144- BasicTextField (
145- value = searchQuery,
146- onValueChange = { searchQuery = it },
147- modifier = Modifier
148- .fillMaxWidth()
149- .padding(horizontal = 8 .dp),
150- singleLine = true ,
151- textStyle = TextStyle (
152- color = MaterialTheme .colorScheme.onSurface, fontSize = 20 .sp
153- ),
154- decorationBox = { innerTextField ->
155- Box (
156- modifier = Modifier
157- .fillMaxWidth()
158- .background(
159- MaterialTheme .colorScheme.surfaceVariant,
160- shape = RoundedCornerShape (8 .dp)
161- )
162- .padding(8 .dp)
163- ) {
164- if (searchQuery.isEmpty()) {
165- Text (
166- text = stringResource(R .string.search_settings),
167- color = MaterialTheme .colorScheme.onSurfaceVariant
168- )
143+ LargeTopAppBar (
144+ title = {
145+ if (isSearching) {
146+ BasicTextField (
147+ value = searchQuery,
148+ onValueChange = { searchQuery = it },
149+ modifier = Modifier
150+ .fillMaxWidth()
151+ .padding(horizontal = 8 .dp),
152+ singleLine = true ,
153+ textStyle = TextStyle (
154+ color = MaterialTheme .colorScheme.onSurface, fontSize = 20 .sp
155+ ),
156+ decorationBox = { innerTextField ->
157+ Box (
158+ modifier = Modifier
159+ .fillMaxWidth()
160+ .background(
161+ MaterialTheme .colorScheme.surfaceVariant,
162+ shape = RoundedCornerShape (8 .dp)
163+ )
164+ .padding(8 .dp)
165+ ) {
166+ if (searchQuery.isEmpty()) {
167+ Text (
168+ text = stringResource(R .string.search),
169+ color = MaterialTheme .colorScheme.onSurfaceVariant
170+ )
171+ }
172+ innerTextField()
169173 }
170- innerTextField()
174+ })
175+ } else {
176+ Text (
177+ text = titlePath.ifEmpty { stringResource(R .string.advanced_settings) },
178+ fontWeight = FontWeight .Medium
179+ )
180+ }
181+ },
182+ scrollBehavior = topBarScrollBehavior,
183+ navigationIcon = {
184+ IconButton (
185+ onClick = navigateBack,
186+ modifier = Modifier .padding(0 .dp)
187+ ) {
188+ Icon (
189+ imageVector = Icons .AutoMirrored .Default .KeyboardArrowLeft ,
190+ contentDescription = null
191+ )
192+ }
193+ },
194+ actions = {
195+ IconButton (
196+ onClick = {
197+ if (isSearching) {
198+ searchQuery = " "
199+ isSearching = false
200+ } else {
201+ isSearching = true
171202 }
172- })
173- } else {
174- Text (
175- text = titlePath.ifEmpty { stringResource(R .string.advanced_settings) },
176- fontWeight = FontWeight .Medium
177- )
178- }
179- }, scrollBehavior = topBarScrollBehavior, navigationIcon = {
180- IconButton (onClick = navigateBack) {
181- Icon (
182- imageVector = Icons .AutoMirrored .Default .KeyboardArrowLeft ,
183- contentDescription = null
184- )
185- }
186- }, actions = {
187- IconButton (
188- onClick = {
189- if (isSearching) {
190- searchQuery = " "
191- isSearching = false
192- } else {
193- isSearching = true
194- }
195- }) {
196- Icon (
197- imageVector = if (isSearching) Icons .Default .Close else Icons .Default .Search ,
198- contentDescription = if (isSearching) " Close Search" else " Search"
199- )
200- }
201- })
202- }) { contentPadding ->
203+ }) {
204+ Icon (
205+ imageVector = if (isSearching) Icons .Default .Close else Icons .Default .Search ,
206+ contentDescription = if (isSearching) " Close Search" else " Search"
207+ )
208+ }
209+ },
210+ )
211+ }
212+ ) { contentPadding ->
203213 LazyColumn (
204214 modifier = Modifier
205215 .fillMaxSize()
@@ -667,16 +677,16 @@ fun ControllerSettings(
667677 )
668678 }
669679 ) { contentPadding ->
670- val context = LocalContext .current
680+ // val context = LocalContext.current
671681 val inputBindings = remember {
672682 mutableStateMapOf<Int , Pair <Int , Int >>().apply {
673683 putAll(InputBindingPrefs .loadBindings())
674684 }
675685 }
676686
677- var showDialog by remember { mutableStateOf< Boolean > (false ) }
678- var currentInput by remember { mutableStateOf< Int > (- 1 ) }
679- var currentInputName by remember { mutableStateOf< String > (" " ) }
687+ var showDialog by remember { mutableStateOf(false ) }
688+ var currentInput by remember { mutableStateOf(- 1 ) }
689+ var currentInputName by remember { mutableStateOf(" " ) }
680690 val requester = remember { FocusRequester () }
681691
682692 LazyColumn (
@@ -757,7 +767,7 @@ fun ControllerSettings(
757767 if (showDialog) {
758768 InputBindingDialog (
759769 onReset = {
760- InputBindingPrefs .defaultBindings.forEach { it ->
770+ InputBindingPrefs .defaultBindings.forEach {
761771 if (InputBindingPrefs .rpcsxKeyCodeToString(
762772 it.value.first,
763773 it.value.second
0 commit comments