2010-04-10 4 views
0

이미지가 있습니다. 버튼을로드하려고합니다. 이미지를 pygame.image.load 함수를 사용하여로드하고 있습니다. 파이 게임과 함께 pgu gui 라이브러리를 사용하고 있습니다. gui.button을 생성합니다. 이제이 버튼을 이미지 위에 blit해야합니다.파이 게임에서 pgu gui 객체를 블리트 할 수있는 방법

답변

0

는 먼저 이미지 "를 통해"A 앱 컨테이너를 만든 다음과 같이,이 프레임에있는 버튼을 추가합니다 :

from pgu import gui 
    my_app = gui.App() 
    my_container = gui.Container(width =1200,height = 900)#or whatever width, height you wish 
    my_button = gui.Button("Quit") 
    app.connect(gui.QUIT,app.quit,None) 

    ##The button CLICK event is connected to the app.close method. 

    my_button.connect(gui.CLICK,app.quit,None) 
    my_container.add(my_button,100,100)' 

도움이 되었기를 바랍니다.

관련 문제