Jump to content

Recommended Posts

  • Active+ Member

i saw this idea somewhere and i thought it's a little too sExYYy for me not to steal it XD

 

ui

 I've made two designs that you can choose from

Spoiler

This is the hidden content, please

This is the hidden content, please

 

 

how to use ?

The class I've created is easy to use & change for beginners

it's very similar to the CheckBox class so to use it, all u need to change ui.CheckBox() -> ui.ToggleSwitch()

and if you have any problems with "ON_UNCKECK"

self.checkBox.SetEvent(ui.__mem_func__(self.SetAllColor), "ON_UNCKECK", False)

 just correct it to

self.checkBox.SetEvent(ui.__mem_func__(self.SetAllColor), "ON_UNCHECK", False)

 

 

gif

V1

giphy.gif

 

V2

.gif

 

Note

   the second version needs a CLIP_MASK or whatever you use for clipping

it has a new class AnimatedTextBox which allows you to cut the text however you want

you can use SetTextInfo to set the TITLE

and SetSubTextInfo to set the text below

 

 

code

Spoiler

This is the hidden content, please

Metin2 Download

 

 

 

Edited by CONTROL
Core X - External 2 Internal
  • Metin2 Dev 129
  • kekw 1
  • Eyes 1
  • Scream 1
  • Good 13
  • muscle 1
  • Love 2
  • Love 50

I don’t know — I think.

 

MetaWork

 

Link to comment
https://metin2.dev/topic/33094-animated-toggle-switch-python/
Share on other sites

On 10/21/2024 at 3:37 PM, m2hosting said:

Please be kind enough to share gratefully.

Hey @m2hosting! Essentially this was all I've changed from the original system.

From:

		if app.ENABLE_REFINE_RENEWAL:
			self.checkBox = ui.CheckBox()
			self.checkBox.SetParent(self)
			self.checkBox.SetPosition(0, 90)
			self.checkBox.SetWindowHorizontalAlignCenter()
			self.checkBox.SetWindowVerticalAlignBottom()
			self.checkBox.SetEvent(ui.__mem_func__(self.AutoRefine), "ON_CHECK", True)
			self.checkBox.SetEvent(ui.__mem_func__(self.AutoRefine), "ON_UNCKECK", False)
			self.checkBox.SetCheckStatus(constInfo.IS_AUTO_REFINE)
			self.checkBox.SetTextInfo("Keep window open.")
			self.checkBox.Show()

To:

		if app.ENABLE_REFINE_RENEWAL:
			self.checkBox = ui.ToggleSwitch()
			self.checkBox.SetParent(self)
			self.checkBox.SetPosition(-55, 70)
			self.checkBox.SetWindowHorizontalAlignCenter()
			self.checkBox.SetWindowVerticalAlignBottom()
			self.checkBox.SetEvent(ui.__mem_func__(self.AutoRefine), "ON_CHECK", True)
			self.checkBox.SetEvent(ui.__mem_func__(self.AutoRefine), "ON_UNCHECK", False)
			self.checkBox.SetCheckStatus(constInfo.IS_AUTO_REFINE)
			self.checkBox.SetTextInfo("Keep window open.", -10, 0)
			self.checkBox.Show()

The ui.CheckBox() -> ui.ToggleSwitch() just how @ CONTROL said, changed position of the switch and added position in front of the text so that it would "detach" from the switch, probably an easier way of doing this, but that's how I did it.

Edited by KronosG
  • Love 1
  • 1 year later...

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.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • 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.