Çözüldü InputMoneyText inputdialog fiyat yazdırma.

  • Konuyu açan Konuyu açan darkbloodly
  • Açılış Tarihi Açılış Tarihi
  • Yanıt Yanıt 5
  • Gösterim Gösterim 99
Bu konu çözüme ulaştırılmıştır. Çözüm için konuya yazılan tüm yorumları okumayı unutmayın. Eğer konudaki yorumlar sorununuzu çözmediyse yeni bir konu açabilirsiniz.
Durum
İçerik kilitlendiği için mesaj gönderimine kapatıldı.

darkbloodly

Üye
Üye
Mesaj
29
Beğeni
2
Puan
40
Ticaret Puanı
0
Merhaba

1735028444045.webp


Ok işareti ile gösterdiğim yerde inputta yazılı olan fiyatın aynısının yazması gerekiyor her sunucuda olduğu gibi ancak bende o kısım yenilenmiyor
InputMoneyText olarak isimlendirilmiş orası ilgili pyleri aşağıya bırakıyorum.

privateshoppriceinputdialog.py:
Genişlet Daralt Kopyala
import uiScriptLocale
import localeInfo
import app

BOARD_WIDTH = 200
BOARD_HEIGHT = 190

PRICE_INPUT_X = 12
PRICE_INPUT_Y = 32
PRICE_INPUT_WIDTH = 200 - 12 * 2
PRICE_INPUT_HEIGHT = 63

MARKET_PRICE_X = 12
MARKET_PRICE_Y = PRICE_INPUT_Y + PRICE_INPUT_HEIGHT + 1
MARKET_PRICE_WIDTH = 200 - 12 * 2
MARKET_PRICE_HEIGHT = 60

window = {
    "name" : "InputDialog",

    "x" : 0,
    "y" : 0,

    "style" : ("movable", "float",),

    "width" : BOARD_WIDTH,
    "height" : BOARD_HEIGHT,

    "children" :
    (
        {
            "name" : "board",
            "type" : "board_with_titlebar",

            "x" : 0,
            "y" : 0,

            "width" : BOARD_WIDTH,
            "height" : BOARD_HEIGHT,

            "title" : localeInfo.PRIVATE_SHOP_INPUT_PRICE_DIALOG_TITLE,

            "children" :
            (
                {
                    "name" : "PriceHintButton",
                    "type" : "button",

                    "x" : BOARD_WIDTH - 50,
                    "y" : 9,
                   
                    "default_image" : "d:/ymir work/ui/pattern/q_mark_01.tga",
                    "over_image" : "d:/ymir work/ui/pattern/q_mark_02.tga",
                    "down_image" : "d:/ymir work/ui/pattern/q_mark_02.tga",
                },

                {
                    "name" : "PriceInputThinboard",
                    "type" : "thinboard_circle",

                    "x" : PRICE_INPUT_X,
                    "y" : PRICE_INPUT_Y,

                    "width" : PRICE_INPUT_WIDTH,
                    "height" : PRICE_INPUT_HEIGHT,

                    "children" : (
                        {
                            "name" : "PriceInputTitle",
                            "type" : "text",

                            "x" : 6,
                            "y" : 4,

                            "text_horizontal_align" : "center",
                            "horizontal_align" : "center",

                            "text" : uiScriptLocale.PREMIUM_PRIVATE_SHOP_PRICE_TITLE,
                        },

                        ## Input Slot Money
                        {
                            "name" : "InputSlot",
                            "type" : "slotbar",

                            "x" : 35 - 12,
                            "y" : 20,

                            "width" : 110,
                            "height" : 18,

                            "children" :
                            (
                                {
                                    "name":"Money_Icon",
                                    "type":"image",

                                    "x":-18,
                                    "y":2,

                                    "image":"d:/ymir work/ui/game/windows/money_icon.sub",
                                },
                                {
                                    "name" : "InputValue",
                                    "type" : "editline",

                                    "x" : 3,
                                    "y" : 3,

                                    "width" : 90,
                                    "height" : 18,

                                    "input_limit" : 12,
                                    "only_currency" : 1,
                                },
                            ),
                        },
                       
                        {
                            "name" : "InputMoneyText",
                            "type" : "text",

                            "x" : 81,
                            "y" : 45,
                            "text" : "30 Yang",
                            "text_horizontal_align" : "left",
                        },
                    ),
                },

                {
                    "name" : "MarketPriceThinboard",
                    "type" : "thinboard_circle",

                    "x" : MARKET_PRICE_X,
                    "y" : MARKET_PRICE_Y,

                    "width" : MARKET_PRICE_WIDTH,
                    "height" : MARKET_PRICE_HEIGHT,

                    "children" : (
                        {
                            "name" : "MarketPriceTitle",
                            "type" : "text",

                            "x" : 0,
                            "y" : 4,

                            "text_horizontal_align" : "center",
                            "horizontal_align" : "center",

                            "text" : uiScriptLocale.PREMIUM_PRIVATE_SHOP_MARKET_PRICE_TITLE,
                        },
                       
                        {
                            "name" : "MarketPriceButton",
                            "type" : "button",

                            "x" : 45,
                            "y" : 7,

                            "horizontal_align" : "center",

                            "default_image" : "d:/ymir work/ui/game/premium_private_shop/mini_empty_button_default.sub",
                            "over_image" : "d:/ymir work/ui/game/premium_private_shop/mini_empty_button_over.sub",
                            "down_image" : "d:/ymir work/ui/game/premium_private_shop/mini_empty_button_down.sub",
                        },

                        {
                            "name" : "MarketChequeValue",
                            "type" : "text",

                            "x" : 0,
                            "y" : 4 + 16,
                            "text" : localeInfo.PREMIUM_PRIVATE_SHOP_MARKET_PRICE_NOT_AVAILABLE,
                            "text_horizontal_align" : "center",
                            "horizontal_align" : "center",
                        },

                        {
                            "name" : "MarketMoneyValue",
                            "type" : "text",

                            "x" :  0,
                            "y" : 4 + 16 + 16,
                            "text" : localeInfo.PREMIUM_PRIVATE_SHOP_MARKET_PRICE_NOT_AVAILABLE,
                            "text_horizontal_align" : "center",
                            "horizontal_align" : "center",
                        },
                    ),
                },

                ## Button
                {
                    "name" : "AcceptButton",
                    "type" : "button",

                    "x" : - 61 - 5 + 30,
                    "y" : BOARD_HEIGHT - 31,

                    "horizontal_align" : "center",

                    "default_image" : "d:/ymir work/ui/public/acceptbutton00.sub",
                    "over_image" : "d:/ymir work/ui/public/acceptbutton01.sub",
                    "down_image" : "d:/ymir work/ui/public/acceptbutton02.sub",
                },
                {
                    "name" : "CancelButton",
                    "type" : "button",

                    "x" : 5 + 30,
                    "y" : BOARD_HEIGHT - 31,
                   
                    "horizontal_align" : "center",

                    "default_image" : "d:/ymir work/ui/public/canclebutton00.sub",
                    "over_image" : "d:/ymir work/ui/public/canclebutton01.sub",
                    "down_image" : "d:/ymir work/ui/public/canclebutton02.sub",
                },
            ),
        },
    ),
}

