Beispiel #1
0
def Initialize():
    global ReceiveLog_CloseButton
    global ResultSurface
    ResultSurface = pygame.Surface((350, 350), pygame.SRCALPHA)
    ReceiveLog_CloseButton = gameObjs.Button(
        pygame.rect.Rect(320, 0, 0, 0),
        gameMain.DefaultCnt.Get_RegKey("/strings/button/game/down_arrow"), 16)
Beispiel #2
0
def Initialize(DISPLAY):
    global PlayButton
    global SettingsButton
    global IntroSpriteButton
    PlayButton = gameObjs.Button(
        pygame.Rect(50, 50, 0, 0),
        gameMain.DefaultCnt.Get_RegKey("/strings/main_menu/play_button"), 18)
    SettingsButton = gameObjs.Button(
        pygame.Rect(50, 50, 0, 0),
        gameMain.DefaultCnt.Get_RegKey("/strings/main_menu/settings_button"),
        18)
    gameMainObj.ClearColor = (1, 20, 30)
    IntroSpriteButton = gameObjs.SpriteButton(pygame.Rect(
        0, 0, 47, 45), ("/icon.png", "/icon.png", "/icon.png"))

    print("GameMenu : Initialize")
    tipsWindow.Initialize(DISPLAY)
Beispiel #3
0
def Initialize():
    global WindowObject
    global BuyButton
    global DrawnSurface
    global ListItems
    WindowObject = gameObjs.Window(pygame.Rect(100,100,430,285), gameMain.DefaultCnt.Get_RegKey("/strings/window/store/window_title"), True)
    WindowObject.Minimizable = False
    BuyButton = gameObjs.Button(pygame.Rect(20, 20, 50, 50), gameMain.DefaultCnt.Get_RegKey("/strings/window/store/buy_button"), 14)
    BuyButton.CustomColisionRectangle = True
    DrawnSurface = pygame.Surface((WindowObject.WindowSurface_Rect[2], WindowObject.WindowSurface_Rect[3]), pygame.SRCALPHA)
    ListItems = gameObjs.VerticalListWithDescription(pygame.Rect(0, 0, 350, 250))
Beispiel #4
0
def Initialize():
    global WindowObject
    global BuyButton
    global DrawnSurface
    global ListItems
    global BuyAmout
    global PreviousButton
    global NextButton
    WindowObject = gameObjs.Window(pygame.Rect(100,100,gameMain.DefaultCnt.Get_RegKey("/props/window/infos/last_w", int),gameMain.DefaultCnt.Get_RegKey("/props/window/infos/last_h", int)), gameMain.DefaultCnt.Get_RegKey("/strings/window/infos/window_title"),True)
    NextButton = gameObjs.Button(pygame.Rect(0,0,0,0), ">", 12)
    PreviousButton = gameObjs.Button(pygame.Rect(0,0,0,0), "<", 12)
    NextButton.CustomColisionRectangle = True
    PreviousButton.CustomColisionRectangle = True
    WindowObject.Minimizable = False
    DrawnSurface = pygame.Surface((WindowObject.WindowSurface_Rect[2], WindowObject.WindowSurface_Rect[3]), pygame.SRCALPHA)

    category_0.Initialize()
    category_1.Initialize()
    category_2.Initialize()

    Set_Category(0)
Beispiel #5
0
def Initialize(DISPLAY):
    global WindowObj
    global WindowObj_RefreshButton

    WindowObj = gameObjs.Window(
        pygame.Rect(350, 50, 550, 200),
        gameMain.DefaultCnt.Get_RegKey(
            "/strings/main_menu/message_window/window_title"), True)
    WindowObj_RefreshButton = gameObjs.Button(
        pygame.Rect(0, 0, 0, 0),
        gameMain.DefaultCnt.Get_RegKey(
            "/strings/main_menu/message_window/next_button"), 18)
    WindowObj_RefreshButton.CustomColisionRectangle = True
Beispiel #6
0
def Initialize():
    global Yes_Button
    global No_Button
    global InputBox
    global OK_Button

    Yes_Button = gtk.Button(
        pygame.Rect(0, 0, 0, 0),
        gameMain.DefaultCnt.Get_RegKey("/strings/dialog/yes_button"), 18)
    Yes_Button.CustomColisionRectangle = True

    No_Button = gtk.Button(
        pygame.Rect(0, 0, 0, 0),
        gameMain.DefaultCnt.Get_RegKey("/strings/dialog/no_button"), 18)
    No_Button.CustomColisionRectangle = True

    OK_Button = gtk.Button(
        pygame.Rect(0, 0, 0, 0),
        gameMain.DefaultCnt.Get_RegKey("/strings/dialog/ok_button"), 18)
    OK_Button.CustomColisionRectangle = True

    InputBox = gtk.InputBox(0, 0, 0, 0, "Default", 20)

    InputBox.CustomColision = True
