Jump to content

Help import game functions


Recommended Posts

  • Replies 5
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Tell us exactly what it is that we can realize. But I do like the screen shoot an example:

 

Open game.py and copy this:

 

SCREENSHOT_CWDSAVE = FALSE
SCREENSHOT_DIR = None

if localeInfo.IsEUROPE():
	SCREENSHOT_CWDSAVE = TRUE

if localeInfo.IsCIBN10():
	SCREENSHOT_CWDSAVE = FALSE
	SCREENSHOT_DIR = "YT2W"

and adds that overall this game.py you copied the file where is your system after import.

Gender in test.py

And then add to your button function:

 

	def YourFunctionButton(self):
		print "save screen"

		# SCREENSHOT_CWDSAVE
		if SCREENSHOT_CWDSAVE:
			if not os.path.exists(os.getcwd()+os.sep+"screenshot"):
				os.mkdir(os.getcwd()+os.sep+"screenshot")

			(succeeded, name) = grp.SaveScreenShotToPath(os.getcwd()+os.sep+"screenshot"+os.sep)
		elif SCREENSHOT_DIR:
			(succeeded, name) = grp.SaveScreenShot(SCREENSHOT_DIR)
		else:
			(succeeded, name) = grp.SaveScreenShot()
		# END_OF_SCREENSHOT_CWDSAVE

		if succeeded:
			pass
			"""
			chat.AppendChat(chat.CHAT_TYPE_INFO, name + localeInfo.SCREENSHOT_SAVE1)
			chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.SCREENSHOT_SAVE2)
			"""
		else:
			chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.SCREENSHOT_SAVE_FAILURE)

Then add in the beginning:

import os
import grp
import chat

And now ready to do a picture in the window of another system.

 

If you could tell me what you want to bring game.py functions in other systems / windows put I would help.

Link to comment
Share on other sites

I will give an example

It has the following function in my game.py

self.interface.ToggleBonusWindow()

this function will get ToggleBonusWindow () in interfacemodule.py

I want to put in my system a function like this to get another function in game.py

Contact me and I will help you.

Skype: sacadatt.amazon

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

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.