uicommon.py:
Genişlet Daralt Kopyala
if app.ENABLE_PREMIUM_PRIVATE_SHOP:
    class PrivateShopPriceInputDialog(ui.ScriptWindow):

        def __init__(self):
            ui.ScriptWindow.__init__(self)
            self.toolTip = None
            self.cancelEvent = None
            self.itemVnum = -1
            self.itemCount = 1
            self.inputMarketPrice = False
            self.marketGoldValue = 0
            self.marketChequeValue = 0
            self.__CreateDialog()

        def __del__(self):
            ui.ScriptWindow.__del__(self)

        def __CreateDialog(self):

            pyScrLoader = ui.PythonScriptLoader()
            pyScrLoader.LoadScriptFile(self, "uiscript/privateshoppriceinputdialog.py")

            self.board = self.GetChild("board")
            self.acceptButton = self.GetChild("AcceptButton")
            self.cancelButton = self.GetChild("CancelButton")
            self.inputValue = self.GetChild("InputValue")
            self.inputMoneyText = self.GetChild("InputMoneyText")
            self.marketMoneyText = self.GetChild("MarketMoneyValue")
            self.priceHintButton = self.GetChild("PriceHintButton")
            self.marketPriceButton = self.GetChild("MarketPriceButton")

            self.inputValue.OnIMEUpdate = ui.__mem_func__(self.__OnValueUpdate)

            self.priceHintButton.SetShowToolTipEvent(ui.__mem_func__(self.__OnOverInButton), "PRICE_HINT")
            self.priceHintButton.SetHideToolTipEvent(ui.__mem_func__(self.__OnOverOutButton))

            self.marketPriceButton.SetEvent(ui.__mem_func__(self.__OnClickMarketPriceButton))
            self.marketPriceButton.SetShowToolTipEvent(ui.__mem_func__(self.__OnOverInButton), "AUTO_MARKET_PRICE_INPUT")
            self.marketPriceButton.SetHideToolTipEvent(ui.__mem_func__(self.__OnOverOutButton))
            
            if app.ENABLE_PRIVATE_SHOP_CHEQUE:
                self.inputChequeText = self.GetChild("InputChequeText")
                self.marketChequeText = self.GetChild("MarketChequeValue")
                self.inputChequeValue = self.GetChild("InputValue_Cheque")

                self.inputChequeValue.OnIMEUpdate = ui.__mem_func__(self.__OnValueUpdate)
                self.inputChequeValue.OnMouseLeftButtonDown = ui.__mem_func__(self.__ClickChequeEditLine)
                self.inputChequeValue.SetTabEvent(self.inputValue.SetFocus)
                self.inputValue.OnMouseLeftButtonDown = ui.__mem_func__(self.__ClickValueEditLine)
                self.inputValue.SetTabEvent(self.inputChequeValue.SetFocus)

            self.toolTip = uiToolTip.ToolTip()
            self.toolTip.HideToolTip()

        def Open(self):
            self.inputValue.SetFocus()
            self.__OnValueUpdate()
            self.SetCenterPosition()
            self.SetTop()
            self.Show()

        def Clear(self):
            self.itemVnum = -1
            self.itemCount = 1
            self.marketGoldValue = 0
            self.marketChequeValue = 0

            self.inputValue.SetText("")
            if app.ENABLE_PRIVATE_SHOP_CHEQUE:
                self.inputChequeValue.SetText("")

        def Close(self):
            self.Clear()
            self.cancelEvent()
            self.Hide()

        def SetItemVnum(self, vnum):
            self.itemVnum = vnum

        def GetItemVnum(self):
            return self.itemVnum
            
        def SetItemCount(self, count):
            self.itemCount = count

        def GetItemCount(self):
            return self.itemCount

        def SetTitle(self, name):
            self.board.SetTitleName(name)

        def SetFocus(self):
            self.inputValue.SetFocus()

        def KillFocus(self):
            if self.inputValue.IsFocus():
                self.inputValue.KillFocus()
            
            elif app.ENABLE_PRIVATE_SHOP_CHEQUE and self.inputChequeValue.IsFocus():
                self.inputChequeValue.KillFocus()

        def SetAcceptEvent(self, event):
            self.acceptButton.SetEvent(event)
            self.inputValue.SetReturnEvent(event)

            if app.ENABLE_PRIVATE_SHOP_CHEQUE:
                self.inputChequeValue.SetReturnEvent(event)

        def SetCancelEvent(self, event):
            self.cancelEvent = event

            self.board.SetCloseEvent(self.Close)
            self.cancelButton.SetEvent(self.Close)
            self.inputValue.SetEscapeEvent(self.Close)

            if app.ENABLE_PRIVATE_SHOP_CHEQUE:
                self.inputChequeValue.SetEscapeEvent(self.Close)

        def SetValue(self, value):
            value=str(value)
            self.inputValue.SetText(value)
            self.__OnValueUpdate()
            ime.SetCursorPosition(len(value)+1)       

        def GetText(self):
            if len(self.inputValue.GetText()) <= 0:
                return "0"

            return self.inputValue.GetText()
            
        def SetMarketValue(self, gold, cheque):
            self.marketGoldValue = gold * self.itemCount
            self.marketChequeValue = cheque * self.itemCount

            if gold:
                self.marketMoneyText.SetText(localeInfo.NumberToMoneyString(gold))
                
                if self.inputMarketPrice:
                    self.InputMarketPrice()
            else:
                self.marketMoneyText.SetText(localeInfo.PREMIUM_PRIVATE_SHOP_MARKET_PRICE_NOT_AVAILABLE)
                
            if app.ENABLE_PRIVATE_SHOP_CHEQUE:
                if not gold and not cheque:
                    self.marketChequeText.Hide()
                else:
                    self.marketChequeText.SetText(localeInfo.NumberToMoneyStringNoUnit(cheque) + " " + localeInfo.CHEQUE_SYSTEM_UNIT_WON)
                    self.marketChequeText.Show()

                    if self.inputMarketPrice:
                        self.InputMarketPrice()

        if app.ENABLE_PRIVATE_SHOP_CHEQUE:
            def SetCheque(self, cheque):
                cheque=str(cheque)
                self.inputChequeValue.SetText(cheque)
                self.__OnValueUpdate()
                ime.SetCursorPosition(len(cheque)+1)
            
            def __ClickChequeEditLine(self) :
                self.inputChequeValue.SetFocus()
                if len(self.inputChequeValue.GetText()) <= 0:
                    self.inputChequeValue.SetText("")

            def __ClickValueEditLine(self) :
                self.inputValue.SetFocus()
                if len(self.inputValue.GetText()) <= 0:
                    self.inputValue.SetText("")
                            
            def GetCheque(self):
                if len(self.inputChequeValue.GetText()) <= 0:
                    return "0"

                return self.inputChequeValue.GetText()
                
            def __OnValueUpdate(self):
                if self.inputValue.IsFocus() :
                    ui.EditLine.OnIMEUpdate(self.inputValue)

                    money = self.inputValue.GetText()
                    if len(money) <= 0:
                        money = "0"
                    else:
                        k_pos = money.find('K')
                        if k_pos >= 0:
                            money = money[:k_pos] + '000' * money.count('K')

                    self.inputMoneyText.SetText(localeInfo.NumberToMoneyString(int(money)))

                elif self.inputChequeValue.IsFocus() :
                    ui.EditLine.OnIMEUpdate(self.inputChequeValue)

                    cheque = self.inputChequeValue.GetText()
                    if len(cheque) <= 0:
                        cheque = "0"

                    self.inputChequeText.SetText(localeInfo.NumberToMoneyStringNoUnit(int(cheque)) + " " + localeInfo.CHEQUE_SYSTEM_UNIT_WON)
                else:
                    pass
    
        else:
            def __OnValueUpdate(self):
                ui.EditLine.OnIMEUpdate(self.inputValue)

        def __OnClickMarketPriceButton(self):
            if self.inputMarketPrice:
                self.inputMarketPrice = False

                self.marketPriceButton.SetUpVisual("d:/ymir work/ui/game/premium_private_shop/mini_empty_button_default.sub")
                self.marketPriceButton.SetOverVisual("d:/ymir work/ui/game/premium_private_shop/mini_empty_button_over.sub")
                self.marketPriceButton.SetDownVisual("d:/ymir work/ui/game/premium_private_shop/mini_empty_button_down.sub")
            else:
                self.inputMarketPrice = True

                self.marketPriceButton.SetUpVisual("d:/ymir work/ui/game/premium_private_shop/mini_accept_button_default.sub")
                self.marketPriceButton.SetOverVisual("d:/ymir work/ui/game/premium_private_shop/mini_accept_button_over.sub")
                self.marketPriceButton.SetDownVisual("d:/ymir work/ui/game/premium_private_shop/mini_accept_button_down.sub")

                self.InputMarketPrice()

        def InputMarketPrice(self):
            if self.marketGoldValue > 0:
                self.SetValue(str(self.marketGoldValue))

            if app.ENABLE_PRIVATE_SHOP_CHEQUE:
                if self.marketChequeValue > 0:
                    self.SetCheque(str(self.marketChequeValue))

        def __OnOverInButton(self, button):
            self.toolTip.ClearToolTip()

            if button == "PRICE_HINT":
                self.toolTip.SetThinBoardSize(len(localeInfo.PREMIUM_PRIVATE_SHOP_MARKET_PRICE_HINT_MSG) * 4 + 50, 10)
                self.toolTip.AppendTextLine(localeInfo.PREMIUM_PRIVATE_SHOP_MARKET_PRICE_HINT_MSG, self.toolTip.SPECIAL_TITLE_COLOR)

            elif button == "AUTO_MARKET_PRICE_INPUT":
                self.toolTip.SetThinBoardSize(len(localeInfo.PREMIUM_PRIVATE_SHOP_AUTO_MARKET_PRICE_INPUT_TOOLTIP) * 4 + 50, 10)
                self.toolTip.AppendTextLine(localeInfo.PREMIUM_PRIVATE_SHOP_AUTO_MARKET_PRICE_INPUT_TOOLTIP, self.toolTip.SPECIAL_TITLE_COLOR)

            self.toolTip.ShowToolTip()
                
            
        def __OnOverOutButton(self):
            if 0 != self.toolTip:
                self.toolTip.HideToolTip()

        def OnPressEscapeKey(self):
            self.Close()
            return True
 
Son düzenleme:
Çözüm
hocam inputvalue dediğiniz kısım

Kod:
Genişlet Daralt Kopyala
if app.ENABLE_PREMIUM_PRIVATE_SHOP:
    class PrivateShopPriceInputDialog(ui.ScriptWindow):

        def __init__(self):
            ui.ScriptWindow.__init__(self)
            self.toolTip = None
            self.cancelEvent = None
            self.itemVnum = -1
            self.itemCount = 1
            self.inputMarketPrice = False
            self.marketGoldValue = 0
            self.marketChequeValue = 0
            self.__CreateDialog()

        def __del__(self):
            ui.ScriptWindow.__del__(self)

        def __CreateDialog(self):

            pyScrLoader = ui.PythonScriptLoader()
            pyScrLoader.LoadScriptFile(self, "uiscript/privateshoppriceinputdialog.py")...
