Skip to content
View in the app

A better way to browse. Learn more.

OldStyle Gaming Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[C++]Mail Box Final version

  • Administrator

[C++]Mail Box Final version - Systemul este full testat fara buguri!

download: https://mega.nz/#!gb5yFIKS!L1zivKH4XduVQfqICiuNgZTmU31nAdoMX-ffpHtO09Y

ui.py

class ImageBox(Window):
	def __init__(self, layer = "UI"):
		Window.__init__(self, layer)

		self.eventFunc = {"mouse_click" : None, "mouse_over_in" : None, "mouse_over_out" : None}
		self.eventArgs = {"mouse_click" : None, "mouse_over_in" : None, "mouse_over_out" : None}

		self.eventDict={}

	def __del__(self):
		Window.__del__(self)
		self.eventFunc = None
		self.eventArgs = None

	def RegisterWindow(self, layer):
		self.hWnd = wndMgr.RegisterImageBox(self, layer)

	def LoadImage(self, imageName):
		self.name=imageName
		wndMgr.LoadImage(self.hWnd, imageName)

		if len(self.eventDict)!=0:
			print "LOAD IMAGE", self, self.eventDict

	def SetAlpha(self, alpha):
		wndMgr.SetDiffuseColor(self.hWnd, 1.0, 1.0, 1.0, alpha)

	def GetWidth(self):
		return wndMgr.GetWidth(self.hWnd)

	def GetHeight(self):
		return wndMgr.GetHeight(self.hWnd)

	def SetEvent(self, func, *args) :
		result = self.eventFunc.has_key(args[0])
		if result:
			self.eventFunc[args[0]] = func
			self.eventArgs[args[0]] = args
		else :
			print "[ERROR] ui.py SetEvent, Can`t Find has_key : %s" % args[0]

	def OnMouseOverIn(self):
		try:
			self.eventDict["MOUSE_OVER_IN"]()
		except KeyError:
			pass

	def OnMouseOverOut(self):
		try:
			self.eventDict["MOUSE_OVER_OUT"]()
		except KeyError:
			pass

	def OnMouseLeftButtonUp(self) :
		if self.eventFunc["mouse_click"] :
			apply(self.eventFunc["mouse_click"], self.eventArgs["mouse_click"])

	def OnMouseOverIn(self) :
		if self.eventFunc["mouse_over_in"] :
			apply(self.eventFunc["mouse_over_in"], self.eventArgs["mouse_over_in"])
		else:
			try:
				self.eventDict["MOUSE_OVER_IN"]()
			except KeyError:
				pass

	def OnMouseOverOut(self) :
		if self.eventFunc["mouse_over_out"] :
			apply(self.eventFunc["mouse_over_out"], self.eventArgs["mouse_over_out"])
		else :
			try:
				self.eventDict["MOUSE_OVER_OUT"]()
			except KeyError:
				pass
				
	def SAFE_SetStringEvent(self, event, func):
		self.eventDict[event]=__mem_func__(func)

class AniImageBox(Window):
	def __init__(self, layer = "UI"):
		Window.__init__(self, layer)

		self.eventFunc = {"mouse_click" : None, "mouse_over_in" : None, "mouse_over_out" : None}
		self.eventArgs = {"mouse_click" : None, "mouse_over_in" : None, "mouse_over_out" : None}

	def __del__(self):
		Window.__del__(self)
		self.eventFunc = None
		self.eventArgs = None

	def RegisterWindow(self, layer):
		self.hWnd = wndMgr.RegisterAniImageBox(self, layer)

	def SetDelay(self, delay):
		wndMgr.SetDelay(self.hWnd, delay)

	def SetEvent(self, func, *args) :
		result = self.eventFunc.has_key(args[0])		
		if result:
			self.eventFunc[args[0]] = func
			self.eventArgs[args[0]] = args
		else :
			print "[ERROR] ui.py SetEvent, Can`t Find has_key : %s" % args[0]

	def OnMouseLeftButtonUp(self) :
		if self.eventFunc["mouse_click"] :
			apply(self.eventFunc["mouse_click"], self.eventArgs["mouse_click"])

	def OnMouseOverIn(self) :
		if self.eventFunc["mouse_over_in"] :
			apply(self.eventFunc["mouse_over_in"], self.eventArgs["mouse_over_in"])

	def OnMouseOverOut(self) :
		if self.eventFunc["mouse_over_out"] :
			apply(self.eventFunc["mouse_over_out"], self.eventArgs["mouse_over_out"])

	def AppendImage(self, filename):
		wndMgr.AppendImage(self.hWnd, filename)

	def SetPercentage(self, curValue, maxValue):
		wndMgr.SetRenderingRect(self.hWnd, 0.0, 0.0, -1.0 + float(curValue) / float(maxValue), 0.0)

	def OnEndFrame(self):
		pass

==========================================================
uiminimap
import uiToolTip

class MiniMap(ui.ScriptWindow):

search:

miniMap.SetScale(2.0)

add bellow:

if app.ENABLE_MAIL_BOX_SYSTEM:
			self.toolTip = uiToolTip.ToolTip(160)
			self.toolTip.HideToolTip()



search:
 

self.tooltipAtlasOpen.SetTooltipPosition(ButtonPosX, ButtonPosY)



add bellow:
 

if app.ENABLE_MAIL_BOX_SYSTEM:
			self.MailBoxButton.SetEvent(ui.__mem_func__(self.OnMouseOverIn), "mouse_over_in")
			self.MailBoxButton.SetEvent(ui.__mem_func__(self.OnMouseOverOut), "mouse_over_out")

search:

def OnUpdate(self):
		import time
		(x, y, z) = player.GetMainCharacterPosition()
		miniMap.Update(x, y)
		
		self.Time.SetText(time.strftime("%H:%M"))
		self.Time2.SetText(time.strftime("%d-%m-%Y"))

ADD BEFORE:

if app.ENABLE_MAIL_BOX_SYSTEM:
		def MailBoxValues(self,c_a,m_a,m_s):
			if c_a > 0:
				self.MailBoxEffect.Show()
			else:
				self.MailBoxEffect.Hide()
				
			self.toolTip.ClearToolTip()
			self.toolTip.SetTitle("Wiadomości otrzymane %d"%c_a)
			self.toolTip.AppendTextLine("Bez załącznika: %d / Z załącznikiem: %d"%(m_s,m_a))

	def OnMouseOverIn(self):
		self.toolTip.ShowToolTip()
		
	def OnMouseOverOut(self):
		self.toolTip.HideToolTip()

Featured Replies

thank you bro

 

I have a question. Should I activate this?
 

Locale_inc

 

//#define USE_TRANSMUTATION_SYSTEM_MAILBOX
//#define USE_WON_SYSTEM_MAILBOX

and

 

service

 

//#define USE_TRANSMUTATION_SYSTEM_MAILBOX
//#define USE_WON_SYSTEM_MAILBOX
//#define USE_ACCE_SYSTEM_MAILBOX

please reply

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.