Exemple #1
0
def run_client(stdscr, ip='127.0.0.1'):

    queue = ControlQueue()

    remote_host = RemoteHost(ip, 9999, queue)

    ui.Color.init()
    board = ui.Board(stdscr)
    board.init()

    controller = ui.LocalController(board, remote_host, queue)

    rtn = []
    control_thread = Thread(target=controller.control_loop, args=(stdscr, rtn))

    control_thread.start()

    remote_host.start()
    remote_host.receive_loop()

    control_thread.join()

    log("Exiting run_client()")

    if len(rtn) > 0:
        return rtn[0]
Exemple #2
0
def run_local(stdscr):
    ui.Color.init()
    board = ui.Board(stdscr)
    board.init()

    queue = ControlQueue()

    session = LocalSession(queue)

    game = host.Game(session)

    local_host = LocalHost(game)

    controller = ui.LocalController(board, local_host, queue)

    rtn = []
    control_thread = Thread(target=controller.control_loop, args=(stdscr, rtn))
    control_thread.start()

    signal.signal(signal.SIGINT, interrupt_handler)
    local_host.start()

    log("Attempting to join control thread")
    control_thread.join()
    log("Control thread joined")

    if len(rtn) > 0:
        return rtn
Exemple #3
0
    def __MakeBoard(self):
        self.Board = ui.Board()
        self.Board.SetParent(self)
        self.Board.SetSize(self.GetWidth(), self.GetHeight())
        self.Board.SetPosition(0, 0)
        self.Board.AddFlag("movable")
        self.Board.Show()

        self.TitleBar = ui.TitleBar()
        self.TitleBar.SetParent(self.Board)
        self.TitleBar.SetPosition(7, 7)
        self.TitleBar.MakeTitleBar(self.GetWidth() - 2 * 7, 'red')
        self.TitleBar.SetCloseEvent(self.Close)
        self.TitleBar.Show()

        self.TitleText = ui.TextLine()
        self.TitleText.SetParent(self.TitleBar)
        self.TitleText.SetPosition(0, 4)
        self.TitleText.SetText("|cff00FFFFAlege sexul|h|r")
        self.TitleText.SetWindowHorizontalAlignCenter()
        self.TitleText.SetHorizontalAlignCenter()
        self.TitleText.Show()

        self.bg0 = ui.ImageBox()
        self.bg0.SetParent(self.Board)
        self.bg0.SetPosition(5, 35)
        self.bg0.LoadImage("change_race/faces/icon_mshaman.tga")
        self.bg0.Show()

        self.bg1 = ui.ImageBox()
        self.bg1.SetParent(self.Board)
        self.bg1.SetPosition(75, 35)
        self.bg1.LoadImage("change_race/faces/icon_wshaman.tga")
        self.bg1.Show()

        self.btn0 = ui.Button()
        self.btn0.SetParent(self.Board)
        self.btn0.SetPosition(12, 170)
        self.btn0.SetUpVisual("d:/ymir work/ui/public/middle_button_01.sub")
        self.btn0.SetOverVisual("d:/ymir work/ui/public/middle_button_02.sub")
        self.btn0.SetDownVisual("d:/ymir work/ui/public/middle_button_03.sub")
        self.btn0.SetDisableVisual(
            "d:/ymir work/ui/public/middle_button_03.sub")
        self.btn0.SetText("Alege")
        self.btn0.SetEvent(lambda: self.__choose_shaman_m())
        self.btn0.Show()

        self.btn1 = ui.Button()
        self.btn1.SetParent(self.Board)
        self.btn1.SetPosition(82, 170)
        self.btn1.SetUpVisual("d:/ymir work/ui/public/middle_button_01.sub")
        self.btn1.SetOverVisual("d:/ymir work/ui/public/middle_button_02.sub")
        self.btn1.SetDownVisual("d:/ymir work/ui/public/middle_button_03.sub")
        self.btn1.SetDisableVisual(
            "d:/ymir work/ui/public/middle_button_03.sub")
        self.btn1.SetText("Alege")
        self.btn1.SetEvent(lambda: self.__choose_shaman_f())
        self.btn1.Show()
Exemple #4
0
	def Board(self, parent, moveable, x, y, width, heigh):
		tmpBoard = ui.Board()
		
		if parent:
			tmpBoard.SetParent(parent)
		
		if moveable:
			tmpBoard.AddFlag('movable')
			tmpBoard.AddFlag('float')
		
		tmpBoard.SetSize(width, heigh)
		tmpBoard.SetPosition(x, y)

		tmpBoard.Show()
		return tmpBoard
