интерфейс
This commit is contained in:
1 parent
d7ccebb788
commit
838a118f98
10 files changed
+583
-86
No files matched your search
@@ -331,16 +331,17 @@ Config.Zones = {
|
||||
}
|
||||
|
||||
---------------------------------------------------------------- удочки
|
||||
-- luck = бонус удачи, speed = множитель ожидания клёва (меньше = быстрее), zone = ширина зелёной зоны
|
||||
-- luck = бонус удачи, speed = множитель ожидания клёва (меньше = быстрее), zone = ширина зелёной зоны,
|
||||
-- icon = картинка удочки в хотбаре (Tool.TextureId)
|
||||
Config.Rods = {
|
||||
{ id = "Basic", name = "Старая удочка", price = 0, level = 1, luck = 0.00, speed = 1.00, zone = 0.22, upgradeCost = 40, style = "wood" },
|
||||
{ id = "Bamboo", name = "Бамбуковая удочка", price = 150, level = 3, luck = 0.15, speed = 0.88, zone = 0.25, upgradeCost = 120, style = "bamboo" },
|
||||
{ id = "Fiberglass", name = "Стеклопластиковая", price = 600, level = 5, luck = 0.30, speed = 0.78, zone = 0.27, upgradeCost = 300, style = "glass" },
|
||||
{ id = "Carbon", name = "Карбоновая удочка", price = 1800, level = 8, luck = 0.55, speed = 0.68, zone = 0.29, upgradeCost = 700, style = "carbon" },
|
||||
{ id = "Coral", name = "Коралловая удочка", price = 4500, level = 10, luck = 0.80, speed = 0.62, zone = 0.31, upgradeCost = 1300, style = "coral" },
|
||||
{ id = "Golden", name = "Золотая удочка", price = 9000, level = 13, luck = 1.00, speed = 0.56, zone = 0.33, upgradeCost = 2200, style = "gold" },
|
||||
{ id = "Frost", name = "Ледяная удочка", price = 25000, level = 18, luck = 1.40, speed = 0.50, zone = 0.35, upgradeCost = 5000, style = "frost" },
|
||||
{ id = "Legend", name = "Удочка Легенды", price = 75000, level = 25, luck = 2.00, speed = 0.42, zone = 0.38, upgradeCost = 12000, style = "legend" },
|
||||
{ id = "Basic", name = "Старая удочка", price = 0, level = 1, luck = 0.00, speed = 1.00, zone = 0.22, upgradeCost = 40, style = "wood", icon = "rbxassetid://83350883185349" },
|
||||
{ id = "Bamboo", name = "Бамбуковая удочка", price = 150, level = 3, luck = 0.15, speed = 0.88, zone = 0.25, upgradeCost = 120, style = "bamboo", icon = "rbxassetid://98615001898640" },
|
||||
{ id = "Fiberglass", name = "Стеклопластиковая", price = 600, level = 5, luck = 0.30, speed = 0.78, zone = 0.27, upgradeCost = 300, style = "glass", icon = "rbxassetid://100031752289540" },
|
||||
{ id = "Carbon", name = "Карбоновая удочка", price = 1800, level = 8, luck = 0.55, speed = 0.68, zone = 0.29, upgradeCost = 700, style = "carbon", icon = "rbxassetid://71788597596034" },
|
||||
{ id = "Coral", name = "Коралловая удочка", price = 4500, level = 10, luck = 0.80, speed = 0.62, zone = 0.31, upgradeCost = 1300, style = "coral", icon = "rbxassetid://139114393074237" },
|
||||
{ id = "Golden", name = "Золотая удочка", price = 9000, level = 13, luck = 1.00, speed = 0.56, zone = 0.33, upgradeCost = 2200, style = "gold", icon = "rbxassetid://83212298735071" },
|
||||
{ id = "Frost", name = "Ледяная удочка", price = 25000, level = 18, luck = 1.40, speed = 0.50, zone = 0.35, upgradeCost = 5000, style = "frost", icon = "rbxassetid://134579643216329" },
|
||||
{ id = "Legend", name = "Удочка Легенды", price = 75000, level = 25, luck = 2.00, speed = 0.42, zone = 0.38, upgradeCost = 12000, style = "legend", icon = "rbxassetid://84863811378769" },
|
||||
}
|
||||
|
||||
Config.RodUpgrade = { maxLevel = 5, luckPerLevel = 0.08, zonePerLevel = 0.012, speedPerLevel = 0.96 }
|
||||
|
||||
@@ -116,7 +116,7 @@ local function sparkles(parent, color, rate)
|
||||
end
|
||||
|
||||
---------------------------------------------------------------- удочки
|
||||
-- Рука в (0,0,0), удочка смотрит в -Z и изгибается вверх (+Y).
|
||||
-- Рука в (0,0,0), удочка смотрит в -Z почти прямо, кончик слегка провисает вниз (-Y).
|
||||
|
||||
local STYLES = {
|
||||
wood = { blank = C(125, 90, 60), mat = Enum.Material.Wood, grip = C(80, 55, 35), gripMat = Enum.Material.Fabric, wrap = C(175, 175, 175), reel = C(95, 95, 100) },
|
||||
@@ -177,8 +177,8 @@ function M.buildRod(rodId, upgradeLevel, anchored)
|
||||
cyl(model, V(0.24, -0.68, -0.58), V(0.5, -0.86, -0.58), 0.07, { Color = st.reel, Material = METAL })
|
||||
ball(model, V(0.54, -0.9, -0.5), 0.19, { Color = st.grip, Material = SP })
|
||||
|
||||
-- бланк: 8 колен с плавным изгибом и шарами на стыках
|
||||
local angles = { 6, 9, 12, 16, 20, 25, 30, 36 }
|
||||
-- бланк: 8 колен, почти прямой, к кончику плавно провисает; шары на стыках
|
||||
local angles = { 0, -1, -2, -3, -5, -7, -9, -12 }
|
||||
local lengths = { 1.2, 1.15, 1.1, 1.0, 0.95, 0.9, 0.85, 0.8 }
|
||||
local p = V(0, 0, -1.55)
|
||||
local lastSeg
|
||||
|
||||
@@ -492,7 +492,7 @@ end
|
||||
|
||||
---------------------------------------------------------------- удочка, сумка, VIP на персонаже
|
||||
|
||||
local REST_ANGLE = 30
|
||||
local REST_ANGLE = 42 -- удочка в покое: рукоять под ~42° вверх-вперёд, кончик провисает до ~30°
|
||||
local function gripCF(angle)
|
||||
return (CFrame.Angles(math.rad(angle), 0, 0) * CFrame.new(0, 0, -0.3)):Inverse()
|
||||
end
|
||||
@@ -546,6 +546,7 @@ local function giveRodTool(player)
|
||||
local tool = Instance.new("Tool")
|
||||
tool.Name = rod.name .. (lvl > 0 and (" +" .. lvl) or "")
|
||||
tool.ToolTip = "Кликни у воды, чтобы закинуть"
|
||||
tool.TextureId = rod.icon or ""
|
||||
tool.CanBeDropped = false
|
||||
tool.Grip = gripCF(REST_ANGLE)
|
||||
tool:SetAttribute("IsRod", true)
|
||||
|
||||
@@ -196,33 +196,50 @@ H.rod = text({ Size = UDim2.new(1, 0, 0, 20), Position = UDim2.fromOffset(0, 128
|
||||
|
||||
-- баннер события (справа сверху)
|
||||
local eventBanner = new("Frame", {
|
||||
Name = "EventBanner", -- по имени его ставит под таблицу игроков HudBar.client.lua
|
||||
Size = UDim2.fromOffset(280, 58), AnchorPoint = Vector2.new(1, 0), Position = UDim2.new(1, -12, 0, 10),
|
||||
BackgroundColor3 = WHITE, Visible = false, Parent = screen,
|
||||
}, { corner(14), stroke(C.gold, 2, 0.1), gradient(Color3.fromRGB(90, 60, 20), C.bg, 90) })
|
||||
local eventTitle = text({ Size = UDim2.new(1, -20, 0, 26), Position = UDim2.fromOffset(12, 4), Font = TITLE, TextSize = 19, TextColor3 = C.gold, Text = "", Parent = eventBanner })
|
||||
local eventDesc = text({ Size = UDim2.new(1, -20, 0, 20), Position = UDim2.fromOffset(12, 30), Font = BODY2, TextSize = 13, TextColor3 = C.text, Text = "", Parent = eventBanner })
|
||||
|
||||
-- кнопки слева
|
||||
-- столбик на компьютере, сетка 2×N на телефоне (раскладка — в applyLayout ниже)
|
||||
-- меню слева: деревянная панель в рамке с вкладкой «≡» сверху, внутри — широкие кнопки (значок и подпись в строку).
|
||||
-- side — сетка кнопок внутри панели H.sidePanel (раскладку для телефона и компьютера задаёт applyLayout ниже)
|
||||
H.sidePanel = new("Frame", {
|
||||
Name = "SideMenu", Size = UDim2.fromOffset(170, 0), AutomaticSize = Enum.AutomaticSize.Y, Position = UDim2.fromOffset(12, 228),
|
||||
BackgroundColor3 = WHITE, Parent = screen,
|
||||
}, { corner(10), stroke(C.goldDark, 2.5, 0), Theme.woodGradient(C.wood, C.woodDark) })
|
||||
Theme.rivets(H.sidePanel, 7, 6)
|
||||
do
|
||||
local tab = new("Frame", {
|
||||
Size = UDim2.fromOffset(48, 24), AnchorPoint = Vector2.new(0.5, 0.5), Position = UDim2.new(0.5, 0, 0, 0),
|
||||
BackgroundColor3 = WHITE, ZIndex = 3, Parent = H.sidePanel,
|
||||
}, { corner(8), stroke(C.goldDark, 2, 0), Theme.woodGradient(C.woodLight, C.wood) })
|
||||
text({ Size = UDim2.fromScale(1, 1), Font = TITLE, TextSize = 18, TextXAlignment = Enum.TextXAlignment.Center, TextColor3 = C.goldBright, Text = "≡", ZIndex = 4, Parent = tab })
|
||||
end
|
||||
local side = new("Frame", {
|
||||
Size = UDim2.fromOffset(70, 380), AnchorPoint = Vector2.new(0, 0.5), Position = UDim2.new(0, 12, 0.5, 60),
|
||||
BackgroundTransparency = 1, Parent = screen,
|
||||
}, { new("UIGridLayout", { CellSize = UDim2.fromOffset(68, 68), CellPadding = UDim2.fromOffset(8, 8), FillDirectionMaxCells = 1, SortOrder = Enum.SortOrder.LayoutOrder }) })
|
||||
Size = UDim2.new(1, 0, 0, 0), AutomaticSize = Enum.AutomaticSize.Y, BackgroundTransparency = 1, Parent = H.sidePanel,
|
||||
}, {
|
||||
new("UIPadding", { PaddingTop = UDim.new(0, 18), PaddingBottom = UDim.new(0, 10), PaddingLeft = UDim.new(0, 8), PaddingRight = UDim.new(0, 8) }),
|
||||
new("UIGridLayout", { CellSize = UDim2.fromOffset(154, 40), CellPadding = UDim2.fromOffset(6, 6), FillDirectionMaxCells = 1, SortOrder = Enum.SortOrder.LayoutOrder }),
|
||||
})
|
||||
|
||||
local sideDots = {}
|
||||
local function sideButton(order, icon, label, key, color, onClick)
|
||||
-- деревянная плитка; цвет раздела — полоска-лента снизу
|
||||
local b = btn({ Size = UDim2.fromOffset(68, 68), BackgroundColor3 = C.woodLight, LayoutOrder = order, Parent = side }, onClick)
|
||||
-- широкая деревянная кнопка: цветной значок слева, подпись, справа — клавиша
|
||||
local b = btn({ Size = UDim2.fromOffset(154, 40), BackgroundColor3 = C.woodLight, LayoutOrder = order, Parent = side }, onClick)
|
||||
b:FindFirstChildOfClass("UIStroke").Color = C.goldDark
|
||||
b:FindFirstChildOfClass("UIStroke").Thickness = 2.5
|
||||
new("Frame", { Size = UDim2.new(1, -10, 0, 4), AnchorPoint = Vector2.new(0.5, 1), Position = UDim2.new(0.5, 0, 1, -4), BackgroundColor3 = color, BorderSizePixel = 0, Parent = b }, { corner(2) })
|
||||
text({ Size = UDim2.fromScale(1, 0.5), Position = UDim2.fromScale(0, 0.06), TextScaled = true, TextXAlignment = Enum.TextXAlignment.Center, Text = icon, Parent = b })
|
||||
text({ Size = UDim2.fromScale(1, 0.24), Position = UDim2.fromScale(0, 0.6), Font = TITLE, TextScaled = true, TextXAlignment = Enum.TextXAlignment.Center, Text = label, TextStrokeColor3 = C.ink, TextStrokeTransparency = 0.3, Parent = b })
|
||||
b:FindFirstChildOfClass("UIStroke").Thickness = 2
|
||||
local badge = new("Frame", { Size = UDim2.new(0, 30, 1, -10), Position = UDim2.fromOffset(5, 5), BackgroundColor3 = color, Parent = b },
|
||||
{ corner(6), stroke(C.ink, 1.5, 0.3), gradient(WHITE, Color3.fromRGB(170, 170, 170), 90) })
|
||||
text({ Size = UDim2.fromScale(1, 1), TextScaled = true, TextXAlignment = Enum.TextXAlignment.Center, Text = icon, Parent = badge })
|
||||
new("UITextSizeConstraint", { MaxTextSize = 17, Parent = text({ Size = UDim2.new(1, -66, 1, 0), Position = UDim2.fromOffset(42, 0), Font = TITLE,
|
||||
TextScaled = true, Text = label, TextStrokeColor3 = C.ink, TextStrokeTransparency = 0.3, Parent = b }) })
|
||||
if key and not UserInputService.TouchEnabled then
|
||||
local tag = new("Frame", { Size = UDim2.fromOffset(20, 20), Position = UDim2.new(1, -14, 0, -6), BackgroundColor3 = C.bg, Parent = b }, { corner(6), stroke(C.gold, 1.5) })
|
||||
local tag = new("Frame", { Size = UDim2.fromOffset(20, 20), AnchorPoint = Vector2.new(1, 0.5), Position = UDim2.new(1, -6, 0.5, 0), BackgroundColor3 = C.bg, Parent = b }, { corner(5), stroke(C.gold, 1.2) })
|
||||
text({ Size = UDim2.fromScale(1, 1), Font = TITLE, TextSize = 12, TextXAlignment = Enum.TextXAlignment.Center, TextColor3 = C.gold, Text = key, Parent = tag })
|
||||
end
|
||||
local dot = new("Frame", { Size = UDim2.fromOffset(16, 16), Position = UDim2.new(0, -5, 0, -5), BackgroundColor3 = C.red, Visible = false, ZIndex = 3, Parent = b }, { corner(8), stroke(WHITE, 2) })
|
||||
local dot = new("Frame", { Size = UDim2.fromOffset(14, 14), Position = UDim2.new(0, -4, 0, -4), BackgroundColor3 = C.red, Visible = false, ZIndex = 3, Parent = b }, { corner(7), stroke(WHITE, 2) })
|
||||
sideDots[label] = dot
|
||||
return b
|
||||
end
|
||||
@@ -562,6 +579,7 @@ Theme.kit = {
|
||||
makeWindow = makeWindow, scrollArea = scrollArea, itemRow = itemRow, progressBar = progressBar,
|
||||
sideButton = sideButton, notify = notify, popIn = popIn, fmt = fmt, timeStr = timeStr,
|
||||
screen = screen, hud = hud, TITLE = TITLE, BODY = BODY, BODY2 = BODY2,
|
||||
viewport = viewport, VIEW = VIEW, -- 3D-превью моделей (удочки на нижней панели — HudBar.client.lua)
|
||||
}
|
||||
|
||||
---------------------------------------------------------------- данные с сервера
|
||||
@@ -1140,6 +1158,7 @@ end)
|
||||
sideButton(6, "⚙", "Звук", nil, Color3.fromRGB(150, 120, 80), function()
|
||||
settingsWin.toggle()
|
||||
end)
|
||||
Theme.kit.bagWin = bagWin -- кнопка «Рюкзак» внизу справа (HudBar.client.lua)
|
||||
|
||||
-- раскладка: компьютер — как раньше; телефон — HUD и кнопки компактнее, кнопки сеткой 3×N под HUD
|
||||
-- (левый низ свободен под джойстик, правый низ — под кнопку прыжка)
|
||||
@@ -1152,13 +1171,13 @@ do
|
||||
Theme.onLayout(function(compact)
|
||||
scaleOf(hud.Parent).Scale = compact and 0.82 or 1
|
||||
hud.Parent.Position = compact and UDim2.fromOffset(8, 6) or UDim2.fromOffset(12, 10)
|
||||
grid.CellSize = compact and UDim2.fromOffset(52, 52) or UDim2.fromOffset(62, 62)
|
||||
grid.CellPadding = compact and UDim2.fromOffset(6, 6) or UDim2.fromOffset(6, 6)
|
||||
grid.FillDirectionMaxCells = compact and 3 or 1
|
||||
side.AnchorPoint = Vector2.zero
|
||||
-- меню: на компьютере — столбик широких кнопок, на телефоне — два столбика поуже
|
||||
grid.CellSize = compact and UDim2.fromOffset(112, 32) or UDim2.fromOffset(154, 40)
|
||||
grid.CellPadding = compact and UDim2.fromOffset(5, 5) or UDim2.fromOffset(6, 6)
|
||||
grid.FillDirectionMaxCells = compact and 2 or 1
|
||||
-- под HUD (он выше на строку гильдии — её добавляет GuildClient)
|
||||
side.Position = compact and UDim2.fromOffset(8, 172) or UDim2.fromOffset(12, 216)
|
||||
side.Size = compact and UDim2.fromOffset(170, 240) or UDim2.fromOffset(70, 480)
|
||||
H.sidePanel.Position = compact and UDim2.fromOffset(8, 176) or UDim2.fromOffset(12, 228)
|
||||
H.sidePanel.Size = compact and UDim2.fromOffset(2 * 112 + 5 + 16, 0) or UDim2.fromOffset(154 + 16, 0)
|
||||
toasts.Size = compact and UDim2.fromOffset(640, 200) or UDim2.fromOffset(900, 200)
|
||||
H.toastBaseY = compact and 66 or 84
|
||||
toasts.Position = UDim2.new(0.5, 0, 0, H.toastBaseY)
|
||||
@@ -2124,6 +2143,11 @@ local function setInterfaceHidden(hidden)
|
||||
boardGui.Enabled = hidden
|
||||
pcall(function()
|
||||
StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.All, not hidden)
|
||||
if not hidden then
|
||||
-- рюкзак и список игроков Roblox заменены своими (HudBar.client.lua)
|
||||
StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Backpack, false)
|
||||
StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.PlayerList, false)
|
||||
end
|
||||
end)
|
||||
-- надписи над объектами (порталы, лавки) тоже прячем, потом возвращаем как было
|
||||
if hidden then
|
||||
|
||||
@@ -170,6 +170,10 @@ local function setCoreHidden(hidden)
|
||||
end
|
||||
end)
|
||||
for t, on in pairs(snapshot) do
|
||||
-- рюкзак и список игроков Roblox в игре заменены своими (HudBar.client.lua) — их не возвращаем
|
||||
if t == Enum.CoreGuiType.Backpack or t == Enum.CoreGuiType.PlayerList then
|
||||
on = false
|
||||
end
|
||||
pcall(function() StarterGui:SetCoreGuiEnabled(t, (not hidden) and on) end)
|
||||
end
|
||||
end
|
||||
|
||||
+62
-32
@@ -340,16 +340,17 @@ Config.Zones = {
|
||||
}
|
||||
|
||||
---------------------------------------------------------------- удочки
|
||||
-- luck = бонус удачи, speed = множитель ожидания клёва (меньше = быстрее), zone = ширина зелёной зоны
|
||||
-- luck = бонус удачи, speed = множитель ожидания клёва (меньше = быстрее), zone = ширина зелёной зоны,
|
||||
-- icon = картинка удочки в хотбаре (Tool.TextureId)
|
||||
Config.Rods = {
|
||||
{ id = "Basic", name = "Старая удочка", price = 0, level = 1, luck = 0.00, speed = 1.00, zone = 0.22, upgradeCost = 40, style = "wood" },
|
||||
{ id = "Bamboo", name = "Бамбуковая удочка", price = 150, level = 3, luck = 0.15, speed = 0.88, zone = 0.25, upgradeCost = 120, style = "bamboo" },
|
||||
{ id = "Fiberglass", name = "Стеклопластиковая", price = 600, level = 5, luck = 0.30, speed = 0.78, zone = 0.27, upgradeCost = 300, style = "glass" },
|
||||
{ id = "Carbon", name = "Карбоновая удочка", price = 1800, level = 8, luck = 0.55, speed = 0.68, zone = 0.29, upgradeCost = 700, style = "carbon" },
|
||||
{ id = "Coral", name = "Коралловая удочка", price = 4500, level = 10, luck = 0.80, speed = 0.62, zone = 0.31, upgradeCost = 1300, style = "coral" },
|
||||
{ id = "Golden", name = "Золотая удочка", price = 9000, level = 13, luck = 1.00, speed = 0.56, zone = 0.33, upgradeCost = 2200, style = "gold" },
|
||||
{ id = "Frost", name = "Ледяная удочка", price = 25000, level = 18, luck = 1.40, speed = 0.50, zone = 0.35, upgradeCost = 5000, style = "frost" },
|
||||
{ id = "Legend", name = "Удочка Легенды", price = 75000, level = 25, luck = 2.00, speed = 0.42, zone = 0.38, upgradeCost = 12000, style = "legend" },
|
||||
{ id = "Basic", name = "Старая удочка", price = 0, level = 1, luck = 0.00, speed = 1.00, zone = 0.22, upgradeCost = 40, style = "wood", icon = "rbxassetid://83350883185349" },
|
||||
{ id = "Bamboo", name = "Бамбуковая удочка", price = 150, level = 3, luck = 0.15, speed = 0.88, zone = 0.25, upgradeCost = 120, style = "bamboo", icon = "rbxassetid://98615001898640" },
|
||||
{ id = "Fiberglass", name = "Стеклопластиковая", price = 600, level = 5, luck = 0.30, speed = 0.78, zone = 0.27, upgradeCost = 300, style = "glass", icon = "rbxassetid://100031752289540" },
|
||||
{ id = "Carbon", name = "Карбоновая удочка", price = 1800, level = 8, luck = 0.55, speed = 0.68, zone = 0.29, upgradeCost = 700, style = "carbon", icon = "rbxassetid://71788597596034" },
|
||||
{ id = "Coral", name = "Коралловая удочка", price = 4500, level = 10, luck = 0.80, speed = 0.62, zone = 0.31, upgradeCost = 1300, style = "coral", icon = "rbxassetid://139114393074237" },
|
||||
{ id = "Golden", name = "Золотая удочка", price = 9000, level = 13, luck = 1.00, speed = 0.56, zone = 0.33, upgradeCost = 2200, style = "gold", icon = "rbxassetid://83212298735071" },
|
||||
{ id = "Frost", name = "Ледяная удочка", price = 25000, level = 18, luck = 1.40, speed = 0.50, zone = 0.35, upgradeCost = 5000, style = "frost", icon = "rbxassetid://134579643216329" },
|
||||
{ id = "Legend", name = "Удочка Легенды", price = 75000, level = 25, luck = 2.00, speed = 0.42, zone = 0.38, upgradeCost = 12000, style = "legend", icon = "rbxassetid://84863811378769" },
|
||||
}
|
||||
|
||||
Config.RodUpgrade = { maxLevel = 5, luckPerLevel = 0.08, zonePerLevel = 0.012, speedPerLevel = 0.96 }
|
||||
@@ -847,7 +848,7 @@ local function sparkles(parent, color, rate)
|
||||
end
|
||||
|
||||
---------------------------------------------------------------- удочки
|
||||
-- Рука в (0,0,0), удочка смотрит в -Z и изгибается вверх (+Y).
|
||||
-- Рука в (0,0,0), удочка смотрит в -Z почти прямо, кончик слегка провисает вниз (-Y).
|
||||
|
||||
local STYLES = {
|
||||
wood = { blank = C(125, 90, 60), mat = Enum.Material.Wood, grip = C(80, 55, 35), gripMat = Enum.Material.Fabric, wrap = C(175, 175, 175), reel = C(95, 95, 100) },
|
||||
@@ -908,8 +909,8 @@ function M.buildRod(rodId, upgradeLevel, anchored)
|
||||
cyl(model, V(0.24, -0.68, -0.58), V(0.5, -0.86, -0.58), 0.07, { Color = st.reel, Material = METAL })
|
||||
ball(model, V(0.54, -0.9, -0.5), 0.19, { Color = st.grip, Material = SP })
|
||||
|
||||
-- бланк: 8 колен с плавным изгибом и шарами на стыках
|
||||
local angles = { 6, 9, 12, 16, 20, 25, 30, 36 }
|
||||
-- бланк: 8 колен, почти прямой, к кончику плавно провисает; шары на стыках
|
||||
local angles = { 0, -1, -2, -3, -5, -7, -9, -12 }
|
||||
local lengths = { 1.2, 1.15, 1.1, 1.0, 0.95, 0.9, 0.85, 0.8 }
|
||||
local p = V(0, 0, -1.55)
|
||||
local lastSeg
|
||||
@@ -1818,7 +1819,7 @@ end
|
||||
|
||||
---------------------------------------------------------------- удочка, сумка, VIP на персонаже
|
||||
|
||||
local REST_ANGLE = 30
|
||||
local REST_ANGLE = 42 -- удочка в покое: рукоять под ~42° вверх-вперёд, кончик провисает до ~30°
|
||||
local function gripCF(angle)
|
||||
return (CFrame.Angles(math.rad(angle), 0, 0) * CFrame.new(0, 0, -0.3)):Inverse()
|
||||
end
|
||||
@@ -1872,6 +1873,7 @@ local function giveRodTool(player)
|
||||
local tool = Instance.new("Tool")
|
||||
tool.Name = rod.name .. (lvl > 0 and (" +" .. lvl) or "")
|
||||
tool.ToolTip = "Кликни у воды, чтобы закинуть"
|
||||
tool.TextureId = rod.icon or ""
|
||||
tool.CanBeDropped = false
|
||||
tool.Grip = gripCF(REST_ANGLE)
|
||||
tool:SetAttribute("IsRod", true)
|
||||
@@ -6462,33 +6464,50 @@ H.rod = text({ Size = UDim2.new(1, 0, 0, 20), Position = UDim2.fromOffset(0, 128
|
||||
|
||||
-- баннер события (справа сверху)
|
||||
local eventBanner = new("Frame", {
|
||||
Name = "EventBanner", -- по имени его ставит под таблицу игроков HudBar.client.lua
|
||||
Size = UDim2.fromOffset(280, 58), AnchorPoint = Vector2.new(1, 0), Position = UDim2.new(1, -12, 0, 10),
|
||||
BackgroundColor3 = WHITE, Visible = false, Parent = screen,
|
||||
}, { corner(14), stroke(C.gold, 2, 0.1), gradient(Color3.fromRGB(90, 60, 20), C.bg, 90) })
|
||||
local eventTitle = text({ Size = UDim2.new(1, -20, 0, 26), Position = UDim2.fromOffset(12, 4), Font = TITLE, TextSize = 19, TextColor3 = C.gold, Text = "", Parent = eventBanner })
|
||||
local eventDesc = text({ Size = UDim2.new(1, -20, 0, 20), Position = UDim2.fromOffset(12, 30), Font = BODY2, TextSize = 13, TextColor3 = C.text, Text = "", Parent = eventBanner })
|
||||
|
||||
-- кнопки слева
|
||||
-- столбик на компьютере, сетка 2×N на телефоне (раскладка — в applyLayout ниже)
|
||||
-- меню слева: деревянная панель в рамке с вкладкой «≡» сверху, внутри — широкие кнопки (значок и подпись в строку).
|
||||
-- side — сетка кнопок внутри панели H.sidePanel (раскладку для телефона и компьютера задаёт applyLayout ниже)
|
||||
H.sidePanel = new("Frame", {
|
||||
Name = "SideMenu", Size = UDim2.fromOffset(170, 0), AutomaticSize = Enum.AutomaticSize.Y, Position = UDim2.fromOffset(12, 228),
|
||||
BackgroundColor3 = WHITE, Parent = screen,
|
||||
}, { corner(10), stroke(C.goldDark, 2.5, 0), Theme.woodGradient(C.wood, C.woodDark) })
|
||||
Theme.rivets(H.sidePanel, 7, 6)
|
||||
do
|
||||
local tab = new("Frame", {
|
||||
Size = UDim2.fromOffset(48, 24), AnchorPoint = Vector2.new(0.5, 0.5), Position = UDim2.new(0.5, 0, 0, 0),
|
||||
BackgroundColor3 = WHITE, ZIndex = 3, Parent = H.sidePanel,
|
||||
}, { corner(8), stroke(C.goldDark, 2, 0), Theme.woodGradient(C.woodLight, C.wood) })
|
||||
text({ Size = UDim2.fromScale(1, 1), Font = TITLE, TextSize = 18, TextXAlignment = Enum.TextXAlignment.Center, TextColor3 = C.goldBright, Text = "≡", ZIndex = 4, Parent = tab })
|
||||
end
|
||||
local side = new("Frame", {
|
||||
Size = UDim2.fromOffset(70, 380), AnchorPoint = Vector2.new(0, 0.5), Position = UDim2.new(0, 12, 0.5, 60),
|
||||
BackgroundTransparency = 1, Parent = screen,
|
||||
}, { new("UIGridLayout", { CellSize = UDim2.fromOffset(68, 68), CellPadding = UDim2.fromOffset(8, 8), FillDirectionMaxCells = 1, SortOrder = Enum.SortOrder.LayoutOrder }) })
|
||||
Size = UDim2.new(1, 0, 0, 0), AutomaticSize = Enum.AutomaticSize.Y, BackgroundTransparency = 1, Parent = H.sidePanel,
|
||||
}, {
|
||||
new("UIPadding", { PaddingTop = UDim.new(0, 18), PaddingBottom = UDim.new(0, 10), PaddingLeft = UDim.new(0, 8), PaddingRight = UDim.new(0, 8) }),
|
||||
new("UIGridLayout", { CellSize = UDim2.fromOffset(154, 40), CellPadding = UDim2.fromOffset(6, 6), FillDirectionMaxCells = 1, SortOrder = Enum.SortOrder.LayoutOrder }),
|
||||
})
|
||||
|
||||
local sideDots = {}
|
||||
local function sideButton(order, icon, label, key, color, onClick)
|
||||
-- деревянная плитка; цвет раздела — полоска-лента снизу
|
||||
local b = btn({ Size = UDim2.fromOffset(68, 68), BackgroundColor3 = C.woodLight, LayoutOrder = order, Parent = side }, onClick)
|
||||
-- широкая деревянная кнопка: цветной значок слева, подпись, справа — клавиша
|
||||
local b = btn({ Size = UDim2.fromOffset(154, 40), BackgroundColor3 = C.woodLight, LayoutOrder = order, Parent = side }, onClick)
|
||||
b:FindFirstChildOfClass("UIStroke").Color = C.goldDark
|
||||
b:FindFirstChildOfClass("UIStroke").Thickness = 2.5
|
||||
new("Frame", { Size = UDim2.new(1, -10, 0, 4), AnchorPoint = Vector2.new(0.5, 1), Position = UDim2.new(0.5, 0, 1, -4), BackgroundColor3 = color, BorderSizePixel = 0, Parent = b }, { corner(2) })
|
||||
text({ Size = UDim2.fromScale(1, 0.5), Position = UDim2.fromScale(0, 0.06), TextScaled = true, TextXAlignment = Enum.TextXAlignment.Center, Text = icon, Parent = b })
|
||||
text({ Size = UDim2.fromScale(1, 0.24), Position = UDim2.fromScale(0, 0.6), Font = TITLE, TextScaled = true, TextXAlignment = Enum.TextXAlignment.Center, Text = label, TextStrokeColor3 = C.ink, TextStrokeTransparency = 0.3, Parent = b })
|
||||
b:FindFirstChildOfClass("UIStroke").Thickness = 2
|
||||
local badge = new("Frame", { Size = UDim2.new(0, 30, 1, -10), Position = UDim2.fromOffset(5, 5), BackgroundColor3 = color, Parent = b },
|
||||
{ corner(6), stroke(C.ink, 1.5, 0.3), gradient(WHITE, Color3.fromRGB(170, 170, 170), 90) })
|
||||
text({ Size = UDim2.fromScale(1, 1), TextScaled = true, TextXAlignment = Enum.TextXAlignment.Center, Text = icon, Parent = badge })
|
||||
new("UITextSizeConstraint", { MaxTextSize = 17, Parent = text({ Size = UDim2.new(1, -66, 1, 0), Position = UDim2.fromOffset(42, 0), Font = TITLE,
|
||||
TextScaled = true, Text = label, TextStrokeColor3 = C.ink, TextStrokeTransparency = 0.3, Parent = b }) })
|
||||
if key and not UserInputService.TouchEnabled then
|
||||
local tag = new("Frame", { Size = UDim2.fromOffset(20, 20), Position = UDim2.new(1, -14, 0, -6), BackgroundColor3 = C.bg, Parent = b }, { corner(6), stroke(C.gold, 1.5) })
|
||||
local tag = new("Frame", { Size = UDim2.fromOffset(20, 20), AnchorPoint = Vector2.new(1, 0.5), Position = UDim2.new(1, -6, 0.5, 0), BackgroundColor3 = C.bg, Parent = b }, { corner(5), stroke(C.gold, 1.2) })
|
||||
text({ Size = UDim2.fromScale(1, 1), Font = TITLE, TextSize = 12, TextXAlignment = Enum.TextXAlignment.Center, TextColor3 = C.gold, Text = key, Parent = tag })
|
||||
end
|
||||
local dot = new("Frame", { Size = UDim2.fromOffset(16, 16), Position = UDim2.new(0, -5, 0, -5), BackgroundColor3 = C.red, Visible = false, ZIndex = 3, Parent = b }, { corner(8), stroke(WHITE, 2) })
|
||||
local dot = new("Frame", { Size = UDim2.fromOffset(14, 14), Position = UDim2.new(0, -4, 0, -4), BackgroundColor3 = C.red, Visible = false, ZIndex = 3, Parent = b }, { corner(7), stroke(WHITE, 2) })
|
||||
sideDots[label] = dot
|
||||
return b
|
||||
end
|
||||
@@ -6828,6 +6847,7 @@ Theme.kit = {
|
||||
makeWindow = makeWindow, scrollArea = scrollArea, itemRow = itemRow, progressBar = progressBar,
|
||||
sideButton = sideButton, notify = notify, popIn = popIn, fmt = fmt, timeStr = timeStr,
|
||||
screen = screen, hud = hud, TITLE = TITLE, BODY = BODY, BODY2 = BODY2,
|
||||
viewport = viewport, VIEW = VIEW, -- 3D-превью моделей (удочки на нижней панели — HudBar.client.lua)
|
||||
}
|
||||
|
||||
---------------------------------------------------------------- данные с сервера
|
||||
@@ -7406,6 +7426,7 @@ end)
|
||||
sideButton(6, "⚙", "Звук", nil, Color3.fromRGB(150, 120, 80), function()
|
||||
settingsWin.toggle()
|
||||
end)
|
||||
Theme.kit.bagWin = bagWin -- кнопка «Рюкзак» внизу справа (HudBar.client.lua)
|
||||
|
||||
-- раскладка: компьютер — как раньше; телефон — HUD и кнопки компактнее, кнопки сеткой 3×N под HUD
|
||||
-- (левый низ свободен под джойстик, правый низ — под кнопку прыжка)
|
||||
@@ -7418,13 +7439,13 @@ do
|
||||
Theme.onLayout(function(compact)
|
||||
scaleOf(hud.Parent).Scale = compact and 0.82 or 1
|
||||
hud.Parent.Position = compact and UDim2.fromOffset(8, 6) or UDim2.fromOffset(12, 10)
|
||||
grid.CellSize = compact and UDim2.fromOffset(52, 52) or UDim2.fromOffset(62, 62)
|
||||
grid.CellPadding = compact and UDim2.fromOffset(6, 6) or UDim2.fromOffset(6, 6)
|
||||
grid.FillDirectionMaxCells = compact and 3 or 1
|
||||
side.AnchorPoint = Vector2.zero
|
||||
-- меню: на компьютере — столбик широких кнопок, на телефоне — два столбика поуже
|
||||
grid.CellSize = compact and UDim2.fromOffset(112, 32) or UDim2.fromOffset(154, 40)
|
||||
grid.CellPadding = compact and UDim2.fromOffset(5, 5) or UDim2.fromOffset(6, 6)
|
||||
grid.FillDirectionMaxCells = compact and 2 or 1
|
||||
-- под HUD (он выше на строку гильдии — её добавляет GuildClient)
|
||||
side.Position = compact and UDim2.fromOffset(8, 172) or UDim2.fromOffset(12, 216)
|
||||
side.Size = compact and UDim2.fromOffset(170, 240) or UDim2.fromOffset(70, 480)
|
||||
H.sidePanel.Position = compact and UDim2.fromOffset(8, 176) or UDim2.fromOffset(12, 228)
|
||||
H.sidePanel.Size = compact and UDim2.fromOffset(2 * 112 + 5 + 16, 0) or UDim2.fromOffset(154 + 16, 0)
|
||||
toasts.Size = compact and UDim2.fromOffset(640, 200) or UDim2.fromOffset(900, 200)
|
||||
H.toastBaseY = compact and 66 or 84
|
||||
toasts.Position = UDim2.new(0.5, 0, 0, H.toastBaseY)
|
||||
@@ -8390,6 +8411,11 @@ local function setInterfaceHidden(hidden)
|
||||
boardGui.Enabled = hidden
|
||||
pcall(function()
|
||||
StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.All, not hidden)
|
||||
if not hidden then
|
||||
-- рюкзак и список игроков Roblox заменены своими (HudBar.client.lua)
|
||||
StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Backpack, false)
|
||||
StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.PlayerList, false)
|
||||
end
|
||||
end)
|
||||
-- надписи над объектами (порталы, лавки) тоже прячем, потом возвращаем как было
|
||||
if hidden then
|
||||
@@ -9285,6 +9311,10 @@ local function setCoreHidden(hidden)
|
||||
end
|
||||
end)
|
||||
for t, on in pairs(snapshot) do
|
||||
-- рюкзак и список игроков Roblox в игре заменены своими (HudBar.client.lua) — их не возвращаем
|
||||
if t == Enum.CoreGuiType.Backpack or t == Enum.CoreGuiType.PlayerList then
|
||||
on = false
|
||||
end
|
||||
pcall(function() StarterGui:SetCoreGuiEnabled(t, (not hidden) and on) end)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in new issue
Block a user