Merhaba

20816 eklentisini görüntüle

Ok işareti ile gösterdiğim yerde inputta yazılı olan fiyatın aynısının yazması gerekiyor her sunucuda olduğu gibi ancak bende o kısım yenilenmiyor
InputMoneyText olarak isimlendirilmiş orası ilgili pyleri aşağıya bırakıyorum.

privateshoppriceinputdialog.py:
Genişlet Daralt Kopyala
import uiScriptLocale
import localeInfo
import app

BOARD_WIDTH = 200
BOARD_HEIGHT = 190

PRICE_INPUT_X = 12
PRICE_INPUT_Y = 32
PRICE_INPUT_WIDTH = 200 - 12 * 2
PRICE_INPUT_HEIGHT = 63

MARKET_PRICE_X = 12
MARKET_PRICE_Y = PRICE_INPUT_Y + PRICE_INPUT_HEIGHT + 1
MARKET_PRICE_WIDTH = 200 - 12 * 2
MARKET_PRICE_HEIGHT = 60

window = {
    "name" : "InputDialog",

    "x" : 0,
    "y" : 0,

    "style" : ("movable", "float",),

    "width" : BOARD_WIDTH,
    "height" : BOARD_HEIGHT,

    "children" :
    (
        {
            "name" : "board",
            "type" : "board_with_titlebar",

            "x" : 0,
            "y" : 0,

            "width" : BOARD_WIDTH,
            "height" : BOARD_HEIGHT,

            "title" : localeInfo.PRIVATE_SHOP_INPUT_PRICE_DIALOG_TITLE,

            "children" :
            (
                {
                    "name" : "PriceHintButton",
                    "type" : "button",

                    "x" : BOARD_WIDTH - 50,
                    "y" : 9,
                   
                    "default_image" : "d:/ymir work/ui/pattern/q_mark_01.tga",
                    "over_image" : "d:/ymir work/ui/pattern/q_mark_02.tga",
                    "down_image" : "d:/ymir work/ui/pattern/q_mark_02.tga",
                },

                {
                    "name" : "PriceInputThinboard",
                    "type" : "thinboard_circle",

                    "x" : PRICE_INPUT_X,
                    "y" : PRICE_INPUT_Y,

                    "width" : PRICE_INPUT_WIDTH,
                    "height" : PRICE_INPUT_HEIGHT,

                    "children" : (
                        {
                            "name" : "PriceInputTitle",
                            "type" : "text",

                            "x" : 6,
                            "y" : 4,

                            "text_horizontal_align" : "center",
                            "horizontal_align" : "center",

                            "text" : uiScriptLocale.PREMIUM_PRIVATE_SHOP_PRICE_TITLE,
                        },

                        ## Input Slot Money
                        {
                            "name" : "InputSlot",
                            "type" : "slotbar",

                            "x" : 35 - 12,
                            "y" : 20,

                            "width" : 110,
                            "height" : 18,

                            "children" :
                            (
                                {
                                    "name":"Money_Icon",
                                    "type":"image",

                                    "x":-18,
                                    "y":2,

                                    "image":"d:/ymir work/ui/game/windows/money_icon.sub",
                                },
                                {
                                    "name" : "InputValue",
                                    "type" : "editline",

                                    "x" : 3,
                                    "y" : 3,

                                    "width" : 90,
                                    "height" : 18,

                                    "input_limit" : 12,
                                    "only_currency" : 1,
                                },
                            ),
                        },
                       
                        {
                            "name" : "InputMoneyText",
                            "type" : "text",

                            "x" : 81,
                            "y" : 45,
                            "text" : "30 Yang",
                            "text_horizontal_align" : "left",
                        },
                    ),
                },

                {
                    "name" : "MarketPriceThinboard",
                    "type" : "thinboard_circle",

                    "x" : MARKET_PRICE_X,
                    "y" : MARKET_PRICE_Y,

                    "width" : MARKET_PRICE_WIDTH,
                    "height" : MARKET_PRICE_HEIGHT,

                    "children" : (
                        {
                            "name" : "MarketPriceTitle",
                            "type" : "text",

                            "x" : 0,
                            "y" : 4,

                            "text_horizontal_align" : "center",
                            "horizontal_align" : "center",

                            "text" : uiScriptLocale.PREMIUM_PRIVATE_SHOP_MARKET_PRICE_TITLE,
                        },
                       
                        {
                            "name" : "MarketPriceButton",
                            "type" : "button",

                            "x" : 45,
                            "y" : 7,

                            "horizontal_align" : "center",

                            "default_image" : "d:/ymir work/ui/game/premium_private_shop/mini_empty_button_default.sub",
                            "over_image" : "d:/ymir work/ui/game/premium_private_shop/mini_empty_button_over.sub",
                            "down_image" : "d:/ymir work/ui/game/premium_private_shop/mini_empty_button_down.sub",
                        },

                        {
                            "name" : "MarketChequeValue",
                            "type" : "text",

                            "x" : 0,
                            "y" : 4 + 16,
                            "text" : localeInfo.PREMIUM_PRIVATE_SHOP_MARKET_PRICE_NOT_AVAILABLE,
                            "text_horizontal_align" : "center",
                            "horizontal_align" : "center",
                        },

                        {
                            "name" : "MarketMoneyValue",
                            "type" : "text",

                            "x" :  0,
                            "y" : 4 + 16 + 16,
                            "text" : localeInfo.PREMIUM_PRIVATE_SHOP_MARKET_PRICE_NOT_AVAILABLE,
                            "text_horizontal_align" : "center",
                            "horizontal_align" : "center",
                        },
                    ),
                },

                ## Button
                {
                    "name" : "AcceptButton",
                    "type" : "button",

                    "x" : - 61 - 5 + 30,
                    "y" : BOARD_HEIGHT - 31,

                    "horizontal_align" : "center",

                    "default_image" : "d:/ymir work/ui/public/acceptbutton00.sub",
                    "over_image" : "d:/ymir work/ui/public/acceptbutton01.sub",
                    "down_image" : "d:/ymir work/ui/public/acceptbutton02.sub",
                },
                {
                    "name" : "CancelButton",
                    "type" : "button",

                    "x" : 5 + 30,
                    "y" : BOARD_HEIGHT - 31,
                   
                    "horizontal_align" : "center",

                    "default_image" : "d:/ymir work/ui/public/canclebutton00.sub",
                    "over_image" : "d:/ymir work/ui/public/canclebutton01.sub",
                    "down_image" : "d:/ymir work/ui/public/canclebutton02.sub",
                },
            ),
        },
    ),
}

uicommon.py:
Genişlet Daralt Kopyala
import ui
import localeInfo
import app
import ime
import uiScriptLocale
if app.ENABLE_PREMIUM_PRIVATE_SHOP:
    import player
    import uiToolTip
   
class PopupDialog(ui.ScriptWindow):

    def __init__(self):
        ui.ScriptWindow.__init__(self)
        self.__LoadDialog()
        self.acceptEvent = lambda *arg: None

    def __del__(self):
        ui.ScriptWindow.__del__(self)

    def __LoadDialog(self):
        try:
            PythonScriptLoader = ui.PythonScriptLoader()
            PythonScriptLoader.LoadScriptFile(self, "UIScript/PopupDialog.py")

            self.board = self.GetChild("board")
            self.message = self.GetChild("message")
            self.accceptButton = self.GetChild("accept")
            self.accceptButton.SetEvent(ui.__mem_func__(self.Close))

        except:
            import exception
            exception.Abort("PopupDialog.LoadDialog.BindObject")

    def Open(self):
        self.SetCenterPosition()
        self.SetTop()
        self.Show()

    def Close(self):
        self.Hide()
        self.acceptEvent()

    def Destroy(self):
        self.Close()
        self.ClearDictionary()

    def SetWidth(self, width):
        height = self.GetHeight()
        self.SetSize(width, height)
        self.board.SetSize(width, height)
        self.SetCenterPosition()
        self.UpdateRect()

    def SetText(self, text):
        self.message.SetText(text)

    def SetAcceptEvent(self, event):
        self.acceptEvent = event

    def SetButtonName(self, name):
        self.accceptButton.SetText(name)

    def OnPressEscapeKey(self):
        self.Close()
        return True

    def OnIMEReturn(self):
        self.Close()
        return True

