GameMaker Studio 2 (2.3)
Icon

Textbox - Single line

Theask

You must be logged in to obtain assets

Description

If you need to use a multi-line text editor, please click https://marketplace.yoyogames.com/assets/10090.

This is an open source asset package that allows arbitrary use, modification and dissemination. Before introducing the asset pack, what you need to know is that due to the characteristics of GMS2, ​​when you enter characters other than Basic Latin Characters in the full screen state, the game will automatically switch to the window state. I have not found a solution for this.

Next is a detailed description about it:

  1. Automatically maintain the center in the vertical direction of the operating area.
  2. Use the textbox_create(); function to create a text box and define the operation area, initial text, placeholder text and upper limit of the number of words.
  3. Use the textbox_set_font(); function to modify the font, color, line height, and vertical correction value.
  4. Use the textbox_set_position(); function to modify the coordinates of the text box.
  5. Use the mouse wheel to scroll the text area horizontally.
  6. Click the left mouse button to move the cursor.
  7. Long press the left mouse button and drag to select text.
  8. Use the arrow keys to move the cursor, long press is supported.
  9. Long press Shift and use the arrow keys to select text.
  10. Press Backspace to delete, long press is supported.
  11. Press Delete to delete to the right, long press is supported.
  12. Press Crtl + A to select all.
  13. Press Ctrl + C to copy.
  14. Press Ctrl + X to cut.
  15. Press Crtl + V to paste.
  16. Press Ctrl + Z to undo.
  17. Press Ctrl + Y to redo.
  18. Press Home to return the cursor to the beginning of the line.
  19. Press Shift + Home to select the cursor from the current position to the beginning of the line.
  20. Press End to move the cursor to the end of the line.
  21. Press Shift + End to select the cursor from the current position to the end of the line.

如果你需要使用多行文本编辑器,请点击https://marketplace.yoyogames.com/assets/10090

这是一个开源资产包,允许任意使用、修改和传播,但禁止贩卖。 在介绍该资产包之前,你需要知道的是,由于GMS2的特性,当你在全屏状态下输入除基本拉丁字符以外的字符时,游戏会自动切换为窗口状态,对此我目前没有找到解决方法。

接下来是关于它的详细描述:

  1. 自动在操作区域的垂直方向上保持居中。
  2. 使用 textbox_create(); 函数创建文本框并定义操作区域、初始文本、占位文本和字数上限。
  3. 使用 textbox_set_font(); 函数修改字体、颜色、行高、垂直修正值。
  4. 使用 textbox_set_position(); 函数修改文本框的坐标。
  5. 通过鼠标滚轮使文本区域水平滚动。
  6. 点击鼠标左键移动光标。
  7. 长按鼠标左键并拖动以选择文字。
  8. 使用方向键移动光标,支持长按。
  9. 长按 Shift 并使用方向键以选择文字。
  10. 按下 Backspace 删除,支持长按。
  11. 按下 Delete 向右删除,支持长按。
  12. 按下 Crtl + A 全选。
  13. 按下 Ctrl + C 复制。
  14. 按下 Ctrl + X 剪切。
  15. 按下 Crtl + V 粘贴。
  16. 按下 Ctrl + Z 撤回。
  17. 按下 Ctrl + Y 重做。
  18. 按下 Home 使光标回到行开头。
  19. 按下 Shift + Home 使光标从当前位置选择到行开头。
  20. 按下 End 使光标前往行结尾。
  21. 按下 Shift + End 使光标从当前位置选择到行结尾。

End User Licence Agreement (EULA).

Age Rating: 4+

Version

GMS2.3 - Version 1.0.4. Published October 29, 2021

The surface will be automatically cleaned up when the object is destroyed or the room ends to prevent memory leaks. 在对象被销毁或房间结束时将自动清理surface,以阻止内存泄漏。

Loading, please wait

Package contents

Loading, please wait

What is the issue?

Loading, please wait