so im making a zork like game for a school project thats gotta be submitted soon, and im mainly using tkinter. i figured out scrolltext, but im still confused on changing like, details about the text and background such as font, color, and also on how to add images made of text or just straight up images. I also want moments where the user can add input and receive output based on that input [similar to actual zork] but i cant figure out how ;-;
basically i want this game to look like zork, but all in a window and with the occasional image in between the text
any help would be appreciated! [esp considering ive got like…a few days lefts for this] i hope i worded all of this properly…
For this sort of rich text, you’ll need a tk.Text widget, which is what it sounds like you have. Tkinter is a wrapper around the Tk toolkit which uses a different programming language - so you’ll want to look at that documentation to see all the things you can do, then look at the widget methods to translate it to Python.
For text formatting, the way the Text widget works is that you first call widget.tag_configure("name", option=...) to define a ‘tag’ with specific formatting options. Then when adding text you specify one or more tags to apply to the text (insert() takes them as parameters for example).
For images it’s a little trickier, you need to make a tkinter.PhotoImage() object to load the image, then pass it to widget.image_create(location, image=your_image) to place it in the text at some location.