gui: add simple way to enable overflow in DirectEntry

Closes #236
This commit is contained in:
fireclawthefox 2018-01-24 19:00:34 +01:00 committed by rdb
parent 2347587077
commit f2cf391a2e
1 changed files with 5 additions and 0 deletions

View File

@ -59,6 +59,8 @@ class DirectEntry(DirectFrame):
# Text used for the PGEntry text node
# NOTE: This overrides the DirectFrame text option
('initialText', '', DGG.INITOPT),
# Enable or disable text overflow scrolling
('overflow', 0, self.setOverflowMode),
# Command to be called on hitting Enter
('command', None, None),
('extraArgs', [], None),
@ -159,6 +161,9 @@ class DirectEntry(DirectFrame):
def setCursorKeysActive(self):
PGEntry.setCursorKeysActive(self.guiItem, self['cursorKeys'])
def setOverflowMode(self):
PGEntry.set_overflow_mode(self.guiItem, self['overflow'])
def setObscureMode(self):
PGEntry.setObscureMode(self.guiItem, self['obscured'])