Forum Announcement, Click Here to Read More From EA_Cade.

Question: Dialog Inputs via Python Scripting

ScumbumboScumbumbo Posts: 148 Member
edited March 5 in Nominated Threads
OK, I'd figured out how to do a dialog with a text input from the Python scripts via a bit of a hack and used it in the SimLotto mod. I managed to improved on the technique quite a bit last night by instead generating the tuning for the dialog in the script. However, if I try to generate a text input dialog with TWO input boxes using pure scripting, it just displays the dialog with NO text inputs instead. Things are getting at least partially interpreted, as the initial values do get passed to the dialog's callback properly, however no text input boxes appear for the user to type something.

I'm hoping that I'm missing something extremely simple and that someone (perhaps a Guru) can point out my failure.

I can't post code or even URLs on here as I don't have the requisite number of posts, however the thread and a simple test script can be found on ModTheSims at modthesims.info/showthread.php?t=547251

The code is HEAVILY commented to both encourage others who might want to use this technique in mods and also, as I stated, I'm hoping that some Python master can determine what the heck I'm doing wrong to generate two text input boxes.
Post edited by EA_Cade on

Comments

  • SimGuruEugiSimGuruEugi Posts: 503 SimGuru
    If you want two text inputs, you need to remove the icon override. You won't be able to have both on the same dialog. Sorry.
  • ScumbumboScumbumbo Posts: 148 Member
    edited March 2015
    Holy cow, I knew it was probably something simple, but I didn't expect it to be that simple! I can't believe I (apparantly) never tried that!!

    ETA: tried it out with my test dialog and it works great. Thanks!!!!!

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file
Return to top