Skip to content

Commit

Permalink
Merge branch 'development'
Browse files Browse the repository at this point in the history
  • Loading branch information
fiendish committed May 17, 2017
2 parents 9d033c6 + d0f8a26 commit e0fa6ce
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 14 deletions.
4 changes: 4 additions & 0 deletions MUSHclient/AardwolfPackageChanges.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
Aardwolf Client Package Major Changes List

r1916 snapshot
- bug fix: Main output sizing at startup should be more reliable now.
- bug fix: New MUSHclient 5.06 prerelease build that hopefully finally fixes the bug where miniwindows would sometimes turn black. ( https://mushclient.com/forum/bbshowpost.php?id=11315 )

r1914 snapshot
- bug fix: A few of the new client settings that are force-enabled will only be activated once instead of every launch, but for real this time.

Expand Down
Binary file modified MUSHclient/MUSHclient.exe
Binary file not shown.
38 changes: 24 additions & 14 deletions MUSHclient/worlds/plugins/aard_layout.xml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ function ResizeMainCallback()
if GetVariable("lock_down_miniwindows") == "1" then
return
end
end_startup_check()
posx, posy = WindowInfo (textResizer, 17), WindowInfo (textResizer, 18)
textrect_right = textrect_right + posx - startx
startx = posx
Expand Down Expand Up @@ -115,6 +116,7 @@ function DragMainCallback()
if GetVariable("lock_down_miniwindows") == "1" then
return
end
end_startup_check()
posx, posy = WindowInfo (textDragger, 17), WindowInfo (textDragger, 18)
local height = GetInfo(293) - GetInfo(291)
local width = GetInfo(292) - GetInfo(290)
Expand Down Expand Up @@ -262,18 +264,25 @@ function OnPluginInstall()
image_ratio = WindowImageInfo(bgwin, "wolf_logo", 2)/WindowImageInfo(bgwin, "wolf_logo", 3)
end
--- Pull some state variables.
check_main_background()
-- give main world window time to stabilize its size and position
AddTimer("checkTimer", 0, 0, 2, "", timer_flag.Enabled + timer_flag.OneShot + timer_flag.ActiveWhenClosed + timer_flag.Replace + timer_flag.Temporary, "check_main_background")
-- if disabled last time, stay disabled
if GetVariable ("enabled") == "false" then
ColourNote ("yellow", "", "Warning: Plugin " .. GetPluginName ().. " is currently disabled.")
check (EnablePlugin(GetPluginID (), false))
return
end -- they didn't enable us last time
--- init display
check_main_background()
-- give main world window time to stabilize its size and position
startup_time = utils.timer()
AddTimer("startupCheckTimer", 0, 0, 0.3, "", timer_flag.Enabled + timer_flag.ActiveWhenClosed + timer_flag.Replace + timer_flag.Temporary, "check_main_background")
-- ten seconds is probably overkill, but it should be pretty harmless
DoAfterSpecial(10, 'end_startup_check()', sendto.script)
end
function end_startup_check()
DeleteTimer("startupCheckTimer")
end
function check_main_background()
Expand Down Expand Up @@ -314,23 +323,24 @@ function add_main_resizer()
end
function add_title_dragger()
if WindowInfo(textDragger, 1) then -- if it already exists
--- Reposition the dragger tag.
WindowPosition(textDragger, GetInfo(272)-6, GetInfo(273)-7, 0, 6)
else
-- Add another mini-window at top for dragging bar.
dragsize = 10
-- Add mini-window at top with draghandler for dragging the main output around.
dragsize = 15
border = GetInfo(277)+GetInfo(276)
check (WindowCreate (textDragger, GetInfo(272)-6, GetInfo(273)-6, GetInfo(274)-GetInfo(272)+11, dragsize, 12, 2, GetNormalColour(1)))
WindowCreate(textDragger, GetInfo(272)-border, GetInfo(273)-border, GetInfo(274)-GetInfo(272)+(2*border), dragsize, 0, 22, GetNormalColour(1))
if WindowHotspotInfo(textDragger, "dragmain", 13) then
WindowMoveHotspot(textDragger, "dragmain", 0, 0, 0, 0)
else
WindowAddHotspot(textDragger, "dragmain", 0, 0, 0, 0, "MouseOver", "CancelMouseOver", "MouseDown", "CancelMouseDown", "MouseUp", "", 1, 0)
WindowDragHandler(textDragger, "dragmain", "DragMainCallback", "DragReleaseMainCallback", 0)
end
WindowShow(textDragger,true)
end
function OnPluginWorldOutputResized()
AddTimer("checkTimer", 0, 0, .1, "", timer_flag.Enabled + timer_flag.OneShot + timer_flag.ActiveWhenClosed + timer_flag.Replace + timer_flag.Temporary, "check_main_background")
AddTimer("resizeCheckTimer", 0, 0, .1, "", timer_flag.Enabled + timer_flag.OneShot + timer_flag.ActiveWhenClosed + timer_flag.Replace + timer_flag.Temporary, "check_main_background")
end
function draw_main_window()
Expand Down

0 comments on commit e0fa6ce

Please sign in to comment.