class InputDialog(ui.ScriptWindow):

    def __init__(self):
        ui.ScriptWindow.__init__(self)

        self.__CreateDialog()

    def __del__(self):
        ui.ScriptWindow.__del__(self)

    def __CreateDialog(self):

        pyScrLoader = ui.PythonScriptLoader()
        pyScrLoader.LoadScriptFile(self, "uiscript/inputdialog.py")

        getObject = self.GetChild
        self.board = getObject("Board")
        self.acceptButton = getObject("AcceptButton")
        self.cancelButton = getObject("CancelButton")
        self.inputSlot = getObject("InputSlot")
        self.inputValue = getObject("InputValue")

    def Open(self):
        self.inputValue.SetFocus()
        self.SetCenterPosition()
        self.SetTop()
        self.Show()

    def Close(self):
        self.ClearDictionary()
        self.board = None
        self.acceptButton = None
        self.cancelButton = None
        self.inputSlot = None
        if self.inputValue.IsFocus():
            self.inputValue.KillFocus()
        self.inputValue = None
        self.Hide()

    def SetTitle(self, name):
        self.board.SetTitleName(name)

    def SetNumberMode(self):
        self.inputValue.SetNumberMode()

    def SetSecretMode(self):
        self.inputValue.SetSecret()

    def SetFocus(self):
        self.inputValue.SetFocus()

    def SetMaxLength(self, length):
        width = length * 6 + 10
        self.SetBoardWidth(max(width + 50, 160))
        self.SetSlotWidth(width)
        self.inputValue.SetMax(length)

    def SetSlotWidth(self, width):
        self.inputSlot.SetSize(width, self.inputSlot.GetHeight())
        self.inputValue.SetSize(width, self.inputValue.GetHeight())
        if self.IsRTL():
            self.inputValue.SetPosition(self.inputValue.GetWidth(), 0)

    def SetBoardWidth(self, width):
        self.SetSize(max(width + 50, 160), self.GetHeight())
        self.board.SetSize(max(width + 50, 160), self.GetHeight())
        if self.IsRTL():
            self.board.SetPosition(self.board.GetWidth(), 0)
        self.UpdateRect()

    def SetAcceptEvent(self, event):
        self.acceptButton.SetEvent(event)
        self.inputValue.SetReturnEvent(event)

    def SetCancelEvent(self, event):
        self.board.SetCloseEvent(event)
        self.cancelButton.SetEvent(event)
        self.inputValue.SetEscapeEvent(event)

    def GetText(self):
        return self.inputValue.GetText()

class InputDialogWithDescription(InputDialog):

    def __init__(self):
        ui.ScriptWindow.__init__(self)

        self.__CreateDialog()

    def __del__(self):
        InputDialog.__del__(self)

    def __CreateDialog(self):

        pyScrLoader = ui.PythonScriptLoader()
        if localeInfo.IsARABIC() :
            pyScrLoader.LoadScriptFile(self, uiScriptLocale.LOCALE_UISCRIPT_PATH + "inputdialogwithdescription.py")
        else:
            pyScrLoader.LoadScriptFile(self, "uiscript/inputdialogwithdescription.py")

        try:
            getObject = self.GetChild
            self.board = getObject("Board")
            self.acceptButton = getObject("AcceptButton")
            self.cancelButton = getObject("CancelButton")
            self.inputSlot = getObject("InputSlot")
            self.inputValue = getObject("InputValue")
            self.description = getObject("Description")

        except:
            import exception
            exception.Abort("InputDialogWithDescription.LoadBoardDialog.BindObject")

    def SetDescription(self, text):
        self.description.SetText(text)

class InputDialogWithDescription2(InputDialog):

    def __init__(self):
        ui.ScriptWindow.__init__(self)

        self.__CreateDialog()

    def __del__(self):
        InputDialog.__del__(self)

    def __CreateDialog(self):

        pyScrLoader = ui.PythonScriptLoader()
        pyScrLoader.LoadScriptFile(self, "uiscript/inputdialogwithdescription2.py")

        try:
            getObject = self.GetChild
            self.board = getObject("Board")
            self.acceptButton = getObject("AcceptButton")
            self.cancelButton = getObject("CancelButton")
            self.inputSlot = getObject("InputSlot")
            self.inputValue = getObject("InputValue")
            self.description1 = getObject("Description1")
            self.description2 = getObject("Description2")

        except:
            import exception
            exception.Abort("InputDialogWithDescription.LoadBoardDialog.BindObject")

    def SetDescription1(self, text):
        self.description1.SetText(text)

    def SetDescription2(self, text):
        self.description2.SetText(text)

class QuestionDialog(ui.ScriptWindow):

    def __init__(self):
        ui.ScriptWindow.__init__(self)
        self.__CreateDialog()

    def __del__(self):
        ui.ScriptWindow.__del__(self)

    def __CreateDialog(self):
        pyScrLoader = ui.PythonScriptLoader()
        pyScrLoader.LoadScriptFile(self, "uiscript/questiondialog.py")

        self.board = self.GetChild("board")
        self.textLine = self.GetChild("message")
        self.acceptButton = self.GetChild("accept")
        self.cancelButton = self.GetChild("cancel")

    def Open(self):
        self.SetCenterPosition()
        self.SetTop()
        self.Show()

    def Close(self):
        self.Hide()

    def SetWidth(self, width):
        height = self.GetHeight()
        self.SetSize(width, height)
        self.board.SetSize(width, height)
        self.SetCenterPosition()
        self.UpdateRect()

    def SAFE_SetAcceptEvent(self, event):
        self.acceptButton.SAFE_SetEvent(event)

    def SAFE_SetCancelEvent(self, event):
        self.cancelButton.SAFE_SetEvent(event)

    def SetAcceptEvent(self, event):
        self.acceptButton.SetEvent(event)

    def SetCancelEvent(self, event):
        self.cancelButton.SetEvent(event)

    def SetText(self, text):
        self.textLine.SetText(text)

    def SetAcceptText(self, text):
        self.acceptButton.SetText(text)

    def SetCancelText(self, text):
        self.cancelButton.SetText(text)

    def OnPressEscapeKey(self):
        self.Close()
        return True

class QuestionDialog2(QuestionDialog):

    def __init__(self):
        QuestionDialog.__init__(self)
        self.__CreateDialog()

    def __del__(self):
        QuestionDialog.__del__(self)

    def __CreateDialog(self):
        pyScrLoader = ui.PythonScriptLoader()
        pyScrLoader.LoadScriptFile(self, "uiscript/questiondialog2.py")

        self.board = self.GetChild("board")
        self.textLine1 = self.GetChild("message1")
        self.textLine2 = self.GetChild("message2")
        self.acceptButton = self.GetChild("accept")
        self.cancelButton = self.GetChild("cancel")

    def SetText1(self, text):
        self.textLine1.SetText(text)

    def SetText2(self, text):
        self.textLine2.SetText(text)

class QuestionDialogWithTimeLimit(QuestionDialog2):

    def __init__(self):
        ui.ScriptWindow.__init__(self)

        self.__CreateDialog()
        self.endTime = 0

    def __del__(self):
        QuestionDialog2.__del__(self)

    def __CreateDialog(self):
        pyScrLoader = ui.PythonScriptLoader()
        pyScrLoader.LoadScriptFile(self, "uiscript/questiondialog2.py")

        self.board = self.GetChild("board")
        self.textLine1 = self.GetChild("message1")
        self.textLine2 = self.GetChild("message2")
        self.acceptButton = self.GetChild("accept")
        self.cancelButton = self.GetChild("cancel")

    def Open(self, msg, timeout):
        self.SetCenterPosition()
        self.SetTop()
        self.Show()

        self.SetText1(msg)
        self.endTime = app.GetTime() + timeout

    def OnUpdate(self):
        leftTime = max(0, self.endTime - app.GetTime())
        self.SetText2(localeInfo.UI_LEFT_TIME % (leftTime))

class MoneyInputDialog(ui.ScriptWindow):

    def __init__(self):
        ui.ScriptWindow.__init__(self)

        self.moneyHeaderText = localeInfo.MONEY_INPUT_DIALOG_SELLPRICE
        self.__CreateDialog()
        self.SetMaxLength(9)

    def __del__(self):
        ui.ScriptWindow.__del__(self)

    def __CreateDialog(self):

        pyScrLoader = ui.PythonScriptLoader()
        pyScrLoader.LoadScriptFile(self, "uiscript/moneyinputdialog.py")

        getObject = self.GetChild
        self.board = self.GetChild("board")
        self.acceptButton = getObject("AcceptButton")
        self.cancelButton = getObject("CancelButton")
        self.inputValue = getObject("InputValue")
        self.inputValue.SetNumberMode()
        self.inputValue.OnIMEUpdate = ui.__mem_func__(self.__OnValueUpdate)
        self.moneyText = getObject("MoneyValue")

    def Open(self):
        self.inputValue.SetText("")
        self.inputValue.SetFocus()
        self.__OnValueUpdate()
        self.SetCenterPosition()
        self.SetTop()
        self.Show()

    def Close(self):
        self.ClearDictionary()
        self.board = None
        self.acceptButton = None
        self.cancelButton = None
        if self.inputValue.IsFocus():
            self.inputValue.KillFocus()
        self.inputValue = None
        self.Hide()

    def SetTitle(self, name):
        self.board.SetTitleName(name)

    def SetFocus(self):
        self.inputValue.SetFocus()

    def SetMaxLength(self, length):
        length = min(9, length)
        self.inputValue.SetMax(length)

    def SetMoneyHeaderText(self, text):
        self.moneyHeaderText = text

    def SetAcceptEvent(self, event):
        self.acceptButton.SetEvent(event)
        self.inputValue.SetReturnEvent(event)

    def SetCancelEvent(self, event):
        self.board.SetCloseEvent(event)
        self.cancelButton.SetEvent(event)
        self.inputValue.SetEscapeEvent(event)

    def SetValue(self, value):
        value=str(value)
        self.inputValue.SetText(value)
        self.__OnValueUpdate()
        ime.SetCursorPosition(len(value))


    def GetText(self):
        return self.inputValue.GetText()

    def __OnValueUpdate(self):
        ui.EditLine.OnIMEUpdate(self.inputValue)

        text = self.inputValue.GetText()

        money = 0
        if text and text.isdigit():
            try:
                money = int(text)
            except ValueError:
                money = 199999999

        self.moneyText.SetText(self.moneyHeaderText + localeInfo.NumberToMoneyString(money))

