How to get tkinter in bge? Or what alternative should I be using?

Hey guys,

So I have a click event attached to one of my objects so that when it is clicked, a message box shows up. Here is the code for that

import bge
import ctypes

#.... detect the click
        ctypes.windll.user32.MessageBoxA(0, "Your text", "Your title", 1)

Anyway, this is the type of functionality I want but I want to be able to have the user input a value in a textbox, click “Ok”, and then send that back to the bge.

Is this even possible? I thought that using tkinter would work for this, but I read that tkinter isn’t included with blender’s python bundle, so how would I get tkinter installed to blender?

Or, if there is a better way I can get input into the bge from some sort of simple gui form, please let me know.


here ->

I’ll definitely look into this. Would you by chance have a sample blend that uses this?

This one does it:

An awesome demo by martinsh.
Hope it helps.

No, but you could search the forum.

Is there a specific reason you don’t want to use overlay scenes?

I guess I could try with overlay scenes but I just thought this might be simpler to implement… Thanks for all the feedback guys

Bgui has moved to GitHub:

The repository contains some examples. There is also a getting started tutorial in the docs: