Jump to content

Event Report System


Recommended Posts

M2 Download Center

This is the hidden content, please
( Internal )

constinfo.py open

add

Spoiler

karaca425event = 0

game.py açın

game.py uppermost add

Spoiler

class Component:
    def Button(self, parent, buttonName, tooltipText, x, y, func, UpVisual, OverVisual, DownVisual):
        button = ui.Button()

		if parent != None:
            button.SetParent(parent)

        button.SetPosition(x, y)
        button.SetUpVisual(UpVisual)
        button.SetOverVisual(OverVisual)
        button.SetDownVisual(DownVisual)
        button.SetText(buttonName)
        button.SetToolTipText(tooltipText)
        button.Show()
        button.SetEvent(func)

		return button

    def ToggleButton(self, parent, buttonName, tooltipText, x, y, funcUp, funcDown, UpVisual, OverVisual, DownVisual):
        button = ui.ToggleButton()

		if parent != None:
            button.SetParent(parent)

        button.SetPosition(x, y)
        button.SetUpVisual(UpVisual)
        button.SetOverVisual(OverVisual)
        button.SetDownVisual(DownVisual)
        button.SetText(buttonName)
        button.SetToolTipText(tooltipText)
        button.Show()
        button.SetToggleUpEvent(funcUp)
        button.SetToggleDownEvent(funcDown)

		return button

    def EditLine(self, parent, editlineText, x, y, width, heigh, max):
		SlotBar = ui.SlotBar()

		if parent != None:
            SlotBar.SetParent(parent)

        SlotBar.SetSize(width, heigh)
        SlotBar.SetPosition(x, y)
        SlotBar.Show()
        Value = ui.EditLine()
        Value.SetParent(SlotBar)
        Value.SetSize(width, heigh)
        Value.SetPosition(1, 1)
        Value.SetMax(max)
        Value.SetLimitWidth(width)
        Value.SetMultiLine()
        Value.SetText(editlineText)
        Value.Show()

		return SlotBar, Value

	def EditLine2(self, parent, editlineText, x, y, width, heigh, max):
		SlotBar = ui.SlotBar()

		if parent != None:
            SlotBar.SetParent(parent)

        SlotBar.SetSize(width, heigh)
        SlotBar.SetPosition(x, y)
        SlotBar.Show()
        Value = ui.EditLine()
        Value.SetParent(SlotBar)
        Value.SetSize(width, heigh)
        Value.SetPosition(2, 2)
        Value.SetMax(210)
        Value.SetLimitWidth(width)
        Value.SetMultiLine()
        Value.SetText(editlineText)
        Value.Show()

		return SlotBar, Value

	def TextLine(self, parent, textlineText, x, y, color):
        textline = ui.TextLine()

		if parent != None:
            textline.SetParent(parent)

        textline.SetPosition(x, y)

		if color != None:
            textline.SetFontColor(color[0], color[1], color[2])

        textline.SetText(textlineText) textline.Show()

		return textline

    def RGB(self, r, g, b):
        return (r*255, g*255, b*255)

	def SliderBar(self, parent, sliderPos, func, x, y):
		Slider = ui.SliderBar()

		if parent != None:
			Slider.SetParent(parent)

		Slider.SetPosition(x, y)
		Slider.SetSliderPos(sliderPos / 100)
		Slider.Show()
		Slider.SetEvent(func)

		return Slider

	def ExpandedImage(self, parent, x, y, img):
        image = ui.ExpandedImageBox()

		if parent != None:
            image.SetParent(parent)

        image.SetPosition(x, y)
        image.LoadImage(img)
        image.Show()

		return image 

    def ComboBox(self, parent, text, x, y, width):
        combo = ui.ComboBox()

		if parent != None:
            combo.SetParent(parent)

        combo.SetPosition(x, y)
        combo.SetSize(width, 15)
        combo.SetCurrentItem(text)
        combo.Show()

		return combo

    def ThinBoard(self, parent, moveable, x, y, width, heigh, center):
        thin = ui.ThinBoard()

		if parent != None:
            thin.SetParent(parent)

		if moveable == TRUE:
            thin.AddFlag('movable')
            thin.AddFlag('float')

        thin.SetSize(width, heigh)
        thin.SetPosition(x, y)

		if center == TRUE:
            thin.SetCenterPosition()

        thin.Show()

		return thin

    def Gauge(self, parent, width, color, x, y):
        gauge = ui.Gauge()

		if parent != None:
            gauge.SetParent(parent)

        gauge.SetPosition(x, y)
        gauge.MakeGauge(width, color)
        gauge.Show()

		return gauge

    def ListBoxEx(self, parent, x, y, width, heigh):
        bar = ui.Bar()

		if parent != None:
            bar.SetParent(parent)

        bar.SetPosition(x, y)
        bar.SetSize(width, heigh)
        bar.SetColor(0x77000000)
        bar.Show()

		ListBox=ui.ListBoxEx()
		ListBox.SetParent(bar)
		ListBox.SetPosition(0, 0)
		ListBox.SetSize(width, heigh)
		ListBox.Show()

        scroll = ui.ScrollBar()
        scroll.SetParent(ListBox)
        scroll.SetPosition(width-15, 0)
        scroll.SetScrollBarSize(heigh)
        scroll.Show()

		ListBox.SetScrollBar(scroll)
		return bar, ListBox

 

 