Exemple #5
0
    def __MakeBoard(self):
        self.Board = ui.Board()
        self.Board.SetParent(self)
        self.Board.SetSize(self.GetWidth(), self.GetHeight())
        self.Board.SetPosition(0, 0)
        self.Board.AddFlag("movable")
        self.Board.Show()

        self.TitleBar = ui.TitleBar()
        self.TitleBar.SetParent(self.Board)
        self.TitleBar.SetPosition(7, 7)
        self.TitleBar.MakeTitleBar(self.GetWidth() - 2 * 7, 'red')
        self.TitleBar.SetCloseEvent(self.Close)
        self.TitleBar.Show()

        self.TitleText = ui.TextLine()
        self.TitleText.SetParent(self.TitleBar)
        self.TitleText.SetPosition(0, 4)
        self.TitleText.SetText("|cff80FFFFMeniu-Schimba rasa|h|r")
        self.TitleText.SetWindowHorizontalAlignCenter()
        self.TitleText.SetHorizontalAlignCenter()
        self.TitleText.Show()

        self.bg0 = ui.ImageBox()
        self.bg0.SetParent(self.Board)
        self.bg0.SetPosition(5, 35)
        self.bg0.LoadImage("change_race/faces/icon_mwarrior.tga")
        self.bg0.Show()

        self.bg1 = ui.ImageBox()
        self.bg1.SetParent(self.Board)
        self.bg1.SetPosition(72, 35)
        self.bg1.LoadImage("change_race/faces/icon_mninja.tga")
        self.bg1.Show()

        self.bg2 = ui.ImageBox()
        self.bg2.SetParent(self.Board)
        self.bg2.SetPosition(142, 35)
        self.bg2.LoadImage("change_race/faces/icon_msura.tga")
        self.bg2.Show()

        self.bg3 = ui.ImageBox()
        self.bg3.SetParent(self.Board)
        self.bg3.SetPosition(212, 35)
        self.bg3.LoadImage("change_race/faces/icon_mshaman.tga")
        self.bg3.Show()

        self.bgtxt0 = ui.TextLine()
        self.bgtxt0.SetParent(self.bg0)
        self.bgtxt0.SetPosition(0, 0)
        self.bgtxt0.SetWindowHorizontalAlignCenter()
        self.bgtxt0.SetHorizontalAlignCenter()
        self.bgtxt0.SetText("Razboinic")
        self.bgtxt0.Show()

        self.bgtxt1 = ui.TextLine()
        self.bgtxt1.SetParent(self.bg1)
        self.bgtxt1.SetPosition(0, 0)
        self.bgtxt1.SetWindowHorizontalAlignCenter()
        self.bgtxt1.SetHorizontalAlignCenter()
        self.bgtxt1.SetText("Ninja")
        self.bgtxt1.Show()

        self.bgtxt2 = ui.TextLine()
        self.bgtxt2.SetParent(self.bg2)
        self.bgtxt2.SetPosition(0, 0)
        self.bgtxt2.SetWindowHorizontalAlignCenter()
        self.bgtxt2.SetHorizontalAlignCenter()
        self.bgtxt2.SetText("Sura")
        self.bgtxt2.Show()

        self.bgtxt3 = ui.TextLine()
        self.bgtxt3.SetParent(self.bg3)
        self.bgtxt3.SetPosition(0, 0)
        self.bgtxt3.SetWindowHorizontalAlignCenter()
        self.bgtxt3.SetHorizontalAlignCenter()
        self.bgtxt3.SetText("Shaman")
        self.bgtxt3.Show()

        self.btn0 = ui.Button()
        self.btn0.SetParent(self.Board)
        self.btn0.SetPosition(12, 170)
        self.btn0.SetUpVisual("d:/ymir work/ui/public/middle_button_01.sub")
        self.btn0.SetOverVisual("d:/ymir work/ui/public/middle_button_02.sub")
        self.btn0.SetDownVisual("d:/ymir work/ui/public/middle_button_03.sub")
        self.btn0.SetDisableVisual(
            "d:/ymir work/ui/public/middle_button_03.sub")
        self.btn0.SetText("Alege")
        self.btn0.SetEvent(lambda: self.__choose_war())
        self.btn0.Show()

        self.btn1 = ui.Button()
        self.btn1.SetParent(self.Board)
        self.btn1.SetPosition(82, 170)
        self.btn1.SetUpVisual("d:/ymir work/ui/public/middle_button_01.sub")
        self.btn1.SetOverVisual("d:/ymir work/ui/public/middle_button_02.sub")
        self.btn1.SetDownVisual("d:/ymir work/ui/public/middle_button_03.sub")
        self.btn1.SetDisableVisual(
            "d:/ymir work/ui/public/middle_button_03.sub")
        self.btn1.SetText("Alege")
        self.btn1.SetEvent(lambda: self.__choose_ninja())
        self.btn1.Show()

        self.btn2 = ui.Button()
        self.btn2.SetParent(self.Board)
        self.btn2.SetPosition(152, 170)
        self.btn2.SetUpVisual("d:/ymir work/ui/public/middle_button_01.sub")
        self.btn2.SetOverVisual("d:/ymir work/ui/public/middle_button_02.sub")
        self.btn2.SetDownVisual("d:/ymir work/ui/public/middle_button_03.sub")
        self.btn2.SetDisableVisual(
            "d:/ymir work/ui/public/middle_button_03.sub")
        self.btn2.SetText("Alege")
        self.btn2.SetEvent(lambda: self.__choose_sura())
        self.btn2.Show()

        self.btn3 = ui.Button()
        self.btn3.SetParent(self.Board)
        self.btn3.SetPosition(222, 170)
        self.btn3.SetUpVisual("d:/ymir work/ui/public/middle_button_01.sub")
        self.btn3.SetOverVisual("d:/ymir work/ui/public/middle_button_02.sub")
        self.btn3.SetDownVisual("d:/ymir work/ui/public/middle_button_03.sub")
        self.btn3.SetDisableVisual(
            "d:/ymir work/ui/public/middle_button_03.sub")
        self.btn3.SetText("Alege")
        self.btn3.SetEvent(lambda: self.__choose_shaman())
        self.btn3.Show()