if app.ENABLE_PREMIUM_PRIVATE_SHOP:
    class PrivateShopPriceInputDialog(ui.ScriptWindow):

        def __init__(self):
            ui.ScriptWindow.__init__(self)
            self.toolTip = None
            self.cancelEvent = None
            self.itemVnum = -1
            self.itemCount = 1
            self.inputMarketPrice = False
            self.marketGoldValue = 0
            self.marketChequeValue = 0
            self.__CreateDialog()

        def __del__(self):
            ui.ScriptWindow.__del__(self)

        def __CreateDialog(self):

            pyScrLoader = ui.PythonScriptLoader()
            pyScrLoader.LoadScriptFile(self, "uiscript/privateshoppriceinputdialog.py")

            self.board = self.GetChild("board")
            self.acceptButton = self.GetChild("AcceptButton")
            self.cancelButton = self.GetChild("CancelButton")
            self.inputValue = self.GetChild("InputValue")
            self.inputMoneyText = self.GetChild("InputMoneyText")
            self.marketMoneyText = self.GetChild("MarketMoneyValue")
            self.priceHintButton = self.GetChild("PriceHintButton")
            self.marketPriceButton = self.GetChild("MarketPriceButton")

            self.inputValue.OnIMEUpdate = ui.__mem_func__(self.__OnValueUpdate)

            self.priceHintButton.SetShowToolTipEvent(ui.__mem_func__(self.__OnOverInButton), "PRICE_HINT")
            self.priceHintButton.SetHideToolTipEvent(ui.__mem_func__(self.__OnOverOutButton))

            self.marketPriceButton.SetEvent(ui.__mem_func__(self.__OnClickMarketPriceButton))
            self.marketPriceButton.SetShowToolTipEvent(ui.__mem_func__(self.__OnOverInButton), "AUTO_MARKET_PRICE_INPUT")
            self.marketPriceButton.SetHideToolTipEvent(ui.__mem_func__(self.__OnOverOutButton))
           
            if app.ENABLE_PRIVATE_SHOP_CHEQUE:
                self.inputChequeText = self.GetChild("InputChequeText")
                self.marketChequeText = self.GetChild("MarketChequeValue")
                self.inputChequeValue = self.GetChild("InputValue_Cheque")

                self.inputChequeValue.OnIMEUpdate = ui.__mem_func__(self.__OnValueUpdate)
                self.inputChequeValue.OnMouseLeftButtonDown = ui.__mem_func__(self.__ClickChequeEditLine)
                self.inputChequeValue.SetTabEvent(self.inputValue.SetFocus)
                self.inputValue.OnMouseLeftButtonDown = ui.__mem_func__(self.__ClickValueEditLine)
                self.inputValue.SetTabEvent(self.inputChequeValue.SetFocus)

            self.toolTip = uiToolTip.ToolTip()
            self.toolTip.HideToolTip()

        def Open(self):
            self.inputValue.SetFocus()
            self.__OnValueUpdate()
            self.SetCenterPosition()
            self.SetTop()
            self.Show()

        def Clear(self):
            self.itemVnum = -1
            self.itemCount = 1
            self.marketGoldValue = 0
            self.marketChequeValue = 0

            self.inputValue.SetText("")
            if app.ENABLE_PRIVATE_SHOP_CHEQUE:
                self.inputChequeValue.SetText("")

        def Close(self):
            self.Clear()
            self.cancelEvent()
            self.Hide()

        def SetItemVnum(self, vnum):
            self.itemVnum = vnum

        def GetItemVnum(self):
            return self.itemVnum
           
        def SetItemCount(self, count):
            self.itemCount = count

        def GetItemCount(self):
            return self.itemCount

        def SetTitle(self, name):
            self.board.SetTitleName(name)

        def SetFocus(self):
            self.inputValue.SetFocus()

        def KillFocus(self):
            if self.inputValue.IsFocus():
                self.inputValue.KillFocus()
           
            elif app.ENABLE_PRIVATE_SHOP_CHEQUE and self.inputChequeValue.IsFocus():
                self.inputChequeValue.KillFocus()

        def SetAcceptEvent(self, event):
            self.acceptButton.SetEvent(event)
            self.inputValue.SetReturnEvent(event)

            if app.ENABLE_PRIVATE_SHOP_CHEQUE:
                self.inputChequeValue.SetReturnEvent(event)

        def SetCancelEvent(self, event):
            self.cancelEvent = event

            self.board.SetCloseEvent(self.Close)
            self.cancelButton.SetEvent(self.Close)
            self.inputValue.SetEscapeEvent(self.Close)

            if app.ENABLE_PRIVATE_SHOP_CHEQUE:
                self.inputChequeValue.SetEscapeEvent(self.Close)

        def SetValue(self, value):
            value=str(value)
            self.inputValue.SetText(value)
            self.__OnValueUpdate()
            ime.SetCursorPosition(len(value)+1)      

        def GetText(self):
            if len(self.inputValue.GetText()) <= 0:
                return "0"

            return self.inputValue.GetText()
           
        def SetMarketValue(self, gold, cheque):
            self.marketGoldValue = gold * self.itemCount
            self.marketChequeValue = cheque * self.itemCount

            if gold:
                self.marketMoneyText.SetText(localeInfo.NumberToMoneyString(gold))
               
                if self.inputMarketPrice:
                    self.InputMarketPrice()
            else:
                self.marketMoneyText.SetText(localeInfo.PREMIUM_PRIVATE_SHOP_MARKET_PRICE_NOT_AVAILABLE)
               
            if app.ENABLE_PRIVATE_SHOP_CHEQUE:
                if not gold and not cheque:
                    self.marketChequeText.Hide()
                else:
                    self.marketChequeText.SetText(localeInfo.NumberToMoneyStringNoUnit(cheque) + " " + localeInfo.CHEQUE_SYSTEM_UNIT_WON)
                    self.marketChequeText.Show()

                    if self.inputMarketPrice:
                        self.InputMarketPrice()

        if app.ENABLE_PRIVATE_SHOP_CHEQUE:
            def SetCheque(self, cheque):
                cheque=str(cheque)
                self.inputChequeValue.SetText(cheque)
                self.__OnValueUpdate()
                ime.SetCursorPosition(len(cheque)+1)
           
            def __ClickChequeEditLine(self) :
                self.inputChequeValue.SetFocus()
                if len(self.inputChequeValue.GetText()) <= 0:
                    self.inputChequeValue.SetText("")

            def __ClickValueEditLine(self) :
                self.inputValue.SetFocus()
                if len(self.inputValue.GetText()) <= 0:
                    self.inputValue.SetText("")
                           
            def GetCheque(self):
                if len(self.inputChequeValue.GetText()) <= 0:
                    return "0"

                return self.inputChequeValue.GetText()
               
            def __OnValueUpdate(self):
                if self.inputValue.IsFocus() :
                    ui.EditLine.OnIMEUpdate(self.inputValue)

                    money = self.inputValue.GetText()
                    if len(money) <= 0:
                        money = "0"
                    else:
                        k_pos = money.find('K')
                        if k_pos >= 0:
                            money = money[:k_pos] + '000' * money.count('K')

                    self.inputMoneyText.SetText(localeInfo.NumberToMoneyString(int(money)))

                elif self.inputChequeValue.IsFocus() :
                    ui.EditLine.OnIMEUpdate(self.inputChequeValue)

                    cheque = self.inputChequeValue.GetText()
                    if len(cheque) <= 0:
                        cheque = "0"

                    self.inputChequeText.SetText(localeInfo.NumberToMoneyStringNoUnit(int(cheque)) + " " + localeInfo.CHEQUE_SYSTEM_UNIT_WON)
                else:
                    pass
   
        else:
            def __OnValueUpdate(self):
                ui.EditLine.OnIMEUpdate(self.inputValue)

        def __OnClickMarketPriceButton(self):
            if self.inputMarketPrice:
                self.inputMarketPrice = False

                self.marketPriceButton.SetUpVisual("d:/ymir work/ui/game/premium_private_shop/mini_empty_button_default.sub")
                self.marketPriceButton.SetOverVisual("d:/ymir work/ui/game/premium_private_shop/mini_empty_button_over.sub")
                self.marketPriceButton.SetDownVisual("d:/ymir work/ui/game/premium_private_shop/mini_empty_button_down.sub")
            else:
                self.inputMarketPrice = True

                self.marketPriceButton.SetUpVisual("d:/ymir work/ui/game/premium_private_shop/mini_accept_button_default.sub")
                self.marketPriceButton.SetOverVisual("d:/ymir work/ui/game/premium_private_shop/mini_accept_button_over.sub")
                self.marketPriceButton.SetDownVisual("d:/ymir work/ui/game/premium_private_shop/mini_accept_button_down.sub")

                self.InputMarketPrice()

        def InputMarketPrice(self):
            if self.marketGoldValue > 0:
                self.SetValue(str(self.marketGoldValue))

            if app.ENABLE_PRIVATE_SHOP_CHEQUE:
                if self.marketChequeValue > 0:
                    self.SetCheque(str(self.marketChequeValue))

        def __OnOverInButton(self, button):
            self.toolTip.ClearToolTip()

            if button == "PRICE_HINT":
                self.toolTip.SetThinBoardSize(len(localeInfo.PREMIUM_PRIVATE_SHOP_MARKET_PRICE_HINT_MSG) * 4 + 50, 10)
                self.toolTip.AppendTextLine(localeInfo.PREMIUM_PRIVATE_SHOP_MARKET_PRICE_HINT_MSG, self.toolTip.SPECIAL_TITLE_COLOR)

            elif button == "AUTO_MARKET_PRICE_INPUT":
                self.toolTip.SetThinBoardSize(len(localeInfo.PREMIUM_PRIVATE_SHOP_AUTO_MARKET_PRICE_INPUT_TOOLTIP) * 4 + 50, 10)
                self.toolTip.AppendTextLine(localeInfo.PREMIUM_PRIVATE_SHOP_AUTO_MARKET_PRICE_INPUT_TOOLTIP, self.toolTip.SPECIAL_TITLE_COLOR)

            self.toolTip.ShowToolTip()
               
           
        def __OnOverOutButton(self):
            if 0 != self.toolTip:
                self.toolTip.HideToolTip()

        def OnPressEscapeKey(self):
            self.Close()
            return True