search

Spoiler

def Open(self):
app.SetFrameSkip(1)

self.SetSize(wndMgr.GetScreenWidth(), wndMgr.GetScreenHeight())

under add

Spoiler

self.karaca425eventac = ui.Button()
self.karaca425eventac.SetPosition(700, 30)
self.karaca425eventac.SetUpVisual("d:/ymir work/ui/public/middle_button_01.sub")
self.karaca425eventac.SetOverVisual("d:/ymir work/ui/public/middle_button_02.sub")
self.karaca425eventac.SetDownVisual("d:/ymir work/ui/public/middle_button_03.sub")
self.karaca425eventac.SetText("Event Bilgi")
self.karaca425eventac.SetEvent(ui.__mem_func__(self.__karaca425event))
self.karaca425eventac.Show()
        
self.karaca425eventkapat = ui.Button()
self.karaca425eventkapat.SetPosition(700, 30)
self.karaca425eventkapat.SetUpVisual("d:/ymir work/ui/public/middle_button_01.sub")
self.karaca425eventkapat.SetOverVisual("d:/ymir work/ui/public/middle_button_02.sub")
self.karaca425eventkapat.SetDownVisual("d:/ymir work/ui/public/middle_button_03.sub")
self.karaca425eventkapat.SetText("Kapat")
self.karaca425eventkapat.SetEvent(ui.__mem_func__(self.__karaca425event))
self.karaca425eventkapat.Hide()

self.karaca425event = ui.BoardWithTitleBar()
self.karaca425event.SetSize(200, 220)
self.karaca425event.SetPosition(630, 45)
self.karaca425event.AddFlag('float')
self.karaca425event.SetTitleName("Event Bilgi Sistemi")
self.karaca425event.Hide()
self.comp2 = Component()
        