Exemple #6
0
    def BuildWindow(self):
        global isLoaded
        if isLoaded == 1:
            return
        isLoaded = 1
        self.verifyType = 1
        self.Board = ui.Board()
        self.Board.SetSize(155, 196)
        self.Board.SetCenterPosition()
        self.Board.SetPosition(wndMgr.GetScreenWidth() - 325,
                               (wndMgr.GetScreenHeight() - 195) / 2)
        #self.Board.AddFlag('movable')
        self.Board.AddFlag('float')
        self.Board.Show()
        self.__BuildKeyDict()
        self.comp = Component()

        self.img1 = self.comp.ExpandedImage(self.Board, 12, 12,
                                            'svside/empty.jpg')
        self.imgo1 = self.comp.ExpandedImage(self.Board, 12, 12,
                                             'svside/0.jpg')
        self.imgo2 = self.comp.ExpandedImage(self.Board, 32, 12,
                                             'svside/0.jpg')
        self.imgo3 = self.comp.ExpandedImage(self.Board, 52, 12,
                                             'svside/0.jpg')
        self.imgo4 = self.comp.ExpandedImage(self.Board, 72, 12,
                                             'svside/0.jpg')
        self.nm1 = self.comp.Button(
            self.Board, '1', '', 10, 50, self.nm1_func,
            'd:/ymir work/ui/public/small_button_01.sub',
            'd:/ymir work/ui/public/small_button_02.sub',
            'd:/ymir work/ui/public/small_button_03.sub')
        self.nm2 = self.comp.Button(
            self.Board, '2', '', 56, 50, self.nm2_func,
            'd:/ymir work/ui/public/small_button_01.sub',
            'd:/ymir work/ui/public/small_button_02.sub',
            'd:/ymir work/ui/public/small_button_03.sub')
        self.nm3 = self.comp.Button(
            self.Board, '3', '', 102, 50, self.nm3_func,
            'd:/ymir work/ui/public/small_button_01.sub',
            'd:/ymir work/ui/public/small_button_02.sub',
            'd:/ymir work/ui/public/small_button_03.sub')
        self.nm4 = self.comp.Button(
            self.Board, '4', '', 10, 74, self.nm4_func,
            'd:/ymir work/ui/public/small_button_01.sub',
            'd:/ymir work/ui/public/small_button_02.sub',
            'd:/ymir work/ui/public/small_button_03.sub')
        self.nm5 = self.comp.Button(
            self.Board, '5', '', 56, 74, self.nm5_func,
            'd:/ymir work/ui/public/small_button_01.sub',
            'd:/ymir work/ui/public/small_button_02.sub',
            'd:/ymir work/ui/public/small_button_03.sub')
        self.nm6 = self.comp.Button(
            self.Board, '6', '', 102, 74, self.nm6_func,
            'd:/ymir work/ui/public/small_button_01.sub',
            'd:/ymir work/ui/public/small_button_02.sub',
            'd:/ymir work/ui/public/small_button_03.sub')
        self.nm7 = self.comp.Button(
            self.Board, '7', '', 10, 98, self.nm7_func,
            'd:/ymir work/ui/public/small_button_01.sub',
            'd:/ymir work/ui/public/small_button_02.sub',
            'd:/ymir work/ui/public/small_button_03.sub')
        self.nm8 = self.comp.Button(
            self.Board, '8', '', 56, 98, self.nm8_func,
            'd:/ymir work/ui/public/small_button_01.sub',
            'd:/ymir work/ui/public/small_button_02.sub',
            'd:/ymir work/ui/public/small_button_03.sub')
        self.nm9 = self.comp.Button(
            self.Board, '9', '', 102, 98, self.nm9_func,
            'd:/ymir work/ui/public/small_button_01.sub',
            'd:/ymir work/ui/public/small_button_02.sub',
            'd:/ymir work/ui/public/small_button_03.sub')
        self.nm0 = self.comp.Button(
            self.Board, '0', '', 56, 122, self.nm0_func,
            'd:/ymir work/ui/public/small_button_01.sub',
            'd:/ymir work/ui/public/small_button_02.sub',
            'd:/ymir work/ui/public/small_button_03.sub')
        self.nmdelete = self.comp.Button(
            self.Board, 'Delete', '', 102, 122, self.nmdelete_func,
            'd:/ymir work/ui/public/small_button_01.sub',
            'd:/ymir work/ui/public/small_button_02.sub',
            'd:/ymir work/ui/public/small_button_03.sub')
        self.nmok = self.comp.Button(
            self.Board, 'OK', '', 33, 149, self.nmok_func,
            'd:/ymir work/ui/public/large_button_01.sub',
            'd:/ymir work/ui/public/large_button_02.sub',
            'd:/ymir work/ui/public/large_button_03.sub')
        self.nmclear = self.comp.Button(
            self.Board, 'Clear', '', 10, 122, self.nmclear_func,
            'd:/ymir work/ui/public/small_button_01.sub',
            'd:/ymir work/ui/public/small_button_02.sub',
            'd:/ymir work/ui/public/small_button_03.sub')
        self.slotbar_nmcode, self.nmcode = self.comp.EditLine(
            self.Board, '', 102, 18, 37, 15, 4)
        self.svstxt = self.comp.TextLine(self.Board, '<svside> Bot Verify', 30,
                                         173, self.comp.RGB(255, 215, 0))
