Agora Metin2 1
Agora Metin2
PrimeAC 1
PrimeAC
ShadowFon 1
ShadowFon
noisiv 1
noisiv
Manwe Work 1
Manwe Work
romegames 1
romegames
kralhakan2009 1
kralhakan2009
Vahsi Uzman 1
Vahsi Uzman
Bvural41 1
Bvural41
NovaLst 1
NovaLst
Hikaye Ekle
Reklam vermek için turkmmo@gmail.com

Envanter item arama (Highlight uyumlu)

  • Konuyu başlatan Konuyu başlatan qDESTAN
  • Başlangıç tarihi Başlangıç tarihi
  • Cevaplar Cevaplar 16
  • Görüntüleme Görüntüleme 2K

qDESTAN

Level 4
TM Üye
Üye
Katılım
20 Nis 2018
Konular
38
Mesajlar
254
Çözüm
3
Online süresi
14d 48m
Reaksiyon Skoru
38
Altın Konu
0
TM Yaşı
8 Yıl 1 Ay 23 Gün
Başarım Puanı
109
Yaş
26
MmoLira
1,542
DevLira
9
Ticaret - 0%
0   0   0

ROHAN2 WORLD 1-120 TR TİPİ OFFICIAL YOHARA, BALATHOR VE AMON! 80. GÜNÜNDE! +10.000 ONLİNE! HİLE VE BOT %100 ENGELLİ HEMEN TIKLA!

envanterde item arama geliştirilebilir görünüm açısından pek bi göz alıcılığı yok ama arayanlar için yönerge olabilir

[CODE lang="python" title="uiinventory.py"]self.costumeButton = self.GetChild2("CostumeButton") arat


#############
self.searchInput = self.GetChild("ItemSearchInput")
self.searchButton = self.GetChild("SearchButton")
self.searchInput.SetReturnEvent(ui.__mem_func__(self.OnSearchItem))
self.searchButton.SetEvent(ui.__mem_func__(self.ToggleSearchInput))

self.shiftedWidgets = [
self.GetChild("ItemSlot"),
self.GetChild("Inventory_Tab_01"),
self.GetChild("Inventory_Tab_02"),
self.GetChild("Inventory_Tab_03"),
self.GetChild("Inventory_Tab_04"),
self.GetChild("Equipment_Base"),
# gerekiyorsa ekle: Money_Slot, TitleBar vb. ya da kendine göre düzenle
]
self.searchInputShown = False
#############

def SetItemSlotVnum(self, slotNumber): arat

üstüne ekle

def OnSearchItem(self):
searchText = self.searchInput.GetText().lower()

self.liHighlightedItems = []

if not searchText:
self.wndItem.RefreshSlot()
return

for page in xrange(player.INVENTORY_PAGE_COUNT): # Sayfa sayısı kadar döner
for localSlotIndex in xrange(player.INVENTORY_PAGE_SIZE):
globalSlotIndex = page * player.INVENTORY_PAGE_SIZE + localSlotIndex
itemVNum = player.GetItemIndex(globalSlotIndex)

if itemVNum == 0:
continue

item.SelectItem(itemVNum)
itemName = item.GetItemName().lower()

if searchText in itemName:
self.HighlightSlot(globalSlotIndex)

self.__RefreshHighlights()

InventoryWindow sınıfının içerinde arat
def Close(self):
self.Hide()


altına ekle

def ToggleSearchInput(self):
if self.searchInputShown:
self.searchInput.Hide()
for widget in self.shiftedWidgets:
x, y = widget.GetLocalPosition()
widget.SetPosition(x, y - 25)
self.searchInputShown = False
else:
self.searchInput.Show()
self.searchInput.SetFocus()
for widget in self.shiftedWidgets:
x, y = widget.GetLocalPosition()
widget.SetPosition(x, y + 25)
self.searchInputShown = True



inventorywindowex.py aç
height 590