self.text = self.comp2.TextLine(self.karaca425event, 'Tarih', 25, 34, self.comp2.RGB(255, 255, 0))
self.text2 = self.comp2.TextLine(self.karaca425event, 'Event İsmi', 140, 34, self.comp2.RGB(255, 255, 0))
self.text3 = self.comp2.TextLine(self.karaca425event, 'Saat', 87, 34, self.comp2.RGB(255, 255, 0))
self.text4 = self.comp2.TextLine(self.karaca425event, 'Pazartesi', 19, 64, self.comp2.RGB(255, 0, 0))
self.text5 = self.comp2.TextLine(self.karaca425event, 'Salı', 19, 94, self.comp2.RGB(255, 0, 0))
self.text6 = self.comp2.TextLine(self.karaca425event, 'Çarşamba', 19, 124, self.comp2.RGB(255, 0, 0))
self.text7 = self.comp2.TextLine(self.karaca425event, 'Perşembe', 19, 154, self.comp2.RGB(255, 0, 0))
self.text8 = self.comp2.TextLine(self.karaca425event, 'Cuma', 19, 184, self.comp2.RGB(255, 0, 0))
self.saat1 = self.comp2.TextLine(self.karaca425event, '15:00-16:00', 79, 64, self.comp2.RGB(245, 245, 220))
self.saat2 = self.comp2.TextLine(self.karaca425event, '17:00-18:00', 79, 94, self.comp2.RGB(245, 245, 220))
self.saat3 = self.comp2.TextLine(self.karaca425event, '13:00-14:00', 79, 124, self.comp2.RGB(245, 245, 220))
self.saat4 = self.comp2.TextLine(self.karaca425event, '19:00-20:00', 79, 154, self.comp2.RGB(245, 245, 220))
self.saat5 = self.comp2.TextLine(self.karaca425event, '19:00-20:00', 79, 184, self.comp2.RGB(245, 245, 220))
self.resim1 = self.comp2.ExpandedImage(self.karaca425event, 145, 54, 'karaca425/ayisigi.tga')
self.resim2 = self.comp2.ExpandedImage(self.karaca425event, 145, 84, 'karaca425/corap.tga')
self.resim3 = self.comp2.ExpandedImage(self.karaca425event, 145, 114, 'karaca425/top.tga')
self.resim4 = self.comp2.ExpandedImage(self.karaca425event, 145, 144, 'karaca425/yumurta.tga')
self.resim5 = self.comp2.ExpandedImage(self.karaca425event, 145, 174, 'karaca425/simit.tga')

game.py last add

Spoiler

def __karaca425event(self):
if constInfo.karaca425event == 0:
constInfo.karaca425event = 1
self.karaca425event.Show()
else:
constInfo.karaca425event = 0
self.karaca425event.Hide()
        

ui.py open

search

Spoiler

self.ButtonText.SetText(text)

under add

Spoiler

def GetText(self):
if not self.ButtonText:
return# ""
return self.ButtonText.GetText()

karaca425 folder root.eix add.

 

Spoiler

224148J2O5kQ.png.c0a896053313ff641efcbea
224148OMyW9D.png.92780db1cd4b1e5b433548d

 

Spoiler

 

Link;

This is the hidden content, please

 

Alternative;

This is the hidden content, please

 

Virüstotal;

This is the hidden content, please

 

 

Edited by Metin2 Dev
Core X - External 2 Internal
  • Metin2 Dev 11
  • Lmao 1
  • Good 2
  • Love 8
Link to comment
Share on other sites

0619 14:04:07302 :: invalid idx 0
0619 14:04:17125 :: GRANNY: r:/granny/rt/granny_file_info.cpp(145): File has run-time type tag of 0x8000000f, which doesn't match this version of Granny (0x80000010).  Automatic conversion will be attempted.
0619 14:05:32932 :: Traceback (most recent call last):

0619 14:05:32932 ::   File "uiPhaseCurtain.py", line 61, in OnUpdate

0619 14:05:32932 ::   File "networkModule.py", line 150, in __ChangePhaseWindow

0619 14:05:32932 ::   File "game.py", line 167, in Open

0619 14:05:32932 :: NameError
0619 14:05:32932 :: :
0619 14:05:32932 :: global name 'Component' is not defined
0619 14:05:32932 ::

 

Link to comment
Share on other sites

IISkillzII

Spoiler

 

constinfo.py open

add

 
Code:

karaca425event = 0
game.py open

game.py uppermost add

 
Code:

class Component:
	def Button(self, parent, buttonName, tooltipText, x, y, func, UpVisual, OverVisual, DownVisual):
		button = ui.Button()
		if parent != None:
			button.SetParent(parent)
		button.SetPosition(x, y)
		button.SetUpVisual(UpVisual)
		button.SetOverVisual(OverVisual)
		button.SetDownVisual(DownVisual)
		button.SetText(buttonName)
		button.SetToolTipText(tooltipText)
		button.Show()
		button.SetEvent(func)
		return button

	def ToggleButton(self, parent, buttonName, tooltipText, x, y, funcUp, funcDown, UpVisual, OverVisual, DownVisual):
		button = ui.ToggleButton()
		if parent != None:
			button.SetParent(parent)
		button.SetPosition(x, y)
		button.SetUpVisual(UpVisual)
		button.SetOverVisual(OverVisual)
		button.SetDownVisual(DownVisual)
		button.SetText(buttonName)
		button.SetToolTipText(tooltipText)
		button.Show()
		button.SetToggleUpEvent(funcUp)
		button.SetToggleDownEvent(funcDown)
		return button

	def EditLine(self, parent, editlineText, x, y, width, heigh, max):
		SlotBar = ui.SlotBar()
		if parent != None:
			SlotBar.SetParent(parent)
		SlotBar.SetSize(width, heigh)
		SlotBar.SetPosition(x, y)
		SlotBar.Show()
		Value = ui.EditLine()
		Value.SetParent(SlotBar)
		Value.SetSize(width, heigh)
		Value.SetPosition(1, 1)
		Value.SetMax(max)
		Value.SetLimitWidth(width)
		Value.SetMultiLine()
		Value.SetText(editlineText)
		Value.Show()
		return SlotBar, Value
		
	def EditLine2(self, parent, editlineText, x, y, width, heigh, max):
		SlotBar = ui.SlotBar()
		if parent != None:
			SlotBar.SetParent(parent)
		SlotBar.SetSize(width, heigh)
		SlotBar.SetPosition(x, y)
		SlotBar.Show()
		Value = ui.EditLine()
		Value.SetParent(SlotBar)
		Value.SetSize(width, heigh)
		Value.SetPosition(2, 2)
		Value.SetMax(210)
		Value.SetLimitWidth(width)
		Value.SetMultiLine()
		Value.SetText(editlineText)
		Value.Show()
		return SlotBar, Value

	def TextLine(self, parent, textlineText, x, y, color):
		textline = ui.TextLine()
		if parent != None:
			textline.SetParent(parent)
		textline.SetPosition(x, y)
		if color != None:
			textline.SetFontColor(color[0], color[1], color[2])
		textline.SetText(textlineText)
		textline.Show()
		return textline

	def RGB(self, r, g, b):
		return (r*255, g*255, b*255)

	def SliderBar(self, parent, sliderPos, func, x, y):
		Slider = ui.SliderBar()
		if parent != None:
			Slider.SetParent(parent)
		Slider.SetPosition(x, y)
		Slider.SetSliderPos(sliderPos / 100)
		Slider.Show()
		Slider.SetEvent(func)
		return Slider

	def ExpandedImage(self, parent, x, y, img):
		image = ui.ExpandedImageBox()
		if parent != None:
			image.SetParent(parent)
		image.SetPosition(x, y)
		image.LoadImage(img)
		image.Show()
		return image

	def ComboBox(self, parent, text, x, y, width):
		combo = ui.ComboBox()
		if parent != None:
			combo.SetParent(parent)
		combo.SetPosition(x, y)
		combo.SetSize(width, 15)
		combo.SetCurrentItem(text)
		combo.Show()
		return combo

	def ThinBoard(self, parent, moveable, x, y, width, heigh, center):
		thin = ui.ThinBoard()
		if parent != None:
			thin.SetParent(parent)
		if moveable == TRUE:
			thin.AddFlag('movable')
			thin.AddFlag('float')
		thin.SetSize(width, heigh)
		thin.SetPosition(x, y)
		if center == TRUE:
			thin.SetCenterPosition()
		thin.Show()
		return thin

	def Gauge(self, parent, width, color, x, y):
		gauge = ui.Gauge()
		if parent != None:
			gauge.SetParent(parent)
		gauge.SetPosition(x, y)
		gauge.MakeGauge(width, color)
		gauge.Show()
		return gauge

	def ListBoxEx(self, parent, x, y, width, heigh):
		bar = ui.Bar()
		if parent != None:
			bar.SetParent(parent)
		bar.SetPosition(x, y)
		bar.SetSize(width, heigh)
		bar.SetColor(0x77000000)
		bar.Show()
		ListBox=ui.ListBoxEx()
		ListBox.SetParent(bar)
		ListBox.SetPosition(0, 0)
		ListBox.SetSize(width, heigh)
		ListBox.Show()
		scroll = ui.ScrollBar()
		scroll.SetParent(ListBox)
		scroll.SetPosition(width-15, 0)
		scroll.SetScrollBarSize(heigh)
		scroll.Show()
		ListBox.SetScrollBar(scroll)
		return bar, ListBox
