Python 2.7 pygame中的combobox,python 2.7
如何在pygame(python 2.7)中创建组合框 我不想使用tk或wx或任何其他gui只是pygamePython 2.7 pygame中的combobox,python 2.7,python-2.7,combobox,pygame,Python 2.7,Combobox,Pygame,如何在pygame(python 2.7)中创建组合框 我不想使用tk或wx或任何其他gui只是pygame import pygame class ComboBox(pygame): def __init__(self, items, editable, dropdownWidth, width, value): self.items = items self.editable = editable # True, the user can typ
import pygame
class ComboBox(pygame):
def __init__(self, items, editable, dropdownWidth, width, value):
self.items = items
self.editable = editable # True, the user can type a new value False, the user can only choose from the options
self.dropdownwidth = dropdownWidth
self.width = width
self.value = value # i dont think there is need to
def onSelChange(self, selection):
pass
def onEditChange(self, text):
pass
def onFocus(self, focused):
pass
def onEnter(self):
pass
def refresh(self):
pass
哦,这是个好问题。组合框有相当一点微妙的复杂性。没有组合框,只有选项框或文本输入:或