main.py 文件源码

python
阅读 24 收藏 0 点赞 0 评论 0

项目:ETC_Modes 作者: critterandguitari 项目源码 文件源码
def draw(screen, etc):
    global string, word, color, scrollX, gs, text, size

    size = int(etc.knob1*200)+1
    color = etc.color_picker()
    font = pygame.freetype.Font(etc.mode_root + "/font.ttf", size)
    (text, textpos1) = font.render(string, color)

    if etc.audio_trig or etc.midi_note_new : 
        string = unicode(subjList[random.randint(0,3)]) + unicode(verbList[random.randint(0,5)]) +unicode(artList[random.randint(0,3)]) + unicode(adjList[random.randint(0,4)]) +unicode(nounList[random.randint(0,6)])
        gs = 1
        scrollX = 1280 + text.get_width() 


    if gs == 1 and size > 0 :
        font = pygame.freetype.Font(etc.mode_root + "/font.ttf", size)
        #audio movement
        textpos1 =(scrollX - (text.get_width()+1), (int(600 * etc.knob2)) )

    screen.blit(text, textpos1)
    scrollX = scrollX - (etc.knob3*40) + 1
    if scrollX < 1 : scrollX = 1
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号