Jump to content

Enable enter keys in confirm dialogs


Go to solution Solved by VegaS™,

Recommended Posts

  • Active+ Member

Hey guys,

is here someone who know how to enable ENTER keys in confirm dialogs? (I mean both ENTER keys - large and small on keyboard). Like you can press ENTER key in select character window to select the character, but for confirm dialogs.

Thanks for answers!

Sincerely,

ReFresh

Edited by ReFresh

I'll be always helpful!  😉

Link to comment
https://metin2.dev/topic/27753-enable-enter-keys-in-confirm-dialogs/
Share on other sites

  • Forum Moderator

Not tested.

uiCommon.py

This is the hidden content, please

 

Edited by VegaS™
  • Metin2 Dev 41
  • Good 4
  • Love 2
  • Love 15
  • Forum Moderator

@Abel(Tiger)That's right, it's useless to re-declare the lambda function since we can call it from the default method, I really forgot it. ?

Edited by VegaS™
  • Love 1
  • Active+ Member

@VegaS™ @Abel(Tiger) Thank you both guys!!

So I did it like that:

Spoiler
def Open(self):
		self.SetCenterPosition()
		self.SetTop()
		self.acceptButton.SetFocus() #ADDED THIS LINE
		self.Show()
        
 def SetAcceptEvent(self, event):
		self.acceptButton.SetEvent(event)
		self.acceptButton.OnIMEReturn = event #ADDED THIS LINE

 

Is that right solution? How did you thought?

I'll be always helpful!  😉

  • Forum Moderator
  • Solution

No, you've to do it like this:

This is the hidden content, please

Edited by VegaS™
  • Metin2 Dev 44
  • Good 5
  • Love 18

Don't use any images from : imgur, turkmmop, freakgamers, inforge, hizliresim... Or your content will be deleted without notice...
Use : https://metin2.download/media/add/

Please use https://metin2.download/ when uploading files smaller than 100MB, otherwise the approval will take longer due to manual upload.

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.