File tree Expand file tree Collapse file tree
src/TSMapEditor/UI/Controls Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -248,7 +248,7 @@ private void ReadLateAttributesForControl(XNAControl control)
248248 {
249249 // This logic should also be enabled for other types in the future,
250250 // but it requires changes in XNAUI
251- if ( child is XNATextBox )
251+ if ( child is XNATextBox textBox )
252252 {
253253 string nextControl = childSection . GetStringValue ( "NextControl" , null ) ;
254254
@@ -257,7 +257,7 @@ private void ReadLateAttributesForControl(XNAControl control)
257257 var otherChild = children . Find ( c => c . Name == nextControl ) ;
258258 if ( otherChild != null )
259259 {
260- ( ( XNATextBox ) child ) . NextControl = otherChild ;
260+ textBox . NextControl = otherChild ;
261261
262262 if ( otherChild is XNATextBox otherAsTb )
263263 {
@@ -272,7 +272,15 @@ private void ReadLateAttributesForControl(XNAControl control)
272272 {
273273 var otherChild = children . Find ( c => c . Name == previousControl ) ;
274274 if ( otherChild != null )
275- ( ( XNATextBox ) child ) . PreviousControl = otherChild ;
275+ textBox . PreviousControl = otherChild ;
276+ }
277+
278+ string enterPressControl = childSection . GetStringValue ( "EnterPressControl" , null ) ;
279+ if ( ! string . IsNullOrWhiteSpace ( enterPressControl ) )
280+ {
281+ var otherChild = children . Find ( c => c . Name == enterPressControl ) ;
282+ if ( otherChild != null )
283+ textBox . EnterPressed += ( s , e ) => otherChild . OnLeftClick ( new InputEventArgs ( ) ) ;
276284 }
277285 }
278286
You can’t perform that action at this time.
0 commit comments