Exemple #7
0
    def __init__(self):
        ui.Window.__init__(self)

        playerSettingModule.LoadGameData("INIT")
        playerSettingModule.LoadGameData("NPC")
        playerSettingModule.LoadGameData("EFFECT")
        playerSettingModule.LoadGameData("ENEMY")
        playerSettingModule.LoadGameData("SKILL")

        self.board = ui.Board()
        self.board.SetCenterPosition()
        self.board.SetSize(300, 100)
        self.board.AddFlag("movable")
        self.board.Show()

        self.guerrero = ui.Button()
        self.guerrero.SetParent(self.board)
        self.guerrero.SetPosition(30, 20)
        self.guerrero.SetUpVisual(
            'd:/ymir work/ui/game/windows/tab_button_small_01.sub')
        self.guerrero.SetOverVisual(
            'd:/ymir work/ui/game/windows/tab_button_small_02.sub')
        self.guerrero.SetDownVisual(
            'd:/ymir work/ui/game/windows/tab_button_small_03.sub')
        self.guerrero.SetEvent(ui.__mem_func__(self.__Guerrero))
        self.guerrero.SetText("Guerrero")
        self.guerrero.Show()

        self.sura = ui.Button()
        self.sura.SetParent(self.board)
        self.sura.SetPosition(70, 20)
        self.sura.SetUpVisual(
            'd:/ymir work/ui/game/windows/tab_button_small_01.sub')
        self.sura.SetOverVisual(
            'd:/ymir work/ui/game/windows/tab_button_small_02.sub')
        self.sura.SetDownVisual(
            'd:/ymir work/ui/game/windows/tab_button_small_03.sub')
        self.sura.SetEvent(ui.__mem_func__(self.__Sura))
        self.sura.SetText("Sura")
        self.sura.Show()

        self.ninja = ui.Button()
        self.ninja.SetParent(self.board)
        self.ninja.SetPosition(110, 20)
        self.ninja.SetUpVisual(
            'd:/ymir work/ui/game/windows/tab_button_small_01.sub')
        self.ninja.SetOverVisual(
            'd:/ymir work/ui/game/windows/tab_button_small_02.sub')
        self.ninja.SetDownVisual(
            'd:/ymir work/ui/game/windows/tab_button_small_03.sub')
        self.ninja.SetEvent(ui.__mem_func__(self.__Ninja))
        self.ninja.SetText("ninja")
        self.ninja.Show()

        self.chamana = ui.Button()
        self.chamana.SetParent(self.board)
        self.chamana.SetPosition(150, 20)
        self.chamana.SetUpVisual(
            'd:/ymir work/ui/game/windows/tab_button_small_01.sub')
        self.chamana.SetOverVisual(
            'd:/ymir work/ui/game/windows/tab_button_small_02.sub')
        self.chamana.SetDownVisual(
            'd:/ymir work/ui/game/windows/tab_button_small_03.sub')
        self.chamana.SetEvent(ui.__mem_func__(self.__Chamana))
        self.chamana.SetText("Chamana")
        self.chamana.Show()

        self.emocion = ui.Button()
        self.emocion.SetParent(self.board)
        self.emocion.SetPosition(30, 60)
        self.emocion.SetUpVisual(
            'd:/ymir work/ui/game/windows/tab_button_small_01.sub')
        self.emocion.SetOverVisual(
            'd:/ymir work/ui/game/windows/tab_button_small_02.sub')
        self.emocion.SetDownVisual(
            'd:/ymir work/ui/game/windows/tab_button_small_03.sub')
        self.emocion.SetEvent(ui.__mem_func__(self.__Emocion))
        self.emocion.SetText("Emocion")
        self.emocion.Show()

        self.normal = ui.Button()
        self.normal.SetParent(self.board)
        self.normal.SetPosition(70, 60)
        self.normal.SetUpVisual(
            'd:/ymir work/ui/game/windows/tab_button_small_01.sub')
        self.normal.SetOverVisual(
            'd:/ymir work/ui/game/windows/tab_button_small_02.sub')
        self.normal.SetDownVisual(
            'd:/ymir work/ui/game/windows/tab_button_small_03.sub')
        self.normal.SetEvent(ui.__mem_func__(self.__Normal))
        self.normal.SetText("Normal")
        self.normal.Show()
    def __MakeBoard(self):
        self.Board = ui.Board()
        self.Board.SetParent(self)
        self.Board.SetSize(self.GetWidth(), self.GetHeight())
        self.Board.SetPosition(0, 0)
        self.Board.AddFlag("movable")
        self.Board.AddFlag("float")
        self.Board.Show()

        self.TitleBar = ui.TitleBar()
        self.TitleBar.SetParent(self.Board)
        self.TitleBar.SetPosition(7, 7)
        self.TitleBar.MakeTitleBar(self.GetWidth() - 2 * 7, 'red')
        self.TitleBar.SetCloseEvent(self.Close)
        self.TitleBar.Show()

        self.RefreshButton = ui.Button()
        self.RefreshButton.SetParent(self.TitleBar)
        self.RefreshButton.SetPosition(3, 3)
        self.RefreshButton.SetUpVisual(
            "d:/ymir work/ui/game/guild/refresh_button_01.sub")
        self.RefreshButton.SetOverVisual(
            "d:/ymir work/ui/game/guild/refresh_button_02.sub")
        self.RefreshButton.SetDownVisual(
            "d:/ymir work/ui/game/guild/refresh_button_03.sub")
        self.RefreshButton.SetToolTipText("Refresh", 0, -23)
        self.RefreshButton.SetEvent(lambda: self.__Fill_Up_ChannelList())
        self.RefreshButton.Show()

        self.TitleText = ui.TextLine()
        self.TitleText.SetParent(self.TitleBar)
        self.TitleText.SetPosition(0, 4)
        self.TitleText.SetText("Channel waehlen")
        self.TitleText.SetWindowHorizontalAlignCenter()
        self.TitleText.SetHorizontalAlignCenter()
        self.TitleText.Show()

        self.ServerName = ui.TextLine()
        self.ServerName.SetParent(self.TitleBar)
        self.ServerName.SetPosition(0, self.TitleBar.GetHeight())
        self.ServerName.SetText(
            str(GFHhg54GHGhh45GHGH.GetServerInfo()).split(",")[0])
        self.ServerName.SetWindowHorizontalAlignCenter()
        self.ServerName.SetHorizontalAlignCenter()
        self.ServerName.Show()

        self.ChannelListBase = ui.SlotBar()
        self.ChannelListBase.SetParent(self.Board)
        self.ChannelListBase.SetSize(self.Board.GetWidth() - 2 * 16,
                                     5 * 18 - 4)
        self.ChannelListBase.SetPosition(
            16, 7 + self.TitleBar.GetHeight() + 6 + 10)
        self.ChannelListBase.Show()

        self.ChannelList = ui.ListBox()
        self.ChannelList.SetParent(self.ChannelListBase)
        self.ChannelList.SetSize(self.ChannelListBase.GetWidth() - 20,
                                 self.ChannelListBase.GetHeight())
        self.ChannelList.SetPosition(0, 0)
        self.ChannelList.SetEvent(ui.__mem_func__(self.__OnSelectChannel))
        self.ChannelList.Show()

        self.ChangeButton = ui.Button()
        self.ChangeButton.SetParent(self.Board)
        self.ChangeButton.SetPosition(self.Board.GetWidth() / 2 - 44,
                                      self.Board.GetHeight() - 35)
        self.ChangeButton.SetUpVisual(
            'd:/ymir work/ui/public/Large_button_01.sub')
        self.ChangeButton.SetOverVisual(
            'd:/ymir work/ui/public/Large_button_02.sub')
        self.ChangeButton.SetDownVisual(
            'd:/ymir work/ui/public/Large_button_03.sub')
        self.ChangeButton.SetEvent(lambda: self.__OnClickConnectButton())
        self.ChangeButton.SetText("Wechseln")
        self.ChangeButton.Show()
        self.DisableChangeButton()

        self.ChannelListScrollBar = ui.ScrollBar()
        self.ChannelListScrollBar.SetParent(self.ChannelListBase)
        self.ChannelListScrollBar.SetPosition(18, 3)
        self.ChannelListScrollBar.SetScrollBarSize(83)
        self.ChannelListScrollBar.SetWindowHorizontalAlignRight()
        self.ChannelListScrollBar.SetScrollEvent(
            ui.__mem_func__(self.__OnScrollChannelList))
        self.ChannelListScrollBar.Show()
