发新话题
打印

[发表插件] ShortLayout 1.5 简单界面布局

CharacterBag[0-3]Slot 这个大约是背包. 不过你说的是背包按钮还是背包打开后? 打开后是ContainerFrame[1-13]

为了应对即时生成和动态改变的窗体, hook了一些全局方法效果不是很好可能会引起上面的那些问题. 需要考虑更好的办法.

活动技能条的化, 你把那些隐藏的都打开了组数就变少了, 比如你开了右上, 右下的条

TOP

引用:
原帖由 simonw 于 2008-1-12 17:55 发表
CharacterBag[0-3]Slot 这个大约是背包. 不过你说的是背包按钮还是背包打开后? 打开后是ContainerFrame[1-13]

为了应对即时生成和动态改变的窗体, hook了一些全局方法效果不是很好可能会引起上面的那些问题. 需要考 ...
赞个 活动技能条这个问题解决了 背包昨天已经解决了 就是小地图那个没弄 不过另外找了个插件 也算是做好了

TOP

想要知道ShortLayout能不能控制ChatFrame的位置、大小。
动作条、姿态栏什么的都可以摆到想要的位置,就是聊天框每次都要用鼠标定位。有没有一体化的解决办法?

TOP

另外就是发现已经隐藏的东西,无法通过再次设置 hide = false 重新显示。

sm解答下吧

TOP

顶一下这个我也想知道 还有战斗记录那个栏目

TOP


目前我的界面样子 这是SHORT的组合

TOP

跟大脚自带的信息盒相似吗?
大脚自带信息盒可以新建窗体然后拖动 锁定一系列的操作

TOP

能帮忙看下 MainMenuBarPerformanceBarFrame 吗,我把它放在 MinimapZoneTextButton 旁边,并且 SetScale = 0.6
{Frame = "MainMenuBarPerformanceBarFrame", SetPoint = {"TOPLEFT", MinimapZoneTextButton, "TOPLEFT", -15, 22}, SetScale = 0.6},
但是有问题,设scale后OnEnter 的触发范围变大,PerformanceBar 所在的一条纵线全会触发。



另外,下面这样写会报什么dependency的错
{Frame = "MultiBarBottomLeft", SetPoint = {"BOTTOM", MultiBarBottomRight, "TOP", 0, 3}, SetScale = 0.8},
{Frame = "MultiBarBottomRight", SetPoint = {"BOTTOMLEFT", ActionButton1, "TOPLEFT", 0, 3}, SetScale = 0.8},

TOP

MainMenuBarPerformanceBarFrame 这个我设置了SetScale = 0.6在我这里很正常.

dependency报错的那2句话你换个顺序.

TOP

前面个我想我找到原因了,暴雪的lua里有个函数MainMenuBar_UpdateKeyRing(),会改变PerformanceBar的位置,应该是和这个有冲突,这就属于你说的“只能用于在加载期即确定并且在运行是不在被代码自动改变的稳定窗体对象”了。

后面的问题,我换了位置是不报错,但 MultiBarBottomLeft 和 MultiBarBottomRight 重叠了,等于是SetPoint失效,MultiBarBottomLeft 回到 UIPARENT_MANAGED_FRAME_POSITIONS["MultiBarBottomLeft"] = {baseY = 17, reputation = 1, maxLevel = 1, anchorTo = "ActionButton1", point = "BOTTOMLEFT", rpoint = "TOPLEFT"};  这个位置去了

TOP

MainMenuBar_UpdateKeyRing 这个看到了,  可能是我设置的时候没引发事件所以没有被触发. MultiBarBottomLeft 这些也是类似, 目前已经创建了一种补丁机制(还没发布)给发现会被动态改变的frame打补丁使得能够被我们控制, 最近已经做了buffframe的补丁彻底解决了这里的问题, 还在做更多的补丁以解决那些被自动改变的frame.

TOP

看到sl更新了,高兴。

下载回来之后,发现配置文件参数不太一致。例如说明里面设置隐藏是Hide,但是配置中同时存在cHide 和 Hide,不知道应该是哪一个,或者二者皆可;另外SetFrameStrata和cSetFrameStrata也都存在,应该使用哪个?

求答~

TOP

目前只有cHide和cSetMovable2个自定义的方法. 是在原有方法上的增强. 下面是功能描述, 根据自己实际情况使用.

cHide: 真假值, 为真时强制隐藏窗体, 隐藏后无法被显示.
cSetMovable: 真假值, 为真时窗体可移动, ctrl+alt+鼠标左键可拖动.

TOP

我想知道怎么把目标的debuff移到目标头像上方

{Frame = "TargetFrameBuff1", SetScale = 2.0, SetPoint = {"BOTTOMLEFT", TargetFrame, "LEFT", 0, -30}},
{Frame = "TargetFrameBuff2", SetScale = 2.0, SetPoint = {"BOTTOMLEFT", TargetFrame, "LEFT, 50, -30}},
这两个都用  /sl  的话  第一个debuff位置能实现  第二个就不能实现了  在默认的第一个debuff的地方

TOP

貌似只需要对第一个debuff做移动就行其他的都是以第一个为参照的

TOP

http://www.wowwiki.com/Widget_API
都打不开了,想学一下啊

TOP

引用:
原帖由 simonw 于 2008-1-7 21:30 发表
to YOURS_HJ
你真的很厉害, 这么做下去都快做成自己的插件的作品了.
上面第一个问题的引用你可以用循环来解决, 都是字符串 MultiBarRightButtonN 用循环生成这样结构的数组就行.

设置长宽有setweight和sethight函数 ...
simonw,第一个问题的循环可以给个例子么?俺一个菜鸟……

TOP

又遇到问题了,哎

{Frame = "TalentMicroButton", Hide = true},

这个为什么进入游戏的时候不能起左右,用/SL调试却是好的?

TOP

循环不会就手写吧...

{Frame = "TalentMicroButton", Hide = true}, 这是一个动态按钮, 游戏其他代码会影响他, 以前的帖子讨论过很多关于这样的问题, 没有很好的解决办法, 使用cHide=true 试试.

TOP



终于把界面搞定了,大家喜欢的话就用吧,我这是1440*900分辨率的,UI缩放到U字的中间,右下方空余的区域大家随自己的喜欢放东西吧,战斗记录、团队界面啊都可以的。特别指出,主动作条右边的动作条是系统的“右边动作条1”,上方一点放血瓶的动作条是系统的“右边动作条2”,不喜欢可以从界面设置里面关闭~
下面是配置代码,有错误请指出,谢谢!~~再次多谢S大提供了这么好的插件!
复制内容到剪贴板
代码:


--自定义纹理开始
function crTexture(frame)
    local lefttexture = frame:CreateTexture(nil, "OVERLAY")
    lefttexture:SetTexture("Interface/MainMenuBar/UI-MainMenuBar-Dwarf")
    lefttexture:SetDrawLayer("BACKGROUND")
    lefttexture:SetWidth(256)
    lefttexture:SetHeight(43)
    lefttexture:SetTexCoord(0,1,0.83203125,1)
    lefttexture:SetPoint("BOTTOMLEFT", frame, "BOTTOMLEFT", -6.5, -3)
    local righttexture = frame:CreateTexture(nil, "OVERLAY")
    righttexture:SetTexture("Interface/MainMenuBar/UI-MainMenuBar-Dwarf")
    righttexture:SetDrawLayer("BACKGROUND")
    righttexture:SetWidth(256)
    righttexture:SetHeight(43)
    righttexture:SetTexCoord(0,1,0.58203125,0.75)
    righttexture:SetPoint("BOTTOMRIGHT", frame, "BOTTOMRIGHT", 3.5, -3)
end
function mySetTexture(frame)
    frame:SetTexture("Interface/MainMenuBar/UI-MainMenuBar-Dwarf")
    frame:SetDrawLayer("BACKGROUND")
    frame:SetWidth(256)
    frame:SetHeight(43)
    frame:SetTexCoord(0,1,0.58203125,0.75)
end
function mybut(frame)
  for i = 1, 11 do
    local button = _G["MultiBarRightButton"..i+1]
    local Pbutton = _G["MultiBarRightButton"..i]
    button:SetPoint("TOPLEFT", Pbutton, "TOPRIGHT", 6, 0)
  end
end
--自定义纹理结束

ShortLayout.Config[1] = {
--Class = "圣骑士",
--Character = "管埋员",
--Resolution = {"800x600", "1024x768"},
--UISetScale = {0.5, 1},
--AutoAdjust = true,
--{Frame = "UIParent",SetScale = 0.8},  --整体UI缩放比例
{Frame = "ChatFrame1", SetPoint = {"BOTTOMLEFT", UIParent, "BOTTOMLEFT", 5, 10}},  --聊天框定义
{Frame = "MainMenuBar", SetScale = 0.8},
        --{Frame = "MainMenuBar", SetPoint = {"BOTTOMLEFT", UIParent, "BOTTOMLEFT", 90, 0}},
{Frame = "MultiBarBottomLeft", SetScale = 0.8},
{Frame = "MultiBarBottomRight", SetScale = 0.8},
{Frame = "MultiBarBottomLeft", Function = crTexture},
{Frame = "MultiBarBottomRight", Function = crTexture},
--主动作条翻页按钮和数字
{Frame = "ActionBarUpButton", Hide = true},
{Frame = "ActionBarDownButton", Hide = true},
{Frame = "MainMenuBarPageNumber", Hide = true},
--右边动作条设置
{Frame = "MultiBarRight", SetScale = 0.8},
{Frame = "MultiBarRightButton1", SetPoint = {"LEFT", ActionButton12, "RIGHT", 12, 0}},
{Frame = "MultiBarRightButton2", Function = mybut},
{Frame = "MultiBarLeft", SetScale = 1},
{Frame = "MultiBarLeftButton1", SetPoint = {"BOTTOMRIGHT", MultiBarBottomRight, "TOP", 80, 120}},
{Frame = "MultiBarLeftButton2", SetPoint = {"LEFT", MultiBarLeftButton1, "RIGHT", 6, 0}},
{Frame = "MultiBarLeftButton3", SetPoint = {"TOP", MultiBarLeftButton1, "BOTTOM", 0, -6}},
{Frame = "MultiBarLeftButton4", SetPoint = {"TOP", MultiBarLeftButton2, "BOTTOM", 0, -6}},
{Frame = "MultiBarLeftButton5", SetPoint = {"RIGHT", MultiBarLeftButton1, "LEFT", -6, 0}, SetScale = 0.8},
{Frame = "MultiBarLeftButton6", SetPoint = {"RIGHT", MultiBarLeftButton3, "LEFT", -6, 0}, SetScale = 0.8},
{Frame = "MultiBarLeftButton7", SetPoint = {"BOTTOM", MultiBarLeftButton1, "TOP", 0, 6}, SetScale = 0.8},
{Frame = "MultiBarLeftButton8", SetPoint = {"BOTTOM", MultiBarLeftButton2, "TOP", 0, 6}, SetScale = 0.8},
{Frame = "MultiBarLeftButton9", SetPoint = {"LEFT", MultiBarLeftButton2, "RIGHT", 6, 0}, SetScale = 0.8},
{Frame = "MultiBarLeftButton10", SetPoint = {"LEFT", MultiBarLeftButton4, "RIGHT", 6, 0}, SetScale = 0.8},
{Frame = "MultiBarLeftButton11", SetPoint = {"TOP", MultiBarLeftButton3, "BOTTOM", 0, -6}, SetScale = 0.8},
{Frame = "MultiBarLeftButton12", SetPoint = {"TOP", MultiBarLeftButton4, "BOTTOM", 0, -6}, SetScale = 0.8},
--更改功能条和背包条纹理
{Frame = "MainMenuBarTexture2", SetPoint = {"LEFT", MainMenuBarTexture1, "RIGHT", 2, 0}, Function=mySetTexture},
{Frame = "MainMenuBarTexture3", SetPoint = {"LEFT", MainMenuBarTexture2, "RIGHT", -3, 0}, Function=mySetTexture},
--左右修饰的小鹰
{Frame = "MainMenuBarLeftEndCap", Hide = true},
{Frame = "MainMenuBarRightEndCap", Hide = true},
--{Frame = "MainMenuBarLeftEndCap", SetPoint = {"BOTTOMLEFT", UIParent, "BOTTOMLEFT", 0, 0}},
--{Frame = "MainMenuBarRightEndCap", SetPoint = {"BOTTOMRIGHT", UIParent, "BOTTOMRIGHT", 0, 0}},

--{Frame = "MinimapCluster", SetPoint = {"TOPRIGHT", UIParent, "TOPRIGHT", 0, -25}, SetScale = 1}, --小地图位置定义
{Frame = "PlayerFrame", SetScale = 1.1},
{Frame = "TargetFrame", SetScale = 1.1},
--功能条设置
{Frame = "CharacterMicroButton", SetPoint = {"TOPLEFT", UIParent, "TOP", -108, 25}},
--{Frame = "SpellbookMicroButton", Hide = true},
--{Frame = "TalentMicroButton", Hide = true},
--{Frame = "QuestLogMicroButton", Hide = true},
--{Frame = "SocialsMicroButton", Hide = true},
--{Frame = "LFGMicroButton", Hide = true},
--{Frame = "MainMenuMicroButton", Hide = true},
--{Frame = "HelpMicroButton", Hide = true},
--背包和钥匙按钮
{Frame = "KeyRingButton", SetPoint = {"BOTTOMRIGHT", MultiBarBottomRight, "TOPRIGHT", 0, 3}, SetScale = 1},
{Frame = "CharacterBag[0-3]Slot", Hide = true},
{Frame = "MainMenuBarBackpackButton", SetPoint = {"BOTTOMRIGHT", KeyRingButton, "BOTTOMLEFT", 0, 2}, SetScale = 1, cSetMovable = true},
}

TOP

发新话题