Mudlet miniconsoles

i've made my mudlet mapper appear to a specific place like this:

function setMap()

local main = Geyser.Container:new({x=0,y=0,width="100%",height="100%",name="mapper container"})


local mapper = Geyser.Mapper:new({

name = "mapper",

x = 710, y = 10,

width = 250, height = 190

}, main)

end


The mudlet mapper background colour is black and I don't really wanna change it because it might make the other colours used by the map less visible or whatev but I want to see borders on it. Can I use this?


setBorderColor( 0, 255, 0 ) 

and if I can, how do I incorporate it in my above script?
Bleh, work ate my gaming life.
내가 제일 잘 나가!!!111!!1


Comments

  • setBorderColor isn't for miniconsoles, it's for Mudlet borders (that you set in preferences). If you want to change the background color of the map, go to settings, mapper colors, background color.
  • SherazadSherazad Planef Urth
    Odd, it happened again on a fresh profile. Restarting mudlet fixed it though.
    Bleh, work ate my gaming life.
    내가 제일 잘 나가!!!111!!1


  • Can't say I know what you meant. But good it's fixed.
  • SherazadSherazad Planef Urth
    Anyone know how I can make the ire mudlet mapper appear in a miniconsole that repositions depending on your screen? What I have up above doesn't work and I'm hoping to use this.

    WindowWidth = 0;
    WindowHeight = 0;
    WindowWidth, WindowHeight = getMainWindowSize();
    
    createMiniConsole("sys",WindowWidth-650,0,650,300)
    setBackgroundColor("sys",85,55,0,255)
    setMiniConsoleFontSize("sys", 8)
    -- wrap lines in window "sys" at 65 characters per line
    setWindowWrap("sys", 40)
    -- set default font colors and font style for window "sys"
    setTextFormat("sys",0,35,255,50,50,50,0,0,0)

    I just don't know how to put the mapper info part in xD.
    Bleh, work ate my gaming life.
    내가 제일 잘 나가!!!111!!1


  • edited January 2013
    If you want to do it with "basic" Mudlet functions, you have to create a script containing a function to read your new screen size and reposition your miniconsole, and register the sysWindowResizeEvent event for it (I think that's what the event is called, didn't look it up), so it's run every time you resize your Mudlet window.

    The much easier option though is to use one of Mudlet's layout managers, Geyser or Vyzor. I never used Vyzor so I can't tell you exactly how to do it with that, but in Geyser, you can simply define your console like this:

    sysConsole = Geyser.MiniConsole:new({

    name="sys",

    x=-650,

    y=0,

    width=650,

    height=300,

    color={85,55,0},

    fontSize=8,

    wrapAt=40,

    })

    sysConsole:setTextFormat(0,35,255,50,50,50,0,0,0)


    This should create the exactly same console, but it will reposition itself automatically.

  • SherazadSherazad Planef Urth
    Which part does the resizing with geyser? Also which part says hey mudlet mapper, appear in this miniconsole? xD I'm just trying to understand too xD
    Bleh, work ate my gaming life.
    내가 제일 잘 나가!!!111!!1


  • All Geyser elements automatically resize to keep true to their constraints, so no specific part of it.

    You could put a mapper view inside the above console like this:

    map = Geyser.Mapper:new({name="map", x=0, y=0, width="100%", height="100%"}, sysConsole)

    The relevant part here is the second argument of new(), which says "sysConsole". That's where you can indicate for Geyser objects what the "parent" object of the current object you're creating should be. All measurements of an object that has such a parent object are relative to that parent object, so the above code would position the map exactly where the console is and make it stretch over the entire console.
  • SherazadSherazad Planef Urth
    Omg @Iocun sorry, I fail at english. I meant the repositioning with respect to the main window.
    Bleh, work ate my gaming life.
    내가 제일 잘 나가!!!111!!1


  • My answer still applies. Geyser does that automatically for all its objects. If you give some console the x coordinate "-50", then it will always be positioned fifty pixels to the left of your right Mudlet window border, no matter how much you move it around or resize it.
  • SherazadSherazad Planef Urth
    edited January 2013
    ahh :D wow that makes sense. Thanks lots!! 

    Anyways, this is what I have right now, from what Tahquil or someone else reposted from the older forums.

    function setMap()

    local main = Geyser.Container:new({x=0,y=0,width="100%",height="100%",name="mapper container"})


    local mapper = Geyser.Mapper:new({

    name = "mapper",

    x = -300, y = 10,

    width = 285, height = 190

    }, main)

    end


    Just to understand more about this, where is the part that says post map on the miniconsole? I don't know if it has been answered but I'm getting lost in this code speak. 

    Bleh, work ate my gaming life.
    내가 제일 잘 나가!!!111!!1


  • On the container, you mean? The part that says so is there... 

    }, main)

    This makes the Geyser object named "main" the parent object of your mapper object.
  • Woah, I posted something code?
Sign In or Register to comment.