Exemple #9
0
    def LoadUI(self):
        settinginfo.SchmiedehandbuchOpen = 1
        self.Board = ui.BoardWithRoofBar()
        self.Board.SetSize(700, 450)
        self.Board.SetCenterPosition()
        self.Board.AddFlag("movable")
        self.Board.AddFlag("float")
        # self.Board.SetTitleName("Schmiedehandbuch")
        self.Board.SetCloseEvent(self.Open)
        self.Board.Hide()
        ############################################################
        ## Navigation
        self.NavBoard = ui.Board()
        self.NavBoard.SetParent(self.Board)
        self.NavBoard.SetPosition(15, 65)
        self.NavBoard.SetSize(210, 485)
        self.NavBoard.HideBottom()
        self.NavBoard.Show()

        self.ForgeGuideBoard = ui.Board()
        self.ForgeGuideBoard.SetParent(self.Board)
        self.ForgeGuideBoard.SetPosition(15, 65)
        self.ForgeGuideBoard.SetSize(210, 485)
        self.ForgeGuideBoard.HideBottom()
        self.ForgeGuideBoard.Show()

        self.itemtooltip = uiToolTip.ItemToolTip()
        self.itemtooltip.HideToolTip()
        i = 0
        x = 12
        button_x = 19
        while i < len(settinginfo.SchmiedeHandBuchInfos[0]):
            self.itemTypeButtons[i] = ui.Button()
            self.itemTypeButtons[i].SetParent(self.NavBoard)
            self.itemTypeButtons[i].SetPosition(25, x)
            self.itemTypeButtons[i].SetText("")
            self.itemTypeButtons[i].SetUpVisual(
                "yamato_helpboard/wide_button_n.tga")
            self.itemTypeButtons[i].SetOverVisual(
                "yamato_helpboard/wide_button_h.tga")
            self.itemTypeButtons[i].SetDownVisual(
                "yamato_helpboard/wide_button_p.tga")
            self.itemTypeButtons[i].SetDisableVisual(
                "yamato_helpboard/wide_button_d.tga")
            self.itemTypeButtons[i].SetEvent(
                ui.__mem_func__(self.LoadCategory), i)
            self.itemTypeButtons[i].Show()
            self.ButtonTitles[i] = ui.TextLine()
            self.ButtonTitles[i].SetParent(self.NavBoard)
            self.ButtonTitles[i].SetPosition(105, button_x)
            self.ButtonTitles[i].SetHorizontalAlignCenter()
            self.ButtonTitles[i].SetText(
                settinginfo.SchmiedeHandBuchInfos[0][i][0][0])
            self.ButtonTitles[i].Show()

            button_x = button_x + 30
            i = i + 1
            x = x + 30

        self.ForgeGuideBoard = ui.Board()
        self.ForgeGuideBoard.SetParent(self.Board)
        self.ForgeGuideBoard.SetPosition(15, x + 65)
        self.ForgeGuideBoard.SetSize(210, 80)
        self.ForgeGuideBoard.HideBottom()
        self.ForgeGuideBoard.Show()

        self.ForgeGuidePVM = ui.Button()
        self.ForgeGuidePVM.SetParent(self.ForgeGuideBoard)
        self.ForgeGuidePVM.SetPosition(25, 15)
        self.ForgeGuidePVM.SetUpVisual("yamato_helpboard/wide_button_n.tga")
        self.ForgeGuidePVM.SetOverVisual("yamato_helpboard/wide_button_h.tga")
        self.ForgeGuidePVM.SetDownVisual("yamato_helpboard/wide_button_p.tga")
        self.ForgeGuidePVM.SetDisableVisual(
            "yamato_helpboard/wide_button_d.tga")
        self.ForgeGuidePVM.SetEvent(ui.__mem_func__(self.LoadForgeGuide), 0)
        self.ForgeGuidePVM.Show()

        self.ForgeGuidePVP = ui.Button()
        self.ForgeGuidePVP.SetParent(self.ForgeGuideBoard)
        self.ForgeGuidePVP.SetPosition(25, 45)
        self.ForgeGuidePVP.SetUpVisual("yamato_helpboard/wide_button_n.tga")
        self.ForgeGuidePVP.SetOverVisual("yamato_helpboard/wide_button_h.tga")
        self.ForgeGuidePVP.SetDownVisual("yamato_helpboard/wide_button_p.tga")
        self.ForgeGuidePVP.SetDisableVisual(
            "yamato_helpboard/wide_button_d.tga")
        self.ForgeGuidePVP.SetEvent(ui.__mem_func__(self.LoadForgeGuide), 1)
        self.ForgeGuidePVP.Show()

        self.ForgeGuidePVMTextLine = ui.TextLine()
        self.ForgeGuidePVMTextLine.SetParent(self.ForgeGuideBoard)
        self.ForgeGuidePVMTextLine.SetPosition(105, 15 + 6)
        self.ForgeGuidePVMTextLine.SetHorizontalAlignCenter()
        self.ForgeGuidePVMTextLine.SetText("PVM")
        self.ForgeGuidePVMTextLine.Show()

        self.ForgeGuidePVPTextLine = ui.TextLine()
        self.ForgeGuidePVPTextLine.SetParent(self.ForgeGuideBoard)
        self.ForgeGuidePVPTextLine.SetPosition(105, 45 + 6)
        self.ForgeGuidePVPTextLine.SetHorizontalAlignCenter()
        self.ForgeGuidePVPTextLine.SetText("PVP")
        self.ForgeGuidePVPTextLine.Show()

        ############################################################
        ## Content
        self.ForgeGuideTitleBoard = ui.Board()
        self.ForgeGuideTitleBoard.SetParent(self.Board)
        self.ForgeGuideTitleBoard.SetPosition(205, 65)
        self.ForgeGuideTitleBoard.SetSize(515, 80)
        self.ForgeGuideTitleBoard.HideBottom()
        self.ForgeGuideTitleBoard.Show()

        self.ForgeGuideBGBoard = ui.Board()
        self.ForgeGuideBGBoard.SetParent(self.Board)
        self.ForgeGuideBGBoard.SetPosition(205, 110)
        self.ForgeGuideBGBoard.SetSize(515, 440)
        self.ForgeGuideBGBoard.HideBottom()
        self.ForgeGuideBGBoard.Show()

        self.ForgeGuideTitleTextLine = ui.TextLine()
        self.ForgeGuideTitleTextLine.SetParent(self.ForgeGuideTitleBoard)
        self.ForgeGuideTitleTextLine.SetPosition(257, 20)
        self.ForgeGuideTitleTextLine.SetHorizontalAlignCenter()
        self.ForgeGuideTitleTextLine.SetText("Schmiedehandbuch - PVM")
        self.ForgeGuideTitleTextLine.SetPackedFontColor(0xffd8a055)
        self.ForgeGuideTitleTextLine.Show()

        i = 0
        x = 120
        trennstrichCounter = 0
        uppitemslots = 0
        while i < 3:
            self.itemBoards[i] = ui.ImageBox()
            self.itemBoards[i].SetParent(self.Board)
            self.itemBoards[i].SetPosition(240 - 15, x)
            self.itemBoards[i].LoadImage(
                "yamato_forgeguide/forge_guide_bg.tga")
            self.itemBoards[i].Show()

            self.itemMainSlots[i] = ui.GridSlotWindow()
            self.itemMainSlots[i].SetParent(self.itemBoards[i])
            self.itemMainSlots[i].ArrangeSlot(i, 1, 1, 32, 96, 0, 0)
            self.itemMainSlots[i].SetPosition(8, 20)
            self.itemMainSlots[i].SetOverInItemEvent(
                ui.__mem_func__(self.ShowToolTipEmpty))
            self.itemMainSlots[i].SetOverOutItemEvent(
                ui.__mem_func__(self.HideToolTipEmpty))
            self.itemMainSlots[i].SetSelectEmptySlotEvent(
                ui.__mem_func__(self.add_slotEmpty))
            self.itemMainSlots[i].SetSelectItemSlotEvent(
                ui.__mem_func__(self.del_slotEmpty))
            self.itemMainSlots[i].Show()

            trenn_y = 40
            for t in xrange(10):
                self.Trennstriche[trennstrichCounter] = ui.ImageBox()
                self.Trennstriche[trennstrichCounter].SetParent(
                    self.itemBoards[i])
                self.Trennstriche[trennstrichCounter].SetPosition(trenn_y, 20)
                self.Trennstriche[trennstrichCounter].LoadImage(
                    "yamato_forgeguide/split.tga")
                self.Trennstriche[trennstrichCounter].Show()
                trenn_y = trenn_y + 45
                trennstrichCounter = trennstrichCounter + 1

            self.UppStufenHeadline[i] = ui.TextLine()
            self.UppStufenHeadline[i].SetParent(self.itemBoards[i])
            self.UppStufenHeadline[i].SetPosition(45, 5)
            self.UppStufenHeadline[i].SetText(
                "   +1            +2           +3           +4           +5           +6           +7           +8           +9"
            )
            self.UppStufenHeadline[i].Show()
            y_slot = 47
            for t in xrange(9):
                x_slot = 20
                for z in xrange(3):
                    self.UppItemsSlots[uppitemslots] = ui.GridSlotWindow()
                    self.UppItemsSlots[uppitemslots].SetParent(
                        self.itemBoards[i])
                    self.UppItemsSlots[uppitemslots].ArrangeSlot(
                        uppitemslots, 1, 1, 32, 32, 0, 0)
                    self.UppItemsSlots[uppitemslots].SetPosition(
                        y_slot, x_slot)
                    self.UppItemsSlots[uppitemslots].SetOverInItemEvent(
                        ui.__mem_func__(self.ShowToolTip))
                    self.UppItemsSlots[uppitemslots].SetOverOutItemEvent(
                        ui.__mem_func__(self.HideToolTip))
                    self.UppItemsSlots[uppitemslots].SetSelectEmptySlotEvent(
                        ui.__mem_func__(self.add_slot))
                    self.UppItemsSlots[uppitemslots].SetSelectItemSlotEvent(
                        ui.__mem_func__(self.del_slot))
                    self.UppItemsSlots[uppitemslots].Show()
                    uppitemslots = uppitemslots + 1
                    x_slot = x_slot + 32
                    if z == 2:
                        y_slot = y_slot + 45

            i = i + 1
            x = x + 132

        self.scrollbar = ui.ScrollBar()
        self.scrollbar.SetParent(self.Board)
        self.scrollbar.SetScrollBarSize(395)
        self.scrollbar.SetPosition(675 + 10, 120)
        self.scrollbar.SetMiddleBarSize(
            float(board_count) / float(
                len(settinginfo.SchmiedeHandBuchInfos[self.ForgeGuide][
                    self.Category][1])))
        self.scrollbar.SetScrollEvent(self.__OnScroll)
        self.scrollbar.Show()
        self.LoadForgeGuide(0)
        self.LoadCategory(0)