farkmt2official 1
farkmt2official
kralhakan2009 1
kralhakan2009
Vahsi Uzman 1
Vahsi Uzman
Hikaye Ekle

Oyun seçenekleri Menüsü (Py)

  • Konuyu başlatan Konuyu başlatan R&K
  • Başlangıç tarihi Başlangıç tarihi
  • Cevaplar Cevaplar 11
  • Görüntüleme Görüntüleme 2K
Durum
Üzgünüz bu konu cevaplar için kapatılmıştır...

Ayyıldız2 | 2008 TR Yapısı • 1-99 Orta Emek Destan • Oto Avsız • 10 Temmuz 21:00 HEMEN TIKLA!






Hayırlara vesile olur inşALLAH ufak bir şey ama güle güle kullanın

KENDİ SUNUCUMDAN
KANIT

Screenshot_3.png

BU DA NORMAL ETC HALİ
[CODE title="ui.py"]
class NewSliderBar(Window):

def __init__(self):
Window.__init__(self)

self.curPos = 1.0
self.pageSize = 1.0
self.eventChange = None

self.__CreateBackGroundImage()
self.__CreateCursor()

def __del__(self):
Window.__del__(self)

def __CreateBackGroundImage(self):
img = ImageBox()
img.SetParent(self)
img.LoadImage("d:/ymir work/ui/game/option/new_slidbar_bg.tga")
img.Show()
self.backGroundImage = img

self.SetSize(self.backGroundImage.GetWidth(), self.backGroundImage.GetHeight())

def __CreateCursor(self):
cursor = DragButton()
cursor.AddFlag("movable")
cursor.AddFlag("restrict_y")
cursor.SetParent(self)
cursor.SetMoveEvent(__mem_func__(self.__OnMove))
cursor.SetUpVisual("d:/ymir work/ui/game/option/new_mid_bar_slidbar_bg.tga")
cursor.SetOverVisual("d:/ymir work/ui/game/option/new_mid_bar_slidbar_bg.tga")
cursor.SetDownVisual("d:/ymir work/ui/game/option/new_mid_bar_slidbar_bg.tga")
cursor.Show()
self.cursor = cursor

self.cursor.SetRestrictMovementArea(0, 0, self.backGroundImage.GetWidth(), 0)
self.pageSize = self.backGroundImage.GetWidth() - self.cursor.GetWidth()

def __OnMove(self):
(xLocal, yLocal) = self.cursor.GetLocalPosition()
self.curPos = float(xLocal) / float(self.pageSize)

if self.eventChange:
self.eventChange()

def SetSliderPos(self, pos):
self.curPos = pos
self.cursor.SetPosition(int(self.pageSize * pos), 0)

def GetSliderPos(self):
return self.curPos

def SetEvent(self, event):
self.eventChange = event

def Enable(self):
self.cursor.Show()

def Disable(self):
self.cursor.Hide()

# if app.ENABLE_FOV_OPTION:
# def SetBackgroundVisual(self, filename):
# if self.backGroundImage:
# self.backGroundImage.LoadImage(filename)

# self.SetSize(self.backGroundImage.GetWidth(), self.backGroundImage.GetHeight())
# self.pageSize = self.backGroundImage.GetWidth() - self.cursor.GetWidth()

# if self.cursor:
# self.cursor.SetRestrictMovementArea(0, 0, self.backGroundImage.GetWidth(), 0)

# def SetButtonVisual(self, path, up, over, down):
# if self.cursor:
# self.cursor.SetUpVisual(path + up)
# self.cursor.SetOverVisual(path + over)
# self.cursor.SetDownVisual(path + down)










elif Type == "newsliderbar":
parent.Children[Index] = NewSliderBar()
parent.Children[Index].SetParent(parent)
self.LoadElementSliderBar(parent.Children[Index], ElementValue, parent)
[/CODE]
 
Son düzenleme:

En Çok Reaksiyon Alan Mesajlar

Durum
Üzgünüz bu konu cevaplar için kapatılmıştır...

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

Geri
Üst