Prep ent
This commit is contained in:
21
tools/editortool/cutscene/cutscenetext.py
Normal file
21
tools/editortool/cutscene/cutscenetext.py
Normal file
@@ -0,0 +1,21 @@
|
||||
from PyQt5.QtWidgets import QWidget, QVBoxLayout, QLabel, QTextEdit
|
||||
from PyQt5.QtCore import Qt
|
||||
|
||||
class CutsceneTextEditor(QWidget):
|
||||
def __init__(self, parent=None):
|
||||
super().__init__(parent)
|
||||
layout = QVBoxLayout(self)
|
||||
layout.setContentsMargins(0, 0, 0, 0)
|
||||
layout.setSpacing(0)
|
||||
label = QLabel("Text:")
|
||||
label.setSizePolicy(label.sizePolicy().Expanding, label.sizePolicy().Fixed)
|
||||
layout.addWidget(label)
|
||||
self.textInput = QTextEdit()
|
||||
self.textInput.setSizePolicy(self.textInput.sizePolicy().Expanding, self.textInput.sizePolicy().Expanding)
|
||||
layout.addWidget(self.textInput, stretch=1)
|
||||
|
||||
def setText(self, text):
|
||||
self.textInput.setPlainText(text)
|
||||
|
||||
def getText(self):
|
||||
return self.textInput.toPlainText()
|
||||
Reference in New Issue
Block a user