Przeglądaj źródła

Added get and set TextWrap functions

Peter Robinson 4 lat temu
rodzic
commit
b43907f487

+ 17 - 0
engine/source/gui/guiControl_ScriptBinding.h

@@ -337,4 +337,21 @@ ConsoleMethodWithDocs(GuiControl, getText, ConsoleString, 2, 2, ())
 	return object->getText();
 }
 
+/*! Turns on or off text wrap.
+	@param setting True turns on text wrap.
+	@return No return value
+*/
+ConsoleMethodWithDocs(GuiControl, setTextWrap, ConsoleVoid, 3, 3, (setting))
+{
+	object->setTextWrap(dAtob(argv[2]));
+}
+
+/*! Returns if text wrap is on.
+	@return Returns the state of text wrap.
+*/
+ConsoleMethodWithDocs(GuiControl, getTextWrap, ConsoleBool, 2, 2, ())
+{
+	return object->getTextWrap();
+}
+
 ConsoleMethodGroupEndWithDocs(GuiControl)

+ 2 - 2
engine/source/gui/guiTextEditCtrl_ScriptBinding.h

@@ -96,7 +96,7 @@ ConsoleMethodWithDocs(GuiTextEditCtrl, getReturnCausesTab, ConsoleBool, 2, 2, ()
 	return object->getReturnCausesTab();
 }
 
-/*! Sets the sinkAllKeyEvents flag. If true, the tab key will act like the enter key.
+/*! Sets the sinkAllKeyEvents flag.
 	@param setting True to turn on the flag. False otherwise.
 	@return No return value
 */
@@ -113,7 +113,7 @@ ConsoleMethodWithDocs(GuiTextEditCtrl, getSinkAllKeyEvents, ConsoleBool, 2, 2, (
 	return object->getSinkAllKeyEvents();
 }
 
-/*! Sets the password flag. If true, the tab key will act like the enter key.
+/*! Sets the password flag.
 	@param setting True to turn on the flag. False otherwise.
 	@return No return value
 */