|
@@ -40,13 +40,17 @@ TextInputPopup::TextInputPopup() : UIWindow(L"", 300, 80) {
|
|
|
okButton->setPosition(padding+300-100, 64);
|
|
okButton->setPosition(padding+300-100, 64);
|
|
|
|
|
|
|
|
closeOnEscape = true;
|
|
closeOnEscape = true;
|
|
|
-
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
void TextInputPopup::setCaption(String caption) {
|
|
void TextInputPopup::setCaption(String caption) {
|
|
|
setWindowCaption(caption);
|
|
setWindowCaption(caption);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+void TextInputPopup::onGainFocus() {
|
|
|
|
|
+ focusChild(textInput);
|
|
|
|
|
+ textInput->selectAll();
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
String TextInputPopup::getValue() {
|
|
String TextInputPopup::getValue() {
|
|
|
return textInput->getText();
|
|
return textInput->getText();
|
|
|
}
|
|
}
|
|
@@ -93,6 +97,10 @@ MessagePopup::~MessagePopup() {
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+void MessagePopup::onGainFocus() {
|
|
|
|
|
+ focusChild(okButton);
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
void MessagePopup::setCaption(String caption) {
|
|
void MessagePopup::setCaption(String caption) {
|
|
|
captionLabel->setText(caption);
|
|
captionLabel->setText(caption);
|
|
|
|
|
|
|
@@ -141,6 +149,10 @@ YesNoPopup::YesNoPopup() : UIWindow(L"", 300, 80) {
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+void YesNoPopup::onGainFocus() {
|
|
|
|
|
+ focusChild(okButton);
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
void YesNoPopup::setCaption(String caption) {
|
|
void YesNoPopup::setCaption(String caption) {
|
|
|
captionLabel->setText(caption);
|
|
captionLabel->setText(caption);
|
|
|
|
|
|
|
@@ -173,6 +185,10 @@ YesNoPopup::~YesNoPopup() {
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+void YesNoCancelPopup::onGainFocus() {
|
|
|
|
|
+ focusChild(okButton);
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
YesNoCancelPopup::YesNoCancelPopup() : UIWindow(L"", 300, 80) {
|
|
YesNoCancelPopup::YesNoCancelPopup() : UIWindow(L"", 300, 80) {
|
|
|
|
|
|
|
|
captionLabel = new UILabel("This is a caption", 12);
|
|
captionLabel = new UILabel("This is a caption", 12);
|
|
@@ -331,6 +347,10 @@ AssetImporterWindow::AssetImporterWindow() : UIWindow("3D Asset Importer", 650,
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+void AssetImporterWindow::onGainFocus() {
|
|
|
|
|
+ focusChild(okButton);
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
void AssetImporterWindow::handleEvent(Event *event) {
|
|
void AssetImporterWindow::handleEvent(Event *event) {
|
|
|
if(!enabled) {
|
|
if(!enabled) {
|
|
|
return;
|
|
return;
|