search
 
Code:

def Open(self):
app.SetFrameSkip(1)

self.SetSize(wndMgr.GetScreenWidth(), wndMgr.GetScreenHeight())
under add
 
Code:

self.karaca425eventac = ui.Button()
self.karaca425eventac.SetPosition(700, 30)
self.karaca425eventac.SetUpVisual("d:/ymir work/ui/public/middle_button_01.sub")
self.karaca425eventac.SetOverVisual("d:/ymir work/ui/public/middle_button_02.sub")
self.karaca425eventac.SetDownVisual("d:/ymir work/ui/public/middle_button_03.sub")
self.karaca425eventac.SetText("Event Bilgi")
self.karaca425eventac.SetEvent(ui.__mem_func__(self.__karaca425event))
self.karaca425eventac.Show()
        
self.karaca425eventkapat = ui.Button()
self.karaca425eventkapat.SetPosition(700, 30)
self.karaca425eventkapat.SetUpVisual("d:/ymir work/ui/public/middle_button_01.sub")
self.karaca425eventkapat.SetOverVisual("d:/ymir work/ui/public/middle_button_02.sub")
self.karaca425eventkapat.SetDownVisual("d:/ymir work/ui/public/middle_button_03.sub")
self.karaca425eventkapat.SetText("Kapat")
self.karaca425eventkapat.SetEvent(ui.__mem_func__(self.__karaca425event))
self.karaca425eventkapat.Hide()

self.karaca425event = ui.BoardWithTitleBar()
self.karaca425event.SetSize(200, 220)
self.karaca425event.SetPosition(630, 45)
self.karaca425event.AddFlag('float')
self.karaca425event.SetTitleName("Event Bilgi Sistemi")
self.karaca425event.Hide()
self.comp2 = Component()
        
self.text = self.comp2.TextLine(self.karaca425event, 'Tarih', 25, 34, self.comp2.RGB(255, 255, 0))
self.text2 = self.comp2.TextLine(self.karaca425event, 'Event İsmi', 140, 34, self.comp2.RGB(255, 255, 0))
self.text3 = self.comp2.TextLine(self.karaca425event, 'Saat', 87, 34, self.comp2.RGB(255, 255, 0))
self.text4 = self.comp2.TextLine(self.karaca425event, 'Pazartesi', 19, 64, self.comp2.RGB(255, 0, 0))
self.text5 = self.comp2.TextLine(self.karaca425event, 'Salı', 19, 94, self.comp2.RGB(255, 0, 0))
self.text6 = self.comp2.TextLine(self.karaca425event, 'Çarşamba', 19, 124, self.comp2.RGB(255, 0, 0))
self.text7 = self.comp2.TextLine(self.karaca425event, 'Perşembe', 19, 154, self.comp2.RGB(255, 0, 0))
self.text8 = self.comp2.TextLine(self.karaca425event, 'Cuma', 19, 184, self.comp2.RGB(255, 0, 0))
self.saat1 = self.comp2.TextLine(self.karaca425event, '15:00-16:00', 79, 64, self.comp2.RGB(245, 245, 220))
self.saat2 = self.comp2.TextLine(self.karaca425event, '17:00-18:00', 79, 94, self.comp2.RGB(245, 245, 220))
self.saat3 = self.comp2.TextLine(self.karaca425event, '13:00-14:00', 79, 124, self.comp2.RGB(245, 245, 220))
self.saat4 = self.comp2.TextLine(self.karaca425event, '19:00-20:00', 79, 154, self.comp2.RGB(245, 245, 220))
self.saat5 = self.comp2.TextLine(self.karaca425event, '19:00-20:00', 79, 184, self.comp2.RGB(245, 245, 220))
self.resim1 = self.comp2.ExpandedImage(self.karaca425event, 145, 54, 'karaca425/ayisigi.tga')
self.resim2 = self.comp2.ExpandedImage(self.karaca425event, 145, 84, 'karaca425/corap.tga')
self.resim3 = self.comp2.ExpandedImage(self.karaca425event, 145, 114, 'karaca425/top.tga')
self.resim4 = self.comp2.ExpandedImage(self.karaca425event, 145, 144, 'karaca425/yumurta.tga')
self.resim5 = self.comp2.ExpandedImage(self.karaca425event, 145, 174, 'karaca425/simit.tga')
game.py last add
 
Code:

def __karaca425event(self):
if constInfo.karaca425event == 0:
constInfo.karaca425event = 1
self.karaca425event.Show()
else:
constInfo.karaca425event = 0
self.karaca425event.Hide()
ui.py open

search

 
Code:

self.ButtonText.SetText(text)
under add
 
Code:

def GetText(self):
if not self.ButtonText:
return# ""
return self.ButtonText.GetText()

 

 
  • Love 1
Link to comment
Share on other sites

#request move in https://metin2dev.org/board/index.php?/forum/38-python/

 

ui.py

class Component: 
    def TextLine(self, parent, textlineText, x, y, color): 
        textline = TextLine() 
        if parent != None: 
            textline.SetParent(parent) 
        textline.SetPosition(x, y) 
        if color != None: 
            textline.SetFontColor(color[0], color[1], color[2]) 
        textline.SetText(textlineText) 
        textline.Show() 
        return textline 
         
    def ExpandedImage(self, parent, x, y, img): 
        image = ExpandedImageBox() 
        if parent != None: 
            image.SetParent(parent) 
        image.SetPosition(x, y) 
        image.LoadImage(img) 
        image.Show() 
        return image  

game.py

self.comp2 = ui.Component()  
Link to comment
Share on other sites

1 hour ago, VegaS said:

#istek taşınmak https://metin2dev.org/board/index.php?/forum/38-python/

 

ui.py


sınıf Bileşen: 
    def Tanımlanır(self, parent, textlineText, x, y, renk): tanımlanır = Tanımlanır() 
        eğer üst != Hiçbiri: tanımlanır.SetParent(üst) tanımlanır.Setposıtıon(x, y) 
        eğer renk != Hiçbiri: tanımlanır.SetFontColor(renk[0], renk[1], renk[2]) tanımlanır.SetText(textlineText) tanımlanır.Show() 
        dönüş tanımlanır def Expandedımage(self, parent, x, y, ımg): resim = ExpandedİmageBox() 
        eğer üst != None: resim.SetParent(üst) görüntü.Setposıtıon(x, y) görüntü.Loadımage(ımg) resim.Show() 
        dönüş resim 

game.py


öz.comp2 =.Bileşen()  

For those who want to improve

1 hour ago, Blackk61 said:

TR:Her boku yabancılarla paylaşmamıza gerek yok.

EN:Good work bro, nice coding.

TR:Haklısın illaki bi yersiz paylasır onlar paylasmadan paylasıyım dedim :)

EN:Thank you :)

  • Love 1
Link to comment
Share on other sites

  • 1 year later...

Announcements



×
×
  • 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.