Jump to content

Recommended Posts

  • Bot
This is the hidden content, please

Alternative download links →

This is the hidden content, please

 

.png

This is exactly what the name says: a static variable implementation in python.
This was introduced with Messenger Renewal so you will see it under the flag: ENABLE_MESSENGER_RENEWAL

In the archive you will also find the implementation for OutlineToolTipText (see the picture above). 
This is an example on how to use OutlineToolTipText :

## uiscript:
{
	"name"					: "rewind_button", 
	"type"					: "button", 

	"x"						: 215, 
	"y"						: 2, 

	"default_image"			: ROOT_PATH + "rewind_button_default.sub",
	"over_image"			: ROOT_PATH + "rewind_button_over.sub",
	"down_image"			: ROOT_PATH + "rewind_button_down.sub", 

	"outline_tooltip_text"	: uiScriptLocale.SELECT_BOX_TOOLTIP_REWIND_BUTTON,		# 선택 중인 아이템의 위치로 이동할 수 있습니다.
}, 

## root:
self.__exit_button.SetOutlineToolTipText(localeInfo.PRIVATE_SHOP_MAP_EXIT_BUTTON)



Also this is an example on how to use the StaticVariable for another object: (QuestionDialog)

class FriendGuildMemberInfoBar(object):
    def __init__(self, is_family=False):
        super(FriendGuildMemberInfoBar, self).__init__(is_family)

        self.__Initialize()
        self.__LoadWindow()

        ui.StaticVariable.Create(uiCommon.QuestionDialog, self.FAVORITE_QUESTION_DIALOG_KEY)

    def __OnClickFavoriteButton(self):
        member_data = self.GetLinkingMemberData()
        if None == member_data:
            return

        question_dialog = ui.StaticVariable.Get(self.FAVORITE_QUESTION_DIALOG_KEY)
        if None == question_dialog:
            return

        question_dialog.SetCancelEvent(ui.__mem_func__(self.__OnCloseQuestionDialog))
        question_dialog.Open()

        if member_data.IsFavorite():
            question_dialog.SetText(uiScriptLocale.COMMUNITY_DELETE_FAVORITE_QUESTION)
            question_dialog.SetAcceptEvent(ui.__mem_func__(self._OnDeleteFavorite))
        else:
            question_dialog.SetText(uiScriptLocale.COMMUNITY_ADD_FAVORITE_QUESTION)
            question_dialog.SetAcceptEvent(ui.__mem_func__(self._OnAddFavorite))

    def __OnCloseQuestionDialog(self):
        question_dialog = ui.StaticVariable.Get(self.FAVORITE_QUESTION_DIALOG_KEY)
        if None != question_dialog:
            question_dialog.Close()

 

  • Metin2 Dev 8
  • Love 12

english_banner.gif

Link to comment
https://metin2.dev/topic/34525-staticvariable-reversed/
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

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.