Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to "verify" your details, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.
 Entire forum ➜ MUSHclient ➜ Miniwindows ➜ MiniWindows [House of Ghouls]

MiniWindows [House of Ghouls]

It is now over 60 days since the last post. This thread is closed.     Refresh page


Pages: 1 2  3  

Posted by Darwin   USA  (125 posts)  Bio
Date Sat 09 Aug 2008 07:16 AM (UTC)

Amended on Sat 09 Aug 2008 09:32 AM (UTC) by Darwin

Message
This is just to show the progress I've been making with these miniwindows. These are listed in order of creation.

This is the first version of a status bar.
http://i171.photobucket.com/albums/u302/bin_recycled/HoG_MUSHclient_statusbars.png

Wider and across the bottom somewhat.
http://i171.photobucket.com/albums/u302/bin_recycled/HoG-MUSHclient-StatusBar.png

Basics of a compass. This one only lights up the obvious exits.
http://i171.photobucket.com/albums/u302/bin_recycled/HoG_Compass.png
http://i171.photobucket.com/albums/u302/bin_recycled/HoG_Compass_2.png

Now able to move the text output window, the statusbar is a bit taller with some more information displayed on it. Compass window lights up obvious exits, has tool-tip for each lit up direction and is clickable to move in that direction.
http://i171.photobucket.com/albums/u302/bin_recycled/HoG_GUI_01.png

First draft of a 'Who is Online' window. Window features hotspots across player names that will show level, name and title within a tool-tip pop-up.
http://i171.photobucket.com/albums/u302/bin_recycled/HoG_GUI_02.png

First draft of adding window decorations, first applied to the 'Who is Online' window, adds a small button in a title bar that will roll-up or roll-down the window. Two screen shots are combined here to display rolled up and rolled down. The window has been moved to the right of the text output window a little.
http://i171.photobucket.com/albums/u302/bin_recycled/HoG_GUI_Who_Window_BOTH.png

Applying window decorations to both the Compass window and Who window. Rollup button is functional on both windows. Both rolled down in this image.
http://i171.photobucket.com/albums/u302/bin_recycled/HoG_GUI_03.png

Same as previous but both rolled up in this image.
http://i171.photobucket.com/albums/u302/bin_recycled/HoG_GUI_04.png

More info added to the tool-tip pop-up for the Who window.
http://i171.photobucket.com/albums/u302/bin_recycled/HoG_GUI_05.png

Added clickable border regions to the window decorations. Windows can be clicked on their edges to be moved around on the screen.
http://i171.photobucket.com/albums/u302/bin_recycled/HoG_GUI_06.png

I'd appreciate any constructive criticism or suggestions for improvements. What I'm doing is creating a function that windows are handed to and then window decorations are applied. I will be attempting to add scroll bars in some manner to these decorations.

Comments?

On a side note, perhaps we should have a Wini-windows topic in the MUSHclient forum. I'm sure these will become very interesting.

Edit: Added descriptions for the images.
Top

Posted by Nick Gammon   Australia  (23,068 posts)  Bio   Forum Administrator
Date Reply #1 on Sat 09 Aug 2008 07:50 AM (UTC)
Message
They look great! It is good to see someone taking the ideas presented and turning them into something concrete. Your plugins have a different "look and feel" to the ones I did, which is exactly what you want. If each MUD has its own flavour of windows effectively they can make a distinct "look" for themselves.

I see you used the "?" idea on your compass window - I presume that is for configuring. I was thinking that from the players' perspective, if you let them change things like the colour, font, and position, they feel more in control of their individual experience, and thus more empowered.

The status bars with text over them look good. I think in time we will probably move towards more subtle colour schemes, although I am probably the worst offender when it comes to wanting to "show off" all the different colours. ;)

If you are making a lot of plugins consider using the "plugin installer" plugin I wrote a little while back (http://www.gammon.com.au/forum/?id=8767) - that lets you release new plugins and have them pretty-much auto-install.

Quote:

perhaps we should have a Wini-windows topic in the MUSHclient forum


Good idea - I have done that and moved the relevant posts into it.


- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Darwin   USA  (125 posts)  Bio
Date Reply #2 on Sat 09 Aug 2008 08:19 AM (UTC)
Message
Quote:
I see you used the "?" idea on your compass window - I presume that is for configuring.

No, that's actually for one of those "Somewhere" exits that players can happen across. It won't enter a direction if clicked and neither will the "None" exit, but all the others will will as long as they're lit up.

Quote:
I think in time we will probably move towards more subtle colour schemes

The colors I'm using now are really on there to show that stuff is working correctly. I highly doubt they will remain in the finished product.
Top

Posted by Darwin   USA  (125 posts)  Bio
Date Reply #3 on Sat 09 Aug 2008 08:56 AM (UTC)
Message
http://i171.photobucket.com/albums/u302/bin_recycled/HoG_GUI_06.png

Here I've added the ability to move a window around the screen by clicking on the decoration border to move left, up, right or down. This adds a little more work, but I'll be cutting that down soon.
Top

Posted by Nick Gammon   Australia  (23,068 posts)  Bio   Forum Administrator
Date Reply #4 on Sat 09 Aug 2008 09:37 PM (UTC)
Message
Well you have shown it can be done. Bear in mind my remarks that the docking idea was supposed to automate the window positioning, so once you let people move them you have to work out what to do if they move a window, and then resize their main window.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Darwin   USA  (125 posts)  Bio
Date Reply #5 on Sat 09 Aug 2008 10:50 PM (UTC)
Message
The way I have it working is that when the window is created, it inherits a metatable to load left and top offsets, then when one of the border 'move window' areas are clicked, it will either add or subtract 1 from the offset.

-- table to keep track of window movements
WinMove = {}
WinMove.prototype = { MoveLeft = 0, MoveUp = 0 }
WinMove.mt = {}
WinMove.mt.__index = function(table, key)
    return WinMove.prototype[key]
end

Window = {}

-- default values if none supplied
Window.prototype = {
    Name = tostring(os.time()),
    Left = 0,
    Top = 0,
    Width = 0,
    Height = 0,
    Position = 6,
    Flags = 0,
    BackgroundColour = ColourNameToRGB("slategray"),
    }

Window.mt = {}
Window.mt.__index = function(table, key)
    return Window.prototype[key]
end

function Window.new( win )
    setmetatable(win, Window.mt)
    -- if the table doesn't exits, this window has not been created before
    if WinMove[win.Name] == nil then
        WinMove[win.Name] = {}
        setmetatable(WinMove[win.Name], WinMove.mt)
    end

    -- create window with default or provided values
    WindowCreate ( win.Name, win.Left, win.Top, win.Width, win.Height, win.Position, win.Flags, win.BackgroundColour )

    return win
end

-- calculate window's new left position if it has been moved
function Window.left( win, original_left, move_width )
    return original_left + (move_width * WinMove[win].MoveLeft)
end

-- calculate window's new top position if it has been moved
function Window.top( win, original_top, move_height )
    return original_top + (move_height * WinMove[win].MoveUp)
end

Top

Posted by Darwin   USA  (125 posts)  Bio
Date Reply #6 on Sat 09 Aug 2008 10:50 PM (UTC)
Message
Next is the window decorations and redisplaying of windows if they've been moved.

-- table to put all the windows in, called when decoration hotspots are clicked
Show = {}

-- function to add window decorations: 
-- title bar, rollup/rolldown button and click-to-move borders
function Window.decorate(name, title, pos, font)
    if name == nil then	return end -- no window, don't try anything
    -- set default values
    title = title or ""
    pos = pos or 0
    font = font or "f" -- this assumes a default "f" font is defined
    -- cap should always be either "Rollup" or "Rolldown"
    cap = WinStatus[name] or "Rollup"
 
    -- get info on provided font and window
    FontHeight      = WindowFontInfo(name, font, 1)
    FontWidth       = WindowTextWidth(name, font, title, false)
    WinLeft         = WindowInfo(name, 1)  -- 1: Left (from WindowCreate)
    WinTop          = WindowInfo(name, 2)  -- 2: Top (from WindowCreate)
    WinWidth        = WindowInfo(name, 3)  -- 3: Width
    WinHeight       = WindowInfo(name, 4)  -- 4: Height
    WinShow         = WindowInfo(name, 5)  -- 5: Show flag
    WinVisible      = WindowInfo(name, 6)  -- 6: Is it hidden right now?
    WinLayout       = WindowInfo(name, 7)  -- 7: Layout position code
    WinFlags        = WindowInfo(name, 8)  -- 8: Flags
    WinBackground   = WindowInfo(name, 9)  -- 9: Background colour
    WinWhereLeft    = WindowInfo(name, 10) -- 10: Where it is right now: left
    WinWhereTop     = WindowInfo(name, 11) -- 11: Where it is right now: top
    WinWhereRight   = WindowInfo(name, 12) -- 12: Where it is right now: right
    WinWhereBottom  = WindowInfo(name, 13) -- 13: Where it is right now: bottom 

    -- create title bar gradient
    WindowGradient (name, 0, 0, WinWidth, FontHeight,
                ColourNameToRGB ("blue"), 
                ColourNameToRGB ("lightblue"), 
                1)  -- left to right

    -- display window title
    if title ~= "" then -- it has a title
        if pos == 0 then -- left justify title
            WindowText( name, font, title, 5 , 0, 0, 0, ColourNameToRGB("orange"), false)
        elseif pos == 1 then -- center title between button and left
            WindowText( name, font, title, ((WinWidth-FontHeight)-FontWidth)/2, 0, 0, 0, ColourNameToRGB("orange"), false)
        elseif pos == 2 then -- right justify - left of button
            WindowText( name, font, title, WinWidth-(FontWidth+FontHeight+4), 0, 0, 0, ColourNameToRGB("orange"), false)
        else -- got some unsupported value, default to left justify
            WindowText( name, font, title, 5 , 0, 0, 0, ColourNameToRGB("orange"), false)
        end
    end


    -- create rollup/down button and hotspot for it
    WindowRectOp( name, 5, (WinWidth-FontHeight)-3, 3, -3, FontHeight-3, 5, 15 + 0x0800)
    WindowAddHotspot(name, name..":"..cap, (WinWidth-FontHeight)-4, 4, -4, FontHeight-4, "", "", "", "", "decoration_mouseup", cap.." Window", 1, 0)	

    -- draw window border
    WindowLine( name, 0, 0, 0, 0-WinHeight, ColourNameToRGB("white"), 0, 3)
    WindowLine( name, 0, 0, 0-WinWidth, WinHeight, ColourNameToRGB("white"), 0, 3)
    WindowLine( name, 0, WinHeight, WinWidth, WinHeight, ColourNameToRGB("white"), 0, 3)
    WindowLine( name, WinWidth, 0, WinWidth, WinHeight, ColourNameToRGB("white"), 0, 3)
    WindowLine( name, 0, FontHeight, 0, FontHeight, ColourNameToRGB("white"), 0, 2)

    -- create 'move window' hotspot areas
	-- creates hotspot id with window name and action to take
    WindowAddHotspot(name, name..":MoveLeft", 0,5,5,-5, "", "", "", "", "decoration_mouseup", "Move Window Left", 1, 0)
    WindowAddHotspot(name, name..":MoveRight", WinWidth-5,5,0,-5, "", "", "", "", "decoration_mouseup", "Move Window Right", 1, 0)
    WindowAddHotspot(name, name..":MoveUp", 0,0,WinWidth-5,5, "", "", "", "", "decoration_mouseup", "Move Window Up", 1, 0)
    WindowAddHotspot(name, name..":MoveDown", 5,WinHeight-5,WinWidth-5,0, "", "", "", "", "decoration_mouseup", "Move Window Down", 1, 0)

end

function decoration_mouseup(flags, hotspot_id)
    -- parse out the window name and action to take
    Win, action	= string.match(hotspot_id, "^([%a_]+):(%a+)")

    if action == "Rollup" then
        WinStatus[Win] = "Rolldown"
    elseif action == "Rolldown" then
        WinStatus[Win] = "Rollup"
    elseif action == "MoveUp" then
        WinMove[Win].MoveUp = WinMove[Win].MoveUp - 1
    elseif action == "MoveLeft" then
        WinMove[Win].MoveLeft = WinMove[Win].MoveLeft - 1
    elseif action == "MoveDown" then
        WinMove[Win].MoveUp = WinMove[Win].MoveUp + 1
    elseif action == "MoveRight" then
        WinMove[Win].MoveLeft = WinMove[Win].MoveLeft + 1
    end
    -- redraw the window by recreating it
    Show[Win]()
end

Top

Posted by Darwin   USA  (125 posts)  Bio
Date Reply #7 on Sat 09 Aug 2008 11:13 PM (UTC)
Message
Here is how I display the compass window.
-- initialize exits table with color and text to display
exits = {
    ["up"]        = {c=0, t="Up"},
    ["north"]     = {c=0,t="North"},
    ["west"]      = {c=0,t="West"},
    ["east"]      = {c=0,t="East"},
    ["south"]     = {c=0,t="South"},
    ["down"]      = {c=0,t="Down"},
    ["northeast"] = {c=0,t="NE"},
    ["northwest"] = {c=0,t="NW"},
    ["southeast"] = {c=0,t="SE"},
    ["southwest"] = {c=0,t="SW"},
    ["somewhere"] = {c=0,t="?"},
    ["none"]      = {c=0,t="None"}
    }

-- Compass window
function Show.HoG_Compass_Window()
    win = "HoG_Compass_Window"
    WinStatus[win] = WinStatus[win] or "Rollup"
    -- reset all exits
    for k,v in pairs(exits) do
        v.c = ColourNameToRGB("black")
        v.show = false
    end
    -- create temp window to get font information
    Window.new{ Name=win }
    WindowFont (win, "f", "Courier New", 8, false, false, false, false)
    WindowFont (win, "F", "Courier New", 8, true, false, false, false)
    height = WindowFontInfo (win, "f", 1)
    leading = WindowFontInfo (win, "f", 4)
    fheight = WindowFontInfo (win, "f", 1)
    fwidth = WindowTextWidth(win, "f", " ")

    winheight = height -- rolled up height
    if WinStatus[win] == "Rollup" then
        winheight = 123 -- rolled down height
    end
    
    -- original window positions
    window_left = 15 + (GetInfo(213) * 80)
    window_top = 0
    window_width = 150
    window_height = winheight
    
    -- recreate window with supplied left, top, width and height
    Window.new { Name=win,
        -- calculate new top and left position if moved
        Top=Window.top(win, window_top, 10),
        Left=Window.left(win, window_left, 10),
        Width=window_width,
        Height=window_height,
        Flags=2,
        BackgroundColour=ColourNameToRGB("slategray")
        }

    -- var.EXITS contains string like "north south east west" captured from
    -- either the exit line or some other location
    for w in string.gmatch(var.EXITS, "%a+") do
        -- for each direction found, color it white, 
        -- set bold font and set show to true
        exits[w]["c"] = ColourNameToRGB("white")
        exits[w]["f"] = "F"
        exits[w]["show"] = true
    end
    
    -- begin creating compass text/links
    i = 0 -- var to hold top position of line
    width = WindowTextWidth(win, "F", "?")
    WindowText(win, "F", "?", 144-width, height+((height-leading)*i),0,0,exits["somewhere"].c, false) 
    left = 144-width
    top = height+((height-leading)*i)
    right = left + width
    bottom = top + height
    if exits["somewhere"].show == true then
        WindowAddHotspot(win, "somewhere", left, top, right, bottom, 
            "compass_mouseover", "compass_cancelmouseover", "compass_mousedown", "compass_cancelmousedown", "compass_mouseup", 
            "Hidden exit", 1, 0)
    end
    i = i+1.25

Continued...
Top

Posted by Darwin   USA  (125 posts)  Bio
Date Reply #8 on Sat 09 Aug 2008 11:14 PM (UTC)
Message
    WindowRectOp( win, 2,3,height*2,-3,height*-1,ColourNameToRGB("brown"))
    WindowRectOp( win, 1,3,height*2,-3,height*-1, ColourNameToRGB("black"))
    
    width = WindowTextWidth(win, "F", "Up")
    WindowText(win, "F", "Up", 5, height+((height-leading)*i),0,0,exits["up"].c, false)
    left = 5
    top = height+((height-leading)*i)
    right = left + width
    bottom = top + height
    if exits["up"].show == true then
        WindowAddHotspot(win, "up", left, top, right, bottom, 
            "compass_mouseover", "compass_cancelmouseover", "compass_mousedown", "compass_cancelmousedown", "compass_mouseup", 
            "Move Up", 1, 0)
    end

    width = WindowTextWidth(win, "F", "North")
    WindowText(win, "F", "North", (144-width)/2, height+((height-leading)*i),0,0,exits["north"].c, false)
    left = (144-width)/2
    top = height+((height-leading)*i)
    right = left + width
    bottom = top + height
    if exits["north"].show == true then
        WindowAddHotspot(win, "north", left, top, right, bottom, 
            "compass_mouseover", "compass_cancelmouseover", "compass_mousedown", "compass_cancelmousedown", "compass_mouseup", 
            "Move North", 1, 0)
    end
    i = i+1
    
    width1 = WindowTextWidth(win, "F", "NW")
    width2 = WindowTextWidth(win, "f", "  |  ")
    width3 = WindowTextWidth(win, "F", "NE")
    width = (144 - (width1 + width2 + width3))/2
    WindowText(win, "F", "NW", width, height+((height-leading)*i),0,0,exits["northwest"].c, false)
    left = width
    top = height+((height-leading)*i)
    right = left + width1
    bottom = top + height
    if exits["northwest"].show == true then
        WindowAddHotspot(win, "northwest", left, top, right, bottom, 
            "compass_mouseover", "compass_cancelmouseover", "compass_mousedown", "compass_cancelmousedown", "compass_mouseup", 
            "Move Northwest", 1, 0)
    end
    WindowText(win, "f", "  |  ", width+width1, height+((height-leading)*i),0,0,0,false)
    WindowText(win, "F", "NE", width+width1+width2, height+((height-leading)*i),0,0,exits["northeast"].c, false) 
    left = width+width1+width2
    top = height+((height-leading)*i)
    right = left + width3
    bottom = top + height
    if exits["northeast"].show == true then
        WindowAddHotspot(win, "northeast", left, top, right, bottom, 
            "compass_mouseover", "compass_cancelmouseover", "compass_mousedown", "compass_cancelmousedown", "compass_mouseup", 
            "Move Northeast", 1, 0)
    end
    i = i+1
    
    width = WindowTextWidth(win, "f", "\ | /")
    WindowText(win, "f", "\ | /", (144-width)/2, height+((height-leading)*i),0,0,0, false) 
    i = i+1
    
    width1 = WindowTextWidth(win, "F", "West")
    width2 = WindowTextWidth(win, "f", "<--+-->")
    width3 = WindowTextWidth(win, "F", "East")
    width = (144 - (width1 + width2 + width3))/2
    WindowText(win, "F", "West", width, height+((height-leading)*i),0,0,exits["west"].c, false)
    left = width
    top = height+((height-leading)*i)
    right = left + width1
    bottom = top + height
    if exits["west"].show == true then
        WindowAddHotspot(win, "west", left, top, right, bottom, 
            "compass_mouseover", "compass_cancelmouseover", "compass_mousedown", "compass_cancelmousedown", "compass_mouseup", 
            "Move West", 1, 0)	
    end
    WindowText(win, "f", "<--+-->", width+width1, height+((height-leading)*i),0,0,0,false)
    WindowText(win, "F", "East", width+width1+width2, height+((height-leading)*i),0,0,exits["east"].c, false) 
    left = width+width1+width2
    top = height+((height-leading)*i)
    right = left + width3
    bottom = top + height
    if exits["east"].show == true then
        WindowAddHotspot(win, "east", left, top, right, bottom, 
            "compass_mouseover", "compass_cancelmouseover", "compass_mousedown", "compass_cancelmousedown", "compass_mouseup", 
            "Move East", 1, 0)	
    end
    i = i+1

Continued...
Top

Posted by Darwin   USA  (125 posts)  Bio
Date Reply #9 on Sat 09 Aug 2008 11:14 PM (UTC)
Message
    width = WindowTextWidth(win, "f", "/ | \")
    WindowText(win, "f", "/ | \", (144-width)/2, height+((height-leading)*i),0,0,0, false) 
    i = i+1
    
    width1 = WindowTextWidth(win, "F", "SW")
    width2 = WindowTextWidth(win, "f", "  |  ")
    width3 = WindowTextWidth(win, "F", "SE")
    width = (144 - (width1 + width2 + width3))/2
    WindowText(win, "F", "SW", width, height+((height-leading)*i),0,0,exits["southwest"].c, false)
    left = width
    top = height+((height-leading)*i)
    right = left + width1
    bottom = top + height
    if exits["southwest"].show == true then
        WindowAddHotspot(win, "southwest", left, top, right, bottom, 
            "compass_mouseover", "compass_cancelmouseover", "compass_mousedown", "compass_cancelmousedown", "compass_mouseup", 
            "Move Southwest", 1, 0)	
    end
    WindowText(win, "f", "  |  ", width+width1, height+((height-leading)*i),0,0,0,false)
    WindowText(win, "F", "SE", width+width1+width2, height+((height-leading)*i),0,0,exits["southeast"].c, false) 
    left = width+width1+width2
    top = height+((height-leading)*i)
    right = left + width3
    bottom = top + height
    if exits["southeast"].show == true then
        WindowAddHotspot(win, "southeast", left, top, right, bottom, 
            "compass_mouseover", "compass_cancelmouseover", "compass_mousedown", "compass_cancelmousedown", "compass_mouseup", 
            "Move Southeast", 1, 0)
    end
    i = i+1
    
    width = WindowTextWidth(win, "F", "South")
    WindowText(win, "F", "South", (144-width)/2, height+((height-leading)*i),0,0,exits["south"].c, false)
    left = (144-width)/2
    top = height+((height-leading)*i)
    right = left + width
    bottom = top + height
    if exits["south"].show == true then
        WindowAddHotspot(win, "south", left, top, right, bottom, 
            "compass_mouseover", "compass_cancelmouseover", "compass_mousedown", "compass_cancelmousedown", "compass_mouseup", 
            "Move South", 1, 0)
    end
    width = WindowTextWidth(win, "F", "down")
    WindowText(win, "F", "Down", 144-width, height+((height-leading)*i),0,0,exits["down"].c, false)
    left = 144-width
    top = height+((height-leading)*i)
    right = left + width
    bottom = top + height
    if exits["down"].show == true then
        WindowAddHotspot(win, "down", left, top, right, bottom, 
            "compass_mouseover", "compass_cancelmouseover", "compass_mousedown", "compass_cancelmousedown", "compass_mouseup", 
            "Move Down", 1, 0)
    end
    i = i+1.25
    
    WindowText(win, "F", "None", 5, height+((height-leading)*i),0,0,exits["none"].c, false)
    left = width+width1+width2
    top = height+((height-leading)*i)
    right = left + width
    bottom = top + height
    if exits["none"].show == true then
        WindowAddHotspot(win, "none", left, top, right, bottom, 
            "compass_mouseover", "compass_cancelmouseover", "compass_mousedown", "compass_cancelmousedown", "compass_mouseup", 
            "Nowhere to go", 1, 0)	
    end

    -- finally, add the decoration, supplying a window title of "Exits"
    -- text position 1 for centered and the bold font "F"
    Window.decorate(win, "Exits", 1, "F")
    -- display the final result
    WindowShow(win, true)
end

-- mouseover and mousedown were used for testing 
-- so they don't do anything important ATM
function compass_mouseover(flags, hotspot_id)
    exits[hotspot_id].mouseover = true
end
function compass_cancelmouseover(flags, hotspot_id)
    exits[hotspot_id].mouseover = false
end
function compass_mousedown(flags, hotspot_id)
        exits[hotspot_id].mousedown = true
end
function compass_cancelmousedown(flags, hotspot_id)
    exits[hotspot_id].mousedown = false
end
-- direction was clicked
function compass_mouseup(flags, hotspot_id)
    -- if not black and not somewhere or none the send the direction
    if  exits[hotspot_id]["c"] > 0 and 
            hotspot_id ~= "somewhere" and 
            hotspot_id ~= "none" 
        then
            Send(hotspot_id)
    end
end

Top

Posted by Darwin   USA  (125 posts)  Bio
Date Reply #10 on Sat 09 Aug 2008 11:18 PM (UTC)
Message
I hope that's detailed enough to demonstrate moving the windows around. I (now) know there's a better way to keep track of text positions so I'll be cleaning that code up when I get back to it.

My first goal was to make it work, and it does. Next I'll clean up the code and then I'll try to make it look better.
Top

Posted by Darwin   USA  (125 posts)  Bio
Date Reply #11 on Sat 09 Aug 2008 11:48 PM (UTC)
Message
Quote:
Bear in mind my remarks that the docking idea was supposed to automate the window positioning, so once you let people move them you have to work out what to do if they move a window, and then resize their main window.


These windows are set with the 'use absolute position' flag so that they don't snap to any pre-defined position and can be moved around. I'm not sure what you mean by 'work out what to do'

I currently have two of these movable windows and resizing the window doesn't do anything to their positions. They're movable so if someone decides they really need to resize the main window then they can also move the miniwindows wherever they desire.
Top

Posted by Nick Gammon   Australia  (23,068 posts)  Bio   Forum Administrator
Date Reply #12 on Sun 10 Aug 2008 12:43 AM (UTC)
Message
What I meant was, in the earlier attempt to hive off data to extra "dummy" world windows, I found it to be a pain if I decided to make my world window larger, because then all the other windows had to be resized or moved out of the way.

By making your windows have an absolute position, you introduce the same concern - whether or not it is a big worry may be a matter for the individual.

Say you have 5 miniwindows with absolute positions, and they decide to make their world window larger (using a larger font perhaps), now they have to reposition all 5.

Using the docking approach, they windows "stick to" the side of the main window, and you don't have to do anything if you resize.



- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Darwin   USA  (125 posts)  Bio
Date Reply #13 on Sun 10 Aug 2008 01:01 AM (UTC)
Message
From my limited testing, having 5 windows with docked positions wouldn't be ideal for resizing the main window either, unless they were docked in all different positions. If the window becomes too small in width or height, then it may force some miniwindows to not be drawn.

I tested that using an example you posted where you created 5 or 6 100x100 different colored windows set right center top-bottom. If the window sizes were increased to force an overlap, one of the windows would vanish. They would also vanish if the height of the window became too small.

I would prefer to not auto-position the windows to prevent random-esque windows from vanishing from the screen. At least this way, the user can (re)position the window if necessary before and/or after resizing the main window.
Top

Posted by Darwin   USA  (125 posts)  Bio
Date Reply #14 on Sun 10 Aug 2008 06:04 AM (UTC)
Message
Quick update on my progress. I started making the chats window in this image. I now have one fixed-positioned window (status bar) and three movable mini-windows that can roll up into its title bar or roll down from it. The roll up/down button is a little larger now.

Planned improvements include adding a way to stretch (or resize) a movable mini-window and add a scroll bar control to the chat window.

http://i171.photobucket.com/albums/u302/bin_recycled/HoG_GUI_07.png
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


83,494 views.

This is page 1, subject is 3 pages long: 1 2  3  [Next page]

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.