"children" :
(
## Inventory, Equipment Slots
{
"name" : "board",
"type" : "board",
"style" : ("attach",),

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

"width" : 176,
"height" : 590,

"children" :
(

<<< bu kısıma >>>
{
"name": "ItemSearchBackground",
"type": "image",
"x": 10,
"y": 35,
"image": "d:/ymir work/ui/public/parameter_slot_03.sub",
},

{
"name": "ItemSearchInput",
"type": "editline",
"x": 12,
"y": 35,
"width": 106,
"height": 14,
"input_limit": 50,
"text": "",
"style": ("ltr",),
"text_color": 0xffffffff
},

<<<< >>>>> ekle
## Title



## Item Slot arat altına ekle

{
"name": "SearchButton",
"type": "button",

"x": 10,
"y": 5,

"default_image": "d:/ymir work/ui/public/close_button_01.sub",
"over_image": "d:/ymir work/ui/public/close_button_02.sub",
"down_image": "d:/ymir work/ui/public/close_button_03.sub",

"text": "",
"tooltip_text": "Item Ara"
},[/CODE]
 

En Çok Reaksiyon Alan Mesajlar

envanterde item arama geliştirilebilir görünüm açısından pek bi göz alıcılığı yok ama arayanlar için yönerge olabilir

[CODE lang="python" title="uiinventory.py"]self.costumeButton = self.GetChild2("CostumeButton") arat


#############
self.searchInput = self.GetChild("ItemSearchInput")
self.searchButton = self.GetChild("SearchButton")
self.searchInput.SetReturnEvent(ui.__mem_func__(self.OnSearchItem))
self.searchButton.SetEvent(ui.__mem_func__(self.ToggleSearchInput))

self.shiftedWidgets = [
self.GetChild("ItemSlot"),
self.GetChild("Inventory_Tab_01"),
self.GetChild("Inventory_Tab_02"),
self.GetChild("Inventory_Tab_03"),
self.GetChild("Inventory_Tab_04"),
self.GetChild("Equipment_Base"),
# gerekiyorsa ekle: Money_Slot, TitleBar vb. ya da kendine göre düzenle
]
self.searchInputShown = False
#############

def SetItemSlotVnum(self, slotNumber): arat

üstüne ekle

def OnSearchItem(self):
searchText = self.searchInput.GetText().lower()

self.liHighlightedItems = []

if not searchText:
self.wndItem.RefreshSlot()
return

for page in xrange(player.INVENTORY_PAGE_COUNT): # Sayfa sayısı kadar döner
for localSlotIndex in xrange(player.INVENTORY_PAGE_SIZE):
globalSlotIndex = page * player.INVENTORY_PAGE_SIZE + localSlotIndex
itemVNum = player.GetItemIndex(globalSlotIndex)

if itemVNum == 0:
continue

item.SelectItem(itemVNum)
itemName = item.GetItemName().lower()

if searchText in itemName:
self.HighlightSlot(globalSlotIndex)

self.__RefreshHighlights()

InventoryWindow sınıfının içerinde arat
def Close(self):
self.Hide()


altına ekle

def ToggleSearchInput(self):
if self.searchInputShown:
self.searchInput.Hide()
for widget in self.shiftedWidgets:
x, y = widget.GetLocalPosition()
widget.SetPosition(x, y - 25)
self.searchInputShown = False
else:
self.searchInput.Show()
self.searchInput.SetFocus()
for widget in self.shiftedWidgets:
x, y = widget.GetLocalPosition()
widget.SetPosition(x, y + 25)
self.searchInputShown = True



inventorywindowex.py aç
height 590

"children" :
(
## Inventory, Equipment Slots
{
"name" : "board",
"type" : "board",
"style" : ("attach",),

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

"width" : 176,
"height" : 590,

"children" :
(

<<< bu kısıma >>>
{
"name": "ItemSearchBackground",
"type": "image",
"x": 10,
"y": 35,
"image": "d:/ymir work/ui/public/parameter_slot_03.sub",
},

{
"name": "ItemSearchInput",
"type": "editline",
"x": 12,
"y": 35,
"width": 106,
"height": 14,
"input_limit": 50,
"text": "",
"style": ("ltr",),
"text_color": 0xffffffff
},

<<<< >>>>> ekle
## Title



## Item Slot arat altına ekle

{
"name": "SearchButton",
"type": "button",

"x": 10,
"y": 5,

"default_image": "d:/ymir work/ui/public/close_button_01.sub",
"over_image": "d:/ymir work/ui/public/close_button_02.sub",
"down_image": "d:/ymir work/ui/public/close_button_03.sub",

"text": "",
"tooltip_text": "Item Ara"
},[/CODE]
Paylaşım için teşekkürler.
İki halini de yaptık geçiş yapılabilir istenildiği takdirde. Aradığın itemi bütün page'lerde highlight içerisine alıyor fakat first hangi page'deyse ona odaklanıp ilk onun yerini gösteriyor. Taşıman sürüklemen veya kullanman aramayı temizlemedikçe highlight'ı bozmuyor.

Öğeyi görmek için üye olmalısınız.
İşlevsel olan bu şekli elinize sağlık diğeri teoride güzel pratikte işkence
24 saat icerisinde görsel ekleyiniz
 
0604_223814.jpg
 
envanterde item arama geliştirilebilir görünüm açısından pek bi göz alıcılığı yok ama arayanlar için yönerge olabilir

[CODE lang="python" title="uiinventory.py"]self.costumeButton = self.GetChild2("CostumeButton") arat


#############
self.searchInput = self.GetChild("ItemSearchInput")
self.searchButton = self.GetChild("SearchButton")
self.searchInput.SetReturnEvent(ui.__mem_func__(self.OnSearchItem))
self.searchButton.SetEvent(ui.__mem_func__(self.ToggleSearchInput))

self.shiftedWidgets = [
self.GetChild("ItemSlot"),
self.GetChild("Inventory_Tab_01"),
self.GetChild("Inventory_Tab_02"),
self.GetChild("Inventory_Tab_03"),
self.GetChild("Inventory_Tab_04"),
self.GetChild("Equipment_Base"),
# gerekiyorsa ekle: Money_Slot, TitleBar vb. ya da kendine göre düzenle
]
self.searchInputShown = False
#############

def SetItemSlotVnum(self, slotNumber): arat

üstüne ekle

def OnSearchItem(self):
searchText = self.searchInput.GetText().lower()

self.liHighlightedItems = []

if not searchText:
self.wndItem.RefreshSlot()
return

for page in xrange(player.INVENTORY_PAGE_COUNT): # Sayfa sayısı kadar döner
for localSlotIndex in xrange(player.INVENTORY_PAGE_SIZE):
globalSlotIndex = page * player.INVENTORY_PAGE_SIZE + localSlotIndex
itemVNum = player.GetItemIndex(globalSlotIndex)

if itemVNum == 0:
continue

item.SelectItem(itemVNum)
itemName = item.GetItemName().lower()

if searchText in itemName:
self.HighlightSlot(globalSlotIndex)

self.__RefreshHighlights()

InventoryWindow sınıfının içerinde arat
def Close(self):
self.Hide()


altına ekle

def ToggleSearchInput(self):
if self.searchInputShown:
self.searchInput.Hide()
for widget in self.shiftedWidgets:
x, y = widget.GetLocalPosition()
widget.SetPosition(x, y - 25)
self.searchInputShown = False
else:
self.searchInput.Show()
self.searchInput.SetFocus()
for widget in self.shiftedWidgets:
x, y = widget.GetLocalPosition()
widget.SetPosition(x, y + 25)
self.searchInputShown = True



inventorywindowex.py aç
height 590

"children" :
(
## Inventory, Equipment Slots
{
"name" : "board",
"type" : "board",
"style" : ("attach",),

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

"width" : 176,
"height" : 590,

"children" :
(

<<< bu kısıma >>>
{
"name": "ItemSearchBackground",
"type": "image",
"x": 10,
"y": 35,
"image": "d:/ymir work/ui/public/parameter_slot_03.sub",
},

{
"name": "ItemSearchInput",
"type": "editline",
"x": 12,
"y": 35,
"width": 106,
"height": 14,
"input_limit": 50,
"text": "",
"style": ("ltr",),
"text_color": 0xffffffff
},

<<<< >>>>> ekle
## Title



## Item Slot arat altına ekle

{
"name": "SearchButton",
"type": "button",

"x": 10,
"y": 5,

"default_image": "d:/ymir work/ui/public/close_button_01.sub",
"over_image": "d:/ymir work/ui/public/close_button_02.sub",
"down_image": "d:/ymir work/ui/public/close_button_03.sub",

"text": "",
"tooltip_text": "Item Ara"
},[/CODE]
Paylaşım için teşekkürler.
 

Şu an konuyu görüntüleyenler (Toplam : 0, Üye: 0, Misafir: 0)

Geri
Üst