Creating Your Own GUI from Ground-up

SiamSiam Whispered Voice
Hey everyone!

I'm currently interested in putting together my own GUI, or at the very least a window on the left/right side of the screen that I could put things into. I am currently playing on a tiny netbook so the available GUI from the mudlet forums doesn't mesh well with my screen. So, ideally, here's what I want to do:

The GUI I want to put together would basically act like a small window where I could put reminders in, kind of like a chatbox, except instead of copying and pasting directly the game's text, I want it to work like so:

It fires off a line:
Siam hands you potatoes. 

The code then ideally would update the GUI and place this at the bottom of the window:
Siam gave us POTATOES!

I am a bad coder(and the few coding attempts I did from reading the mudlet manual and the mudlet forums ended in semi-disasters, the closest I got to was creating a left oriented column spanning the entire height of the screen, but the 'updates' I placed there were stuck in the middle of the screen instead of the desired chatbox-like behavior) I am revisiting the prospect of creating this GUI and I would like you coding savvy folks' help in approaching the desired outcome. Thank you!
Viravain, Lady of the Thorns shouts, "And You would seize Me? Fool! I am the Glomdoring! I am the Wyrd, and beneath the cloak of Night, the shadows of the Silent stir!"

#bringShikariback 


Comments

  • You want to look either at geyser miniconsoles or just regular miniconsoles.  They display text similarly to how it is displayed in the main output window.

    An example is: 


    function window_setup()

    setBorderLeft(300) -- moving the main output over 300 px

    -- determine the size of your screen

    local WindowWidth

    local WindowHeight

    WindowWidth, WindowHeight = getMainWindowSize()

    createMiniConsole("my_feed", 0,0,0,0)

    resizeWindow("my_feed", 300,WindowHeight) -- 300 px wide, fits to screen vertically

    setBackgroundColor("my_feed",0,0,0,255) -- black

    setWindowWrap( "my_feed", 40) -- wrap lines in window "focus" at 40 characters per line

    setMiniConsoleFontSize("my_feed", 10)

    end

    Then you can echo things there with:

    echo("my_feed", "blah")

    or

    cecho("my_feed", "blah")

    etc.

    Take great care of yourselves and each other.
  • SiamSiam Whispered Voice
    Thanks! :D I've been fiddling around and I'll keep this in mind.
    Viravain, Lady of the Thorns shouts, "And You would seize Me? Fool! I am the Glomdoring! I am the Wyrd, and beneath the cloak of Night, the shadows of the Silent stir!"

    #bringShikariback 


Sign In or Register to comment.