Beispiel #7
0
def Initialize(DISPLAY):
    # -- Set Buttons -- #
    global SaveButton
    global GameOptionsButton
    global GrindButton
    global BackToMainMenuButton
    global OpenStoreButton
    global ItemsView
    global OpenInfosWindowButton
    global OpenExperienceWindowButton
    global HUD_Surface

    # -- Initialize Buttons -- #
    GrindButton = gameObjs.Button(pygame.rect.Rect(15, 115, 130, 150), "Lorem",
                                  18)
    GrindButton.WhiteButton = True
    GameOptionsButton = gameObjs.Button(
        pygame.rect.Rect(DISPLAY.get_width() - 120, 5, 0, 0),
        gameMain.DefaultCnt.Get_RegKey("/strings/button/game/options"), 12)
    SaveButton = gameObjs.Button(
        pygame.rect.Rect(DISPLAY.get_width() - 120, 20, 0, 0),
        gameMain.DefaultCnt.Get_RegKey("/strings/button/game/save"), 12)
    BackToMainMenuButton = gameObjs.Button(
        pygame.Rect(DISPLAY.get_width() - 120, 35, 0, 0),
        gameMain.DefaultCnt.Get_RegKey("/strings/button/game/main_menu"), 12)
    OpenStoreButton = gameObjs.Button(
        pygame.Rect(5,
                    DISPLAY.get_height() - 25, 0, 0),
        gameMain.DefaultCnt.Get_RegKey("/strings/button/game/store"), 14)
    OpenInfosWindowButton = gameObjs.Button(
        pygame.Rect(0, 0, 0, 0),
        gameMain.DefaultCnt.Get_RegKey("/strings/button/game/infos"), 14)
    OpenExperienceWindowButton = gameObjs.Button(
        pygame.Rect(0, 0, 0, 0),
        gameMain.DefaultCnt.Get_RegKey(
            "/strings/button/game/experience_store"), 14)
    ItemsView = gameObjs.GameItemsView(pygame.Rect(5, 500, 430, 100))

    IncomingLog.Initialize()

    # -- Initialize Objects -- #
    storeWindow.Initialize()
    expStoreWindow.Initialize()
    infosWindow.Initialize()
    gameMain.ClearColor = (5, 20, 14)

    # -- Initialize the Screen -- #
    HUD_Surface = pygame.Surface((DISPLAY.get_width(), DISPLAY.get_height()))

    #    # -- Load the Save Game -- #
    LoadGame()
Beispiel #8
0
def Initialize():
    global OptionsScreen_CloseButton
    global OptionsScreen_UpDownCategory
    global Current_Category

    OptionsScreen_CloseButton = gameObjs.Button(
        pygame.rect.Rect(0, 5, 0, 0),
        gameMain.DefaultCnt.Get_RegKey("/strings/settings/back_button"), 14)
    OptionsScreen_UpDownCategory = gameObjs.UpDownButton(5, 5, 14)

    gameMain.ClearColor = (1, 24, 32)

    Category0.Initialize()
    Category1.Initialize()
    Category2.Initialize()

    Set_Category(Current_Category)
Beispiel #9
0
    def __init__(self, Text, Value, ValueType, ID):
        self.Text = str(Text)
        self.Value = str(Value)
        self.ValueType = ValueType
        self.Ypos = 0
        self.Index = 0
        self.ChangeButton = gameObjs.Button((0, 0, 0, 0), "Toggle", 8)
        self.Xoffset = 0
        self.Yoffset = 0
        self.Response = -1002
        self.ID = ID

        # -- Set the Button Type -- #
        if ValueType == int or float:
            self.ChangeButton = gameObjs.UpDownButton(5, 5, 8)

            self.ChangeButton.UpButton.CustomColisionRectangle = True
            self.ChangeButton.DownButton.CustomColisionRectangle = True

        self.ChangeButton.CustomColisionRectangle = True
Beispiel #10
0
def Initialize():
    global WindowObject
    global BuyButton
    global DrawnSurface
    global ListItems
    global BuyAmout
    WindowObject = gameObjs.Window(
        pygame.Rect(
            100, 100,
            gameMain.DefaultCnt.Get_RegKey(
                "/props/window/expecience_store/last_w", int),
            gameMain.DefaultCnt.Get_RegKey(
                "/props/window/expecience_store/last_h", int)),
        gameMain.DefaultCnt.Get_RegKey(
            "/strings/window/expecience_store/window_title"), True)
    WindowObject.Minimizable = False
    BuyButton = gameObjs.Button(
        pygame.Rect(20, 20, 50, 50),
        gameMain.DefaultCnt.Get_RegKey(
            "/strings/window/expecience_store/buy_button"), 14)
    BuyButton.CustomColisionRectangle = True
    DrawnSurface = pygame.Surface((WindowObject.WindowSurface_Rect[2],
                                   WindowObject.WindowSurface_Rect[3]),
                                  pygame.SRCALPHA)