Arat:

Python:
Genişlet Daralt Kopyala
self.inputValue = getObject("InputValue")

Altına ekle

Python:
Genişlet Daralt Kopyala
self.inputText = getObject("InputMoneyText")

Arat:

Python:
Genişlet Daralt Kopyala
   def GetText(self):
        return self.inputValue.GetText()

Altına ekle


Python:
Genişlet Daralt Kopyala
def OnUpdate(self):
  self.inputText.SetText(localeInfo.NumberToMoneyString(int(self.GetText())))

Tab ayarını yaparsın mobilden yapamadım
 
Arat:

Python:
Genişlet Daralt Kopyala
self.inputValue = getObject("InputValue")

Altına ekle

Python:
Genişlet Daralt Kopyala
self.inputText = getObject("InputMoneyText")

Arat:

Python:
Genişlet Daralt Kopyala
   def GetText(self):
        return self.inputValue.GetText()

Altına ekle


Python:
Genişlet Daralt Kopyala
def OnUpdate(self):
  self.inputText.SetText(localeInfo.NumberToMoneyString(int(self.GetText())))

Tab ayarını yaparsın mobilden yapamadım

hocam inputvalue dediğiniz kısım

Kod:
Genişlet Daralt Kopyala
if app.ENABLE_PREMIUM_PRIVATE_SHOP:
    class PrivateShopPriceInputDialog(ui.ScriptWindow):

        def __init__(self):
            ui.ScriptWindow.__init__(self)
            self.toolTip = None
            self.cancelEvent = None
            self.itemVnum = -1
            self.itemCount = 1
            self.inputMarketPrice = False
            self.marketGoldValue = 0
            self.marketChequeValue = 0
            self.__CreateDialog()

        def __del__(self):
            ui.ScriptWindow.__del__(self)

        def __CreateDialog(self):

            pyScrLoader = ui.PythonScriptLoader()
            pyScrLoader.LoadScriptFile(self, "uiscript/privateshoppriceinputdialog.py")

            self.board = self.GetChild("board")
            self.acceptButton = self.GetChild("AcceptButton")
            self.cancelButton = self.GetChild("CancelButton")
            self.inputValue = self.GetChild("InputValue")
            self.inputMoneyText = self.GetChild("InputMoneyText")
            self.marketMoneyText = self.GetChild("MarketMoneyValue")
            self.priceHintButton = self.GetChild("PriceHintButton")
            self.marketPriceButton = self.GetChild("MarketPriceButton")

            self.inputValue.OnIMEUpdate = ui.__mem_func__(self.__OnValueUpdate)

            self.priceHintButton.SetShowToolTipEvent(ui.__mem_func__(self.__OnOverInButton), "PRICE_HINT")
            self.priceHintButton.SetHideToolTipEvent(ui.__mem_func__(self.__OnOverOutButton))

            self.marketPriceButton.SetEvent(ui.__mem_func__(self.__OnClickMarketPriceButton))
            self.marketPriceButton.SetShowToolTipEvent(ui.__mem_func__(self.__OnOverInButton), "AUTO_MARKET_PRICE_INPUT")
            self.marketPriceButton.SetHideToolTipEvent(ui.__mem_func__(self.__OnOverOutButton))
            
            if app.ENABLE_PRIVATE_SHOP_CHEQUE:
                self.inputChequeText = self.GetChild("InputChequeText")
                self.marketChequeText = self.GetChild("MarketChequeValue")
                self.inputChequeValue = self.GetChild("InputValue_Cheque")

                self.inputChequeValue.OnIMEUpdate = ui.__mem_func__(self.__OnValueUpdate)
                self.inputChequeValue.OnMouseLeftButtonDown = ui.__mem_func__(self.__ClickChequeEditLine)
                self.inputChequeValue.SetTabEvent(self.inputValue.SetFocus)
                self.inputValue.OnMouseLeftButtonDown = ui.__mem_func__(self.__ClickValueEditLine)
                self.inputValue.SetTabEvent(self.inputChequeValue.SetFocus)

            self.toolTip = uiToolTip.ToolTip()
            self.toolTip.HideToolTip()

        def Open(self):
            self.inputValue.SetFocus()
            self.__OnValueUpdate()
            self.SetCenterPosition()
            self.SetTop()
            self.Show()

        def Clear(self):
            self.itemVnum = -1
            self.itemCount = 1
            self.marketGoldValue = 0
            self.marketChequeValue = 0

            self.inputValue.SetText("")
            if app.ENABLE_PRIVATE_SHOP_CHEQUE:
                self.inputChequeValue.SetText("")

        def Close(self):
            self.Clear()
            self.cancelEvent()
            self.Hide()

        def SetItemVnum(self, vnum):
            self.itemVnum = vnum

        def GetItemVnum(self):
            return self.itemVnum
            
        def SetItemCount(self, count):
            self.itemCount = count

        def GetItemCount(self):
            return self.itemCount

        def SetTitle(self, name):
            self.board.SetTitleName(name)

        def SetFocus(self):
            self.inputValue.SetFocus()

        def KillFocus(self):
            if self.inputValue.IsFocus():
                self.inputValue.KillFocus()
            
            elif app.ENABLE_PRIVATE_SHOP_CHEQUE and self.inputChequeValue.IsFocus():
                self.inputChequeValue.KillFocus()

        def SetAcceptEvent(self, event):
            self.acceptButton.SetEvent(event)
            self.inputValue.SetReturnEvent(event)

            if app.ENABLE_PRIVATE_SHOP_CHEQUE:
                self.inputChequeValue.SetReturnEvent(event)

        def SetCancelEvent(self, event):
            self.cancelEvent = event

            self.board.SetCloseEvent(self.Close)
            self.cancelButton.SetEvent(self.Close)
            self.inputValue.SetEscapeEvent(self.Close)

            if app.ENABLE_PRIVATE_SHOP_CHEQUE:
                self.inputChequeValue.SetEscapeEvent(self.Close)

        def SetValue(self, value):
            value=str(value)
            self.inputValue.SetText(value)
            self.__OnValueUpdate()
            ime.SetCursorPosition(len(value)+1)       

        def GetText(self):
            if len(self.inputValue.GetText()) <= 0:
                return "0"

            return self.inputValue.GetText()
            
        def SetMarketValue(self, gold, cheque):
            self.marketGoldValue = gold * self.itemCount
            self.marketChequeValue = cheque * self.itemCount

            if gold:
                self.marketMoneyText.SetText(localeInfo.NumberToMoneyString(gold))
                
                if self.inputMarketPrice:
                    self.InputMarketPrice()
            else:
                self.marketMoneyText.SetText(localeInfo.PREMIUM_PRIVATE_SHOP_MARKET_PRICE_NOT_AVAILABLE)
                
            if app.ENABLE_PRIVATE_SHOP_CHEQUE:
                if not gold and not cheque:
                    self.marketChequeText.Hide()
                else:
                    self.marketChequeText.SetText(localeInfo.NumberToMoneyStringNoUnit(cheque) + " " + localeInfo.CHEQUE_SYSTEM_UNIT_WON)
                    self.marketChequeText.Show()

                    if self.inputMarketPrice:
                        self.InputMarketPrice()

        if app.ENABLE_PRIVATE_SHOP_CHEQUE:
            def SetCheque(self, cheque):
                cheque=str(cheque)
                self.inputChequeValue.SetText(cheque)
                self.__OnValueUpdate()
                ime.SetCursorPosition(len(cheque)+1)
            
            def __ClickChequeEditLine(self) :
                self.inputChequeValue.SetFocus()
                if len(self.inputChequeValue.GetText()) <= 0:
                    self.inputChequeValue.SetText("")

            def __ClickValueEditLine(self) :
                self.inputValue.SetFocus()
                if len(self.inputValue.GetText()) <= 0:
                    self.inputValue.SetText("")
                            
            def GetCheque(self):
                if len(self.inputChequeValue.GetText()) <= 0:
                    return "0"

                return self.inputChequeValue.GetText()
                
            def __OnValueUpdate(self):
                if self.inputValue.IsFocus() :
                    ui.EditLine.OnIMEUpdate(self.inputValue)

                    money = self.inputValue.GetText()
                    if len(money) <= 0:
                        money = "0"
                    else:
                        k_pos = money.find('K')
                        if k_pos >= 0:
                            money = money[:k_pos] + '000' * money.count('K')

                    self.inputMoneyText.SetText(localeInfo.NumberToMoneyString(int(money)))

                elif self.inputChequeValue.IsFocus() :
                    ui.EditLine.OnIMEUpdate(self.inputChequeValue)

                    cheque = self.inputChequeValue.GetText()
                    if len(cheque) <= 0:
                        cheque = "0"

                    self.inputChequeText.SetText(localeInfo.NumberToMoneyStringNoUnit(int(cheque)) + " " + localeInfo.CHEQUE_SYSTEM_UNIT_WON)
                else:
                    pass
    
        else:
            def __OnValueUpdate(self):
                ui.EditLine.OnIMEUpdate(self.inputValue)

        def __OnClickMarketPriceButton(self):
            if self.inputMarketPrice:
                self.inputMarketPrice = False

                self.marketPriceButton.SetUpVisual("d:/ymir work/ui/game/premium_private_shop/mini_empty_button_default.sub")
                self.marketPriceButton.SetOverVisual("d:/ymir work/ui/game/premium_private_shop/mini_empty_button_over.sub")
                self.marketPriceButton.SetDownVisual("d:/ymir work/ui/game/premium_private_shop/mini_empty_button_down.sub")
            else:
                self.inputMarketPrice = True

                self.marketPriceButton.SetUpVisual("d:/ymir work/ui/game/premium_private_shop/mini_accept_button_default.sub")
                self.marketPriceButton.SetOverVisual("d:/ymir work/ui/game/premium_private_shop/mini_accept_button_over.sub")
                self.marketPriceButton.SetDownVisual("d:/ymir work/ui/game/premium_private_shop/mini_accept_button_down.sub")

                self.InputMarketPrice()

        def InputMarketPrice(self):
            if self.marketGoldValue > 0:
                self.SetValue(str(self.marketGoldValue))

            if app.ENABLE_PRIVATE_SHOP_CHEQUE:
                if self.marketChequeValue > 0:
                    self.SetCheque(str(self.marketChequeValue))

        def __OnOverInButton(self, button):
            self.toolTip.ClearToolTip()

            if button == "PRICE_HINT":
                self.toolTip.SetThinBoardSize(len(localeInfo.PREMIUM_PRIVATE_SHOP_MARKET_PRICE_HINT_MSG) * 4 + 50, 10)
                self.toolTip.AppendTextLine(localeInfo.PREMIUM_PRIVATE_SHOP_MARKET_PRICE_HINT_MSG, self.toolTip.SPECIAL_TITLE_COLOR)

            elif button == "AUTO_MARKET_PRICE_INPUT":
                self.toolTip.SetThinBoardSize(len(localeInfo.PREMIUM_PRIVATE_SHOP_AUTO_MARKET_PRICE_INPUT_TOOLTIP) * 4 + 50, 10)
                self.toolTip.AppendTextLine(localeInfo.PREMIUM_PRIVATE_SHOP_AUTO_MARKET_PRICE_INPUT_TOOLTIP, self.toolTip.SPECIAL_TITLE_COLOR)

            self.toolTip.ShowToolTip()
                
            
        def __OnOverOutButton(self):
            if 0 != self.toolTip:
                self.toolTip.HideToolTip()

        def OnPressEscapeKey(self):
            self.Close()
            return True

burda olması gerekiyor sanırım çünkü uiscriptte burası için ayrı alan açmış ve burada o yok o yüzden nereye ekleyeceğim tam olarak
 
hocam inputvalue dediğiniz kısım

Kod:
Genişlet Daralt Kopyala
if app.ENABLE_PREMIUM_PRIVATE_SHOP:
    class PrivateShopPriceInputDialog(ui.ScriptWindow):

        def __init__(self):
            ui.ScriptWindow.__init__(self)
            self.toolTip = None
            self.cancelEvent = None
            self.itemVnum = -1
            self.itemCount = 1
            self.inputMarketPrice = False
            self.marketGoldValue = 0
            self.marketChequeValue = 0
            self.__CreateDialog()

        def __del__(self):
            ui.ScriptWindow.__del__(self)

        def __CreateDialog(self):

            pyScrLoader = ui.PythonScriptLoader()
            pyScrLoader.LoadScriptFile(self, "uiscript/privateshoppriceinputdialog.py")

            self.board = self.GetChild("board")
            self.acceptButton = self.GetChild("AcceptButton")
            self.cancelButton = self.GetChild("CancelButton")
            self.inputValue = self.GetChild("InputValue")
            self.inputMoneyText = self.GetChild("InputMoneyText")
            self.marketMoneyText = self.GetChild("MarketMoneyValue")
            self.priceHintButton = self.GetChild("PriceHintButton")
            self.marketPriceButton = self.GetChild("MarketPriceButton")

            self.inputValue.OnIMEUpdate = ui.__mem_func__(self.__OnValueUpdate)

            self.priceHintButton.SetShowToolTipEvent(ui.__mem_func__(self.__OnOverInButton), "PRICE_HINT")
            self.priceHintButton.SetHideToolTipEvent(ui.__mem_func__(self.__OnOverOutButton))

            self.marketPriceButton.SetEvent(ui.__mem_func__(self.__OnClickMarketPriceButton))
            self.marketPriceButton.SetShowToolTipEvent(ui.__mem_func__(self.__OnOverInButton), "AUTO_MARKET_PRICE_INPUT")
            self.marketPriceButton.SetHideToolTipEvent(ui.__mem_func__(self.__OnOverOutButton))
           
            if app.ENABLE_PRIVATE_SHOP_CHEQUE:
                self.inputChequeText = self.GetChild("InputChequeText")
                self.marketChequeText = self.GetChild("MarketChequeValue")
                self.inputChequeValue = self.GetChild("InputValue_Cheque")

                self.inputChequeValue.OnIMEUpdate = ui.__mem_func__(self.__OnValueUpdate)
                self.inputChequeValue.OnMouseLeftButtonDown = ui.__mem_func__(self.__ClickChequeEditLine)
                self.inputChequeValue.SetTabEvent(self.inputValue.SetFocus)
                self.inputValue.OnMouseLeftButtonDown = ui.__mem_func__(self.__ClickValueEditLine)
                self.inputValue.SetTabEvent(self.inputChequeValue.SetFocus)

            self.toolTip = uiToolTip.ToolTip()
            self.toolTip.HideToolTip()

        def Open(self):
            self.inputValue.SetFocus()
            self.__OnValueUpdate()
            self.SetCenterPosition()
            self.SetTop()
            self.Show()

        def Clear(self):
            self.itemVnum = -1
            self.itemCount = 1
            self.marketGoldValue = 0
            self.marketChequeValue = 0

            self.inputValue.SetText("")
            if app.ENABLE_PRIVATE_SHOP_CHEQUE:
                self.inputChequeValue.SetText("")

        def Close(self):
            self.Clear()
            self.cancelEvent()
            self.Hide()

        def SetItemVnum(self, vnum):
            self.itemVnum = vnum

        def GetItemVnum(self):
            return self.itemVnum
           
        def SetItemCount(self, count):
            self.itemCount = count

        def GetItemCount(self):
            return self.itemCount

        def SetTitle(self, name):
            self.board.SetTitleName(name)

        def SetFocus(self):
            self.inputValue.SetFocus()

        def KillFocus(self):
            if self.inputValue.IsFocus():
                self.inputValue.KillFocus()
           
            elif app.ENABLE_PRIVATE_SHOP_CHEQUE and self.inputChequeValue.IsFocus():
                self.inputChequeValue.KillFocus()

        def SetAcceptEvent(self, event):
            self.acceptButton.SetEvent(event)
            self.inputValue.SetReturnEvent(event)

            if app.ENABLE_PRIVATE_SHOP_CHEQUE:
                self.inputChequeValue.SetReturnEvent(event)

        def SetCancelEvent(self, event):
            self.cancelEvent = event

            self.board.SetCloseEvent(self.Close)
            self.cancelButton.SetEvent(self.Close)
            self.inputValue.SetEscapeEvent(self.Close)

            if app.ENABLE_PRIVATE_SHOP_CHEQUE:
                self.inputChequeValue.SetEscapeEvent(self.Close)

        def SetValue(self, value):
            value=str(value)
            self.inputValue.SetText(value)
            self.__OnValueUpdate()
            ime.SetCursorPosition(len(value)+1)      

        def GetText(self):
            if len(self.inputValue.GetText()) <= 0:
                return "0"

            return self.inputValue.GetText()
           
        def SetMarketValue(self, gold, cheque):
            self.marketGoldValue = gold * self.itemCount
            self.marketChequeValue = cheque * self.itemCount

            if gold:
                self.marketMoneyText.SetText(localeInfo.NumberToMoneyString(gold))
               
                if self.inputMarketPrice:
                    self.InputMarketPrice()
            else:
                self.marketMoneyText.SetText(localeInfo.PREMIUM_PRIVATE_SHOP_MARKET_PRICE_NOT_AVAILABLE)
               
            if app.ENABLE_PRIVATE_SHOP_CHEQUE:
                if not gold and not cheque:
                    self.marketChequeText.Hide()
                else:
                    self.marketChequeText.SetText(localeInfo.NumberToMoneyStringNoUnit(cheque) + " " + localeInfo.CHEQUE_SYSTEM_UNIT_WON)
                    self.marketChequeText.Show()

                    if self.inputMarketPrice:
                        self.InputMarketPrice()

        if app.ENABLE_PRIVATE_SHOP_CHEQUE:
            def SetCheque(self, cheque):
                cheque=str(cheque)
                self.inputChequeValue.SetText(cheque)
                self.__OnValueUpdate()
                ime.SetCursorPosition(len(cheque)+1)
           
            def __ClickChequeEditLine(self) :
                self.inputChequeValue.SetFocus()
                if len(self.inputChequeValue.GetText()) <= 0:
                    self.inputChequeValue.SetText("")

            def __ClickValueEditLine(self) :
                self.inputValue.SetFocus()
                if len(self.inputValue.GetText()) <= 0:
                    self.inputValue.SetText("")
                           
            def GetCheque(self):
                if len(self.inputChequeValue.GetText()) <= 0:
                    return "0"

                return self.inputChequeValue.GetText()
               
            def __OnValueUpdate(self):
                if self.inputValue.IsFocus() :
                    ui.EditLine.OnIMEUpdate(self.inputValue)

                    money = self.inputValue.GetText()
                    if len(money) <= 0:
                        money = "0"
                    else:
                        k_pos = money.find('K')
                        if k_pos >= 0:
                            money = money[:k_pos] + '000' * money.count('K')

                    self.inputMoneyText.SetText(localeInfo.NumberToMoneyString(int(money)))

                elif self.inputChequeValue.IsFocus() :
                    ui.EditLine.OnIMEUpdate(self.inputChequeValue)

                    cheque = self.inputChequeValue.GetText()
                    if len(cheque) <= 0:
                        cheque = "0"

                    self.inputChequeText.SetText(localeInfo.NumberToMoneyStringNoUnit(int(cheque)) + " " + localeInfo.CHEQUE_SYSTEM_UNIT_WON)
                else:
                    pass
   
        else:
            def __OnValueUpdate(self):
                ui.EditLine.OnIMEUpdate(self.inputValue)

        def __OnClickMarketPriceButton(self):
            if self.inputMarketPrice:
                self.inputMarketPrice = False

                self.marketPriceButton.SetUpVisual("d:/ymir work/ui/game/premium_private_shop/mini_empty_button_default.sub")
                self.marketPriceButton.SetOverVisual("d:/ymir work/ui/game/premium_private_shop/mini_empty_button_over.sub")
                self.marketPriceButton.SetDownVisual("d:/ymir work/ui/game/premium_private_shop/mini_empty_button_down.sub")
            else:
                self.inputMarketPrice = True

                self.marketPriceButton.SetUpVisual("d:/ymir work/ui/game/premium_private_shop/mini_accept_button_default.sub")
                self.marketPriceButton.SetOverVisual("d:/ymir work/ui/game/premium_private_shop/mini_accept_button_over.sub")
                self.marketPriceButton.SetDownVisual("d:/ymir work/ui/game/premium_private_shop/mini_accept_button_down.sub")

                self.InputMarketPrice()

        def InputMarketPrice(self):
            if self.marketGoldValue > 0:
                self.SetValue(str(self.marketGoldValue))

            if app.ENABLE_PRIVATE_SHOP_CHEQUE:
                if self.marketChequeValue > 0:
                    self.SetCheque(str(self.marketChequeValue))

        def __OnOverInButton(self, button):
            self.toolTip.ClearToolTip()

            if button == "PRICE_HINT":
                self.toolTip.SetThinBoardSize(len(localeInfo.PREMIUM_PRIVATE_SHOP_MARKET_PRICE_HINT_MSG) * 4 + 50, 10)
                self.toolTip.AppendTextLine(localeInfo.PREMIUM_PRIVATE_SHOP_MARKET_PRICE_HINT_MSG, self.toolTip.SPECIAL_TITLE_COLOR)

            elif button == "AUTO_MARKET_PRICE_INPUT":
                self.toolTip.SetThinBoardSize(len(localeInfo.PREMIUM_PRIVATE_SHOP_AUTO_MARKET_PRICE_INPUT_TOOLTIP) * 4 + 50, 10)
                self.toolTip.AppendTextLine(localeInfo.PREMIUM_PRIVATE_SHOP_AUTO_MARKET_PRICE_INPUT_TOOLTIP, self.toolTip.SPECIAL_TITLE_COLOR)

            self.toolTip.ShowToolTip()
               
           
        def __OnOverOutButton(self):
            if 0 != self.toolTip:
                self.toolTip.HideToolTip()

        def OnPressEscapeKey(self):
            self.Close()
            return True

burda olması gerekiyor sanırım çünkü uiscriptte burası için ayrı alan açmış ve burada o yok o yüzden nereye ekleyeceğim tam olarak
Kodları tekrar inceledim sadece şunu yaparmısın.

Ara:


Python:
Genişlet Daralt Kopyala
            def __OnValueUpdate(self):
                ui.EditLine.OnIMEUpdate(self.inputValue)

Değiştir:


Python:
Genişlet Daralt Kopyala
            def __OnValueUpdate(self):
                if self.inputValue.IsFocus() :
                    ui.EditLine.OnIMEUpdate(self.inputValue)

                    money = self.inputValue.GetText()
                    if len(money) <= 0:
                        money = "0"
                    else:
                        k_pos = money.find('K')
                        if k_pos >= 0:
                            money = money[:k_pos] + '000' * money.count('K')

                    self.inputMoneyText.SetText(localeInfo.NumberToMoneyString(int(money)))
 
Çözüm
Kodları tekrar inceledim sadece şunu yaparmısın.

Ara:


Python:
Genişlet Daralt Kopyala
            def __OnValueUpdate(self):
                ui.EditLine.OnIMEUpdate(self.inputValue)

Değiştir:


Python:
Genişlet Daralt Kopyala
            def __OnValueUpdate(self):
                if self.inputValue.IsFocus() :
                    ui.EditLine.OnIMEUpdate(self.inputValue)

                    money = self.inputValue.GetText()
                    if len(money) <= 0:
                        money = "0"
                    else:
                        k_pos = money.find('K')
                        if k_pos >= 0:
                            money = money[:k_pos] + '000' * money.count('K')

                    self.inputMoneyText.SetText(localeInfo.NumberToMoneyString(int(money)))
evet bunu ben de farkettim hocam çünkü client srcden cheque systemi kapatmıştım :D ifleri yazan adam mantık hatası yapmış ancak altına
ui.EditLine.OnIMEUpdate(self.inputValue)
bu koduda bıraktım ben? bunu sileyim mi bu şekilde de calisiyor, bu arada cok teşekkür ederim
 
evet bunu ben de farkettim hocam çünkü client srcden cheque systemi kapatmıştım :D ifleri yazan adam mantık hatası yapmış ancak altına
ui.EditLine.OnIMEUpdate(self.inputValue)
bu koduda bıraktım ben? bunu sileyim mi bu şekilde de calisiyor, bu arada cok teşekkür ederim
o kod kalsın kankam. Bende mobilden bakıyordum pc'ye geçtiğimde dedim zaten var sonra resime bakınca won sistemini kullanmadığını farkettim :)
 
Durum
İçerik kilitlendiği için mesaj gönderimine kapatıldı.
Geri
Üst