Welcome to the Achaea Forums! Please be sure to read the Forum Rules.

MiniConsole Help

CaelanCaelan Member Posts: 1,390 @ - Epic Achaean
Just wondering how I make the miniconsole windows into a container like the MMapper so I can move them around my screen and resize them.  Any help would be much appreciated.

Comments

  • CaelanCaelan Member Posts: 1,390 @ - Epic Achaean
    Also..  How do I get it to wrap with the Geyser.Miniconsole.GetWrap stuff?

  • VessilVessil Member Posts: 51 ✭✭ - Stalwart
    edited October 2016

    If I'm understanding your first question, you're asking how you could set it up so you could drag your mouse to resize the windows? Unfortunately, it's not really possible at this time with the limited mouse-related functions available to you in Mudlet. It's not entirely out of the question to eventually work some functionality in like that by messing with the source, but it's a bigger project than I've taken on so far.

    Your alternatives would be to set up something like Zulah's Gui has that lets you modify x, y, width, and height via buttons built into the Gui, or the way I initially set up my Gui by making macros to move your elements around and resize them with your numpad, since I really preferred that to using the mouse.

    The following is the script I use for the dialogbox that I configure stuff with. See dialogInit() and dialogResize() for examples on how I set the wrap width and dynamically resize it based on main window size(you could use a variable that you). Also, when I wrote the resize thing, I found that I had to move the window AFTER resizing it to get the resize to kick in. 

    http://hastebin.com/umemugejel.lua

    Example:



    If you're really, really hoping to move things with the mouse, you could make use of the event that gets fired when the mouse clicks on the main scrollback window, but it doesn't fire if you click on your own gui elements like labels, so you'd have to hide everything temporarily if you wanted to let the user click where they want the window to be, and even then there would be no way to display the window while you're picking a new spot so you can see how it fits with other things, so that's not really very viable. Uncomment the --display and --registerAnonymousEventHandler lines in this code and drop it in a script if you want to see an example of limitations of the mouse click event:


    --mouseTest--------------------------------------
    -- --
    -------------------------------------------------
    function echoMouseTest(...)
    -- display(arg)
    end
    --registerAnonymousEventHandler("sysWindowMousePressEvent", "echoMouseTest")

  • VessilVessil Member Posts: 51 ✭✭ - Stalwart
    edited October 2016
    Actually, I guess I'll point out UserWindows as well, since they do exist, I just don't think many people use them. They're similar to mapper in drag/drop/docking functionality, but they work basically as miniconsoles. You can't move or resize them via script though, so they'll initialize at some weird size and location every time, and I'd imagine there are some other limitations in place.

    The following code:

    openUserWindow("testUW")
    clearUserWindow("testUW")
    cecho("testUW", "<red>This is a ")
    fg("testUW", "pink")
    echoLink("testUW", "TESTLINK", [[send("echo testlink successfully clicked")]], "Blah", true)

    Gives me the following:




    I might dig a little to see if it would be difficult to add functions to position them when you create them rather than having them spawn like, docked to the far right(weird behavior). Might be way out of my league, might be small and manageable. *shrug

  • CaelanCaelan Member Posts: 1,390 @ - Epic Achaean
    Vessil said:

    If I'm understanding your first question, you're asking how you could set it up so you could drag your mouse to resize the windows?

    Basically this.  Like when I open Mudlet Mapper, it is resizable and I can move it to my third monitor.  I would like to move my other "miniconsoles" to the 3rd monitor as well so I have nothing else.  But despite having an extended desktop, Adding x = "125%", y = "5%" doesn't push it to the third monitor... 

    I will try the user window thing and see if that does anything close to what I need


  • VessilVessil Member Posts: 51 ✭✭ - Stalwart
    Yeah, userwindow should be the closest thing to what you're looking for. That said, it's got issues. If you use the X to close the window, it appears that you can never cause it to show up again. Also, it does allow you to drag it out of the window. It does NOT show up as its own window in the Windows taskbar, meaning no making it always-on-top without making the main Mudlet window always-on-top.
  • CalaurnCalaurn Member Posts: 59 ✭✭✭ - Distinguished
    Right click on the menu or toolbar and you'll see a menu listing all userwindows (it helps to distinguish if you give them names). Click the unchecked ones to show them again.
    VessilCaelan
  • CaelanCaelan Member Posts: 1,390 @ - Epic Achaean
    Vessil said:
    Yeah, userwindow should be the closest thing to what you're looking for. That said, it's got issues. If you use the X to close the window, it appears that you can never cause it to show up again. Also, it does allow you to drag it out of the window. It does NOT show up as its own window in the Windows taskbar, meaning no making it always-on-top without making the main Mudlet window always-on-top.
    Yeah.. I couldn't remember what it was called originally, and UserWindow was exactly what I was looking for.  Got it all sorted and figured out WordWrap and everything.  Thanks for the reminder about the damn things!

    Also, what Calaurn said.  Discovered that a while back by accident.

  • SzanthaxSzanthax San DiegoMember Posts: 1,906 @ - Epic Achaean
    What is this foreign language you are speaking



Sign In to Comment.