• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Asset - Extension Text Inputs - GM Studio 2

Dragon47

Member


Demo: https://1drv.ms/u/s!AppH38QcoEBfiKVFbF-SFrlkQCoQbQ


Poor input boxes make your game look and feel unprofessional, and can ruin the important first impression of a player. But they're a pain to program properly. With this text input extension you can avoid dozens of hours of UI programming, and get high quality text inputs in an instant!

This is the GM Studio 2 version of Text Inputs. Click here for the GM Studio 1 version.

Features:
  • Singleline and multiline text input.
  • Horizontal and vertical text alignment.
  • Text selection (with mouse, shift, Ctrl + A, and doubleclick).
  • Text navigation (with mouse, arrow keys, home/end and page up/down with Ctrl functionality).
  • Copying, cutting and pasting.
  • Local undo/redo memory. Ctrl + Z and Ctrl + Y (as well as Ctrl + Shift + Z).
  • Delete and backspace with Ctrl functionality.
  • Supports both monospaced and variable-width fonts.
  • Custom cursor sprite and cursor styles.
  • Commented and organized code.
  • Fast and optimized, made with efficiency in mind.
  • Logic and display separation.
  • Irrespective of room speed, dependent on delta_time (and easily convertable to other game loops if need be).
  • All GML.
  • Supports octothorps (#).
Marketplace link: https://marketplace.yoyogames.com/assets/5604/text-inputs-gm-studio-2

Screenshots from marketplace:





More:




 
Last edited:

Dragon47

Member
How to change the text height?
Do you mean the height of the bounding area of the text? You can't change that, but what you can do is to set the height to a large value, and then obtain the current height of the written text with the input_text_get_text_height script (or whatever I called it), to draw an appropriate box behind it. If that's the goal. Not exactly sure what you mean.
 

swompy

Member
How good does it work for html5 you said its made for windows but can work on other Platforms does the basic functions work on html5 export ?
 

Dragon47

Member
How good does it work for html5 you said its made for windows but can work on other Platforms does the basic functions work on html5 export ?
Hard to remember details, but the GMS 1 version should work with HTML5 I think. I don't think I've tested HTML5 on GMS 2, which is why I can't guarantee anything. My guess is that something will mess up, but I'm not sure.
 
Hi!
Would this asset work with dynamically changing size textboxes? As in, if I make a textbox change its size in real time, like a window in Windows, would the text in it change accordingly and not crash the program?
 

Dragon47

Member
Hi!
Would this asset work with dynamically changing size textboxes? As in, if I make a textbox change its size in real time, like a window in Windows, would the text in it change accordingly and not crash the program?
I don't think this is possible, but an alternative is that you can probably copy the text with input_text_get_text and create a new input box with that text in it every time you drag. Your cursor position or text selection wouldn't be kept, but maybe that is fine?
 

TGV

Member
Hello,

I recently purchased your text inputs asset and was wondering how I could update the x and y coordinates for the drawn text to the x and y coordinates of another object or the mouse_x and mouse_y coordinates.
 

Dragon47

Member
Hello,

I recently purchased your text inputs asset and was wondering how I could update the x and y coordinates for the drawn text to the x and y coordinates of another object or the mouse_x and mouse_y coordinates.
Hi! See input_text_set_transformation :)
 
  • Like
Reactions: TGV
Top