Further improve corescript formatting
This commit is contained in:
parent
9f910a5ae2
commit
d8073f394f
|
|
@ -123,13 +123,14 @@ preloadAssets = ->
|
|||
|
||||
-------------------------------- Accept/Decline Functions --------------------------------------
|
||||
removeCurrentPurchaseInfo = ->
|
||||
currentAssetId = nil
|
||||
currentCurrencyType = nil
|
||||
currentCurrencyAmount = nil
|
||||
currentEquipOnPurchase = nil
|
||||
currentProductId = nil
|
||||
currentProductInfo = nil
|
||||
currentServerResponseTable = nil
|
||||
currentAssetId \
|
||||
= currentCurrencyType \
|
||||
= currentCurrencyAmount \
|
||||
= currentEquipOnPurchase \
|
||||
= currentProductId \
|
||||
= currentProductInfo \
|
||||
= currentServerResponseTable \
|
||||
= nil
|
||||
|
||||
checkingPlayerFunds = false
|
||||
|
||||
|
|
@ -270,12 +271,11 @@ updatePurchasePromptData = (_) ->
|
|||
|
||||
purchaseDialog.BodyFrame.ItemPreview.ItemDescription.Text = newItemDescription
|
||||
|
||||
purchaseDialog.BodyFrame.ItemPreview.Image = "#{baseUrl}thumbs/asset.ashx?assetid=" ..
|
||||
if purchasingConsumable
|
||||
purchaseDialog.BodyFrame.ItemPreview.Image = baseUrl ..
|
||||
"thumbs/asset.ashx?assetid=#{currentProductInfo["IconImageAssetId"]}&x=100&y=100&format=png"
|
||||
"#{currentProductInfo["IconImageAssetId"]}&x=100&y=100&format=png"
|
||||
else
|
||||
purchaseDialog.BodyFrame.ItemPreview.Image = baseUrl ..
|
||||
"thumbs/asset.ashx?assetid=#{currentAssetId}&x=100&y=100&format=png"
|
||||
"#{currentAssetId}&x=100&y=100&format=png"
|
||||
|
||||
-- figure out what currency to use based on the currency you can actually sell the item in and what the script specified
|
||||
setCurrencyAmountAndType = (priceInRobux, priceInTix) ->
|
||||
|
|
@ -594,8 +594,7 @@ showPurchasePrompt = ->
|
|||
doPlayerFundsCheck true
|
||||
|
||||
--HideFunction
|
||||
->
|
||||
.Visible = false
|
||||
-> .Visible = false
|
||||
)
|
||||
else -- we failed in prompting a purchase, do a decline
|
||||
doDeclinePurchase!
|
||||
|
|
@ -604,8 +603,7 @@ showPurchasePrompt = ->
|
|||
-- given an asset id, this function will grab that asset from the website, and return the first "Tool" object found inside it
|
||||
getToolAssetID = (assetID) ->
|
||||
newTool = game\GetService"InsertService"\LoadAsset assetID
|
||||
if not newTool
|
||||
return nil
|
||||
return if not newTool
|
||||
|
||||
if newTool\IsA "Tool"
|
||||
return newTool
|
||||
|
|
@ -614,8 +612,6 @@ getToolAssetID = (assetID) ->
|
|||
for i in *toolChildren
|
||||
if i\IsA "Tool"
|
||||
return i
|
||||
nil
|
||||
|
||||
|
||||
-- the user tried to purchase by clicking the purchase button, but something went wrong.
|
||||
-- let them know their account was not charged, and that they do not own the item yet.
|
||||
|
|
@ -738,8 +734,7 @@ doAcceptPurchase = (_) ->
|
|||
|
||||
-- check to see if this item was bought, and if we want to equip it (also need to make sure the asset type was gear)
|
||||
if currentEquipOnPurchase and success and currentAssetId and tonumber(currentProductInfo["AssetTypeId"]) == 19
|
||||
tool = getToolAssetID tonumber currentAssetId
|
||||
if tool
|
||||
if tool = getToolAssetID tonumber currentAssetId
|
||||
tool.Parent = game.Players.LocalPlayer.Backpack
|
||||
|
||||
|
||||
|
|
@ -1135,16 +1130,13 @@ if enableBrowserWindowClosedEvent
|
|||
|
||||
Game.CoreGui.RobloxGui.Changed\connect ->
|
||||
nowIsSmallScreen = game.CoreGui.RobloxGui.AbsoluteSize.Y <= smallScreenThreshold
|
||||
if nowIsSmallScreen and not isSmallScreen
|
||||
changeGuiToScreenSize true
|
||||
changeGuiToScreenSize if nowIsSmallScreen and not isSmallScreen
|
||||
true
|
||||
elseif not nowIsSmallScreen and isSmallScreen
|
||||
changeGuiToScreenSize false
|
||||
|
||||
false
|
||||
|
||||
isSmallScreen = nowIsSmallScreen
|
||||
|
||||
|
||||
isSmallScreen = game.CoreGui.RobloxGui.AbsoluteSize.Y <= smallScreenThreshold
|
||||
if isSmallScreen
|
||||
if isSmallScreen = game.CoreGui.RobloxGui.AbsoluteSize.Y <= smallScreenThreshold
|
||||
changeGuiToScreenSize true
|
||||
|
||||
|
|
|
|||
|
|
@ -361,8 +361,13 @@ initializeDeveloperConsole = ->
|
|||
scrollDownIsDown = false
|
||||
|
||||
clean = ->
|
||||
previousMousePos = pPos = previousMousePosResize = nil
|
||||
pSize = previousMousePosScroll = pOffset = nil
|
||||
previousMousePos \
|
||||
= pPos \
|
||||
= previousMousePosResize \
|
||||
= pSize \
|
||||
= previousMousePosScroll \
|
||||
= pOffset \
|
||||
= nil
|
||||
-- pScrollHandle = nil
|
||||
scrollUpIsDown = scrollDownIsDown = false
|
||||
|
||||
|
|
|
|||
210
yue/45284430.yue
210
yue/45284430.yue
|
|
@ -309,9 +309,7 @@ t.CreateDropDownMenu = (items, onSelect, forRoblox) ->
|
|||
if scrollDownButton
|
||||
scrollDownButton.ZIndex = baseZIndex + 3
|
||||
|
||||
|
||||
children = droppedDownMenu\GetChildren!
|
||||
if children
|
||||
if children = droppedDownMenu\GetChildren!
|
||||
for _, child in ipairs children
|
||||
if child.Name == "ChoiceButton"
|
||||
child.ZIndex = baseZIndex + 2
|
||||
|
|
@ -352,10 +350,10 @@ t.CreateDropDownMenu = (items, onSelect, forRoblox) ->
|
|||
areaSoak.Visible = not areaSoak.Visible
|
||||
dropDownMenu.Visible = not dropDownSelected
|
||||
droppedDownMenu.Visible = dropDownSelected
|
||||
if dropDownSelected
|
||||
setZIndex 4
|
||||
setZIndex if dropDownSelected
|
||||
4
|
||||
else
|
||||
setZIndex 2
|
||||
2
|
||||
|
||||
if useScrollButtons
|
||||
updateScroll!
|
||||
|
|
@ -418,10 +416,8 @@ t.CreateDropDownMenu = (items, onSelect, forRoblox) ->
|
|||
Size: UDim2.new 0, 17, 0, 17
|
||||
Position: UDim2.new 1, -11, (1 * 0.8) / ((dropDownItemCount + 1) * 0.8), 0
|
||||
|
||||
scrollUpButton.MouseButton1Click\connect ->
|
||||
scrollMouseCount += 1
|
||||
scrollUpButton.MouseLeave\connect ->
|
||||
scrollMouseCount += 1
|
||||
scrollUpButton.MouseButton1Click\connect -> scrollMouseCount += 1
|
||||
scrollUpButton.MouseLeave\connect -> scrollMouseCount += 1
|
||||
scrollUpButton.MouseButton1Down\connect ->
|
||||
scrollMouseCount += 1
|
||||
|
||||
|
|
@ -443,10 +439,8 @@ t.CreateDropDownMenu = (items, onSelect, forRoblox) ->
|
|||
Position: UDim2.new 1, -11, 1, -11
|
||||
Parent: droppedDownMenu
|
||||
|
||||
scrollDownButton.MouseButton1Click\connect ->
|
||||
scrollMouseCount += 1
|
||||
scrollDownButton.MouseLeave\connect ->
|
||||
scrollMouseCount += 1
|
||||
scrollDownButton.MouseButton1Click\connect -> scrollMouseCount += 1
|
||||
scrollDownButton.MouseLeave\connect -> scrollMouseCount += 1
|
||||
scrollDownButton.MouseButton1Down\connect ->
|
||||
scrollMouseCount += 1
|
||||
|
||||
|
|
@ -579,25 +573,25 @@ layoutGuiObjectsHelper = (frame, guiObjects, settingsTable) ->
|
|||
for _, child in ipairs guiObjects
|
||||
if child\IsA"TextLabel" or child\IsA "TextButton"
|
||||
isLabel = child\IsA "TextLabel"
|
||||
if isLabel
|
||||
pixelsRemaining -= settingsTable["TextLabelPositionPadY"]
|
||||
pixelsRemaining -= if isLabel
|
||||
settingsTable["TextLabelPositionPadY"]
|
||||
else
|
||||
pixelsRemaining -= settingsTable["TextButtonPositionPadY"]
|
||||
settingsTable["TextButtonPositionPadY"]
|
||||
|
||||
child.Position = UDim2.new child.Position.X.Scale, child.Position.X.Offset, 0, totalPixels - pixelsRemaining
|
||||
child.Size = UDim2.new child.Size.X.Scale, child.Size.X.Offset, 0, pixelsRemaining
|
||||
|
||||
if child.TextFits and child.TextBounds.Y < pixelsRemaining
|
||||
child.Visible = true
|
||||
if isLabel
|
||||
child.Size = UDim2.new(
|
||||
child.Size = if isLabel
|
||||
UDim2.new(
|
||||
child.Size.X.Scale,
|
||||
child.Size.X.Offset,
|
||||
0,
|
||||
child.TextBounds.Y + settingsTable["TextLabelSizePadY"]
|
||||
)
|
||||
else
|
||||
child.Size = UDim2.new(
|
||||
UDim2.new(
|
||||
child.Size.X.Scale,
|
||||
child.Size.X.Offset,
|
||||
0,
|
||||
|
|
@ -610,10 +604,10 @@ layoutGuiObjectsHelper = (frame, guiObjects, settingsTable) ->
|
|||
|
||||
pixelsRemaining -= child.AbsoluteSize.Y
|
||||
|
||||
if isLabel
|
||||
pixelsRemaining -= settingsTable["TextLabelPositionPadY"]
|
||||
pixelsRemaining -= if isLabel
|
||||
settingsTable["TextLabelPositionPadY"]
|
||||
else
|
||||
pixelsRemaining -= settingsTable["TextButtonPositionPadY"]
|
||||
settingsTable["TextButtonPositionPadY"]
|
||||
|
||||
else
|
||||
child.Visible = false
|
||||
|
|
@ -638,7 +632,6 @@ t.LayoutGuiObjects = (frame, guiObjects, settingsTable) ->
|
|||
if not settingsTable
|
||||
settingsTable = {}
|
||||
|
||||
|
||||
if not settingsTable["TextLabelSizePadY"]
|
||||
settingsTable["TextLabelSizePadY"] = 0
|
||||
|
||||
|
|
@ -739,20 +732,16 @@ t.CreateSlider = (steps, width, position) ->
|
|||
|
||||
local areaSoakMouseMoveCon
|
||||
|
||||
areaSoak.MouseLeave\connect ->
|
||||
if areaSoak.Visible
|
||||
cancelSlide areaSoak
|
||||
f = -> if areaSoak.Visible
|
||||
cancelSlide areaSoak
|
||||
|
||||
|
||||
areaSoak.MouseButton1Up\connect ->
|
||||
if areaSoak.Visible
|
||||
cancelSlide areaSoak
|
||||
areaSoak.MouseLeave\connect f
|
||||
areaSoak.MouseButton1Up\connect f
|
||||
|
||||
|
||||
slider.MouseButton1Down\connect ->
|
||||
areaSoak.Visible = true
|
||||
if areaSoakMouseMoveCon
|
||||
areaSoakMouseMoveCon\disconnect!
|
||||
areaSoakMouseMoveCon?\disconnect!
|
||||
|
||||
areaSoakMouseMoveCon = areaSoak.MouseMoved\connect (x, _) ->
|
||||
setSliderPos x, slider, sliderPosition, bar, steps
|
||||
|
|
@ -772,13 +761,11 @@ t.CreateSlider = (steps, width, position) ->
|
|||
setSliderPos x, slider, sliderPosition, bar, steps
|
||||
|
||||
|
||||
return sliderGui, sliderPosition, sliderSteps
|
||||
sliderGui, sliderPosition, sliderSteps
|
||||
|
||||
|
||||
t.CreateTrueScrollingFrame = ->
|
||||
local lowY, highY
|
||||
|
||||
local dragCon, upCon
|
||||
local lowY, highY, dragCon, upCon
|
||||
|
||||
internalChange = false
|
||||
|
||||
|
|
@ -789,29 +776,34 @@ t.CreateTrueScrollingFrame = ->
|
|||
Size: UDim2.new 1, 0, 1, 0
|
||||
ClipsDescendants: true
|
||||
|
||||
controlFrame = New "Frame", "ControlFrame"
|
||||
BackgroundTransparency: 1
|
||||
Size: UDim2.new 0, 18, 1, 0
|
||||
Position: UDim2.new 1, -20, 0, 0
|
||||
Parent: scrollingFrame
|
||||
* New "Frame", "ControlFrame"
|
||||
BackgroundTransparency: 1
|
||||
Size: UDim2.new 0, 18, 1, 0
|
||||
Position: UDim2.new 1, -20, 0, 0
|
||||
|
||||
scrollBottom = New "BoolValue", "ScrollBottom"
|
||||
Value: false
|
||||
Parent: controlFrame
|
||||
* New "BoolValue", "ScrollBottom"
|
||||
Value: false
|
||||
|
||||
scrollUp = New "BoolValue", "scrollUp"
|
||||
Value: false
|
||||
Parent: controlFrame
|
||||
* New "BoolValue", "ScrollUp"
|
||||
Value: false
|
||||
|
||||
* New "TextButton", "ScrollUpButton"
|
||||
Text: ""
|
||||
AutoButtonColor: false
|
||||
BackgroundColor3: Color3.new 0, 0, 0
|
||||
BorderColor3: Color3.new 1, 1, 1
|
||||
BackgroundTransparency: 0.5
|
||||
Size: UDim2.new 0, 18, 0, 18
|
||||
ZIndex: 2
|
||||
|
||||
{
|
||||
ControlFrame: controlFrame
|
||||
ControlFrame:
|
||||
ScrollBottom: scrollBottom
|
||||
ScrollUp: scrollUp
|
||||
ScrollUpButton: scrollUpButton
|
||||
} = scrollingFrame
|
||||
|
||||
scrollUpButton = New "TextButton", "ScrollUpButton"
|
||||
Text: ""
|
||||
AutoButtonColor: false
|
||||
BackgroundColor3: Color3.new 0, 0, 0
|
||||
BorderColor3: Color3.new 1, 1, 1
|
||||
BackgroundTransparency: 0.5
|
||||
Size: UDim2.new 0, 18, 0, 18
|
||||
ZIndex: 2
|
||||
Parent: controlFrame
|
||||
|
||||
for i = 1, 6
|
||||
New "Frame", "tri#{i}"
|
||||
|
|
@ -865,25 +857,30 @@ t.CreateTrueScrollingFrame = ->
|
|||
Position: UDim2.new 0, 0, 0, 19
|
||||
Parent: controlFrame
|
||||
|
||||
scrollbar = New "TextButton", "ScrollBar"
|
||||
BackgroundColor3: Color3.new 0, 0, 0
|
||||
BorderColor3: Color3.new 1, 1, 1
|
||||
BackgroundTransparency: 0.5
|
||||
AutoButtonColor: false
|
||||
Text: ""
|
||||
Active: true
|
||||
ZIndex: 2
|
||||
Size: UDim2.new 0, 18, 0.1, 0
|
||||
Position: UDim2.new 0, 0, 0, 0
|
||||
Parent: scrollTrack
|
||||
* New "TextButton", "ScrollBar"
|
||||
BackgroundColor3: Color3.new 0, 0, 0
|
||||
BorderColor3: Color3.new 1, 1, 1
|
||||
BackgroundTransparency: 0.5
|
||||
AutoButtonColor: false
|
||||
Text: ""
|
||||
Active: true
|
||||
ZIndex: 2
|
||||
Size: UDim2.new 0, 18, 0.1, 0
|
||||
Position: UDim2.new 0, 0, 0, 0
|
||||
|
||||
* New "Frame", "ScrollNub"
|
||||
BorderColor3: Color3.new 1, 1, 1
|
||||
Size: UDim2.new 0, 10, 0, 0
|
||||
Position: UDim2.new 0.5, -5, 0.5, 0
|
||||
ZIndex: 2
|
||||
BackgroundTransparency: 0.5
|
||||
|
||||
{
|
||||
ScrollBar: scrollbar
|
||||
ScrollBar:
|
||||
ScrollNub: scrollNub
|
||||
} = scrollTrack
|
||||
|
||||
scrollNub = New "Frame", "ScrollNub"
|
||||
BorderColor3: Color3.new 1, 1, 1
|
||||
Size: UDim2.new 0, 10, 0, 0
|
||||
Position: UDim2.new 0.5, -5, 0.5, 0
|
||||
ZIndex: 2
|
||||
BackgroundTransparency: 0.5
|
||||
Parent: scrollbar
|
||||
|
||||
newNub = scrollNub\clone!
|
||||
newNub.Position = UDim2.new 0.5, -5, 0.5, -2
|
||||
|
|
@ -894,15 +891,15 @@ t.CreateTrueScrollingFrame = ->
|
|||
lastNub.Parent = scrollbar
|
||||
|
||||
scrollbar.MouseEnter\connect ->
|
||||
scrollbar.BackgroundTransparency = 0.1
|
||||
scrollNub.BackgroundTransparency = 0.1
|
||||
newNub.BackgroundTransparency = 0.1
|
||||
scrollbar.BackgroundTransparency = \
|
||||
scrollNub.BackgroundTransparency = \
|
||||
newNub.BackgroundTransparency = \
|
||||
lastNub.BackgroundTransparency = 0.1
|
||||
|
||||
scrollbar.MouseLeave\connect ->
|
||||
scrollbar.BackgroundTransparency = 0.5
|
||||
scrollNub.BackgroundTransparency = 0.5
|
||||
newNub.BackgroundTransparency = 0.5
|
||||
scrollbar.BackgroundTransparency = \
|
||||
scrollNub.BackgroundTransparency = \
|
||||
newNub.BackgroundTransparency = \
|
||||
lastNub.BackgroundTransparency = 0.5
|
||||
|
||||
|
||||
|
|
@ -919,14 +916,14 @@ t.CreateTrueScrollingFrame = ->
|
|||
|
||||
if y < scrollTrack.AbsolutePosition.y
|
||||
scrollbar.Position = UDim2.new scrollbar.Position.X.Scale, scrollbar.Position.X.Offset, 0, 0
|
||||
return (oldPos ~= scrollbar.Position)
|
||||
return oldPos ~= scrollbar.Position
|
||||
|
||||
|
||||
relativeSize = scrollbar.AbsoluteSize.Y / scrollTrack.AbsoluteSize.Y
|
||||
|
||||
if y > (scrollTrack.AbsolutePosition.y + scrollTrack.AbsoluteSize.y)
|
||||
scrollbar.Position = UDim2.new scrollbar.Position.X.Scale, scrollbar.Position.X.Offset, 1 - relativeSize, 0
|
||||
return (oldPos ~= scrollbar.Position)
|
||||
return oldPos ~= scrollbar.Position
|
||||
|
||||
newScaleYPos = (y - scrollTrack.AbsolutePosition.y - offset) / scrollTrack.AbsoluteSize.y
|
||||
if newScaleYPos + relativeSize > 1
|
||||
|
|
@ -943,7 +940,7 @@ t.CreateTrueScrollingFrame = ->
|
|||
|
||||
scrollbar.Position = UDim2.new scrollbar.Position.X.Scale, scrollbar.Position.X.Offset, newScaleYPos, 0
|
||||
|
||||
return (oldPos ~= scrollbar.Position)
|
||||
oldPos ~= scrollbar.Position
|
||||
|
||||
|
||||
drillDownSetHighLow = (instance) ->
|
||||
|
|
@ -998,7 +995,7 @@ t.CreateTrueScrollingFrame = ->
|
|||
)
|
||||
|
||||
|
||||
lowY = nil
|
||||
lowY = \
|
||||
highY = nil
|
||||
resetHighLow!
|
||||
internalChange = false
|
||||
|
|
@ -1009,8 +1006,8 @@ t.CreateTrueScrollingFrame = ->
|
|||
|
||||
totalYSpan = math.abs highY - lowY
|
||||
if totalYSpan == 0
|
||||
scrollbar.Visible = false
|
||||
scrollDownButton.Visible = false
|
||||
scrollbar.Visible = \
|
||||
scrollDownButton.Visible = \
|
||||
scrollUpButton.Visible = false
|
||||
|
||||
if dragCon
|
||||
|
|
@ -1083,8 +1080,7 @@ t.CreateTrueScrollingFrame = ->
|
|||
if scrollUpButton.Active
|
||||
scrollStamp = tick!
|
||||
current = scrollStamp
|
||||
local upCon
|
||||
upCon = mouseDrag.MouseButton1Up\connect ->
|
||||
local upCon = mouseDrag.MouseButton1Up\connect ->
|
||||
scrollStamp = tick!
|
||||
mouseDrag.Parent = nil
|
||||
upCon\disconnect!
|
||||
|
|
@ -1148,11 +1144,11 @@ t.CreateTrueScrollingFrame = ->
|
|||
upCon = nil
|
||||
|
||||
reentrancyGuardMouseScroll = false
|
||||
dragCon = mouseDrag.MouseMoved\connect (x, y) ->
|
||||
dragCon = mouseDrag.MouseMoved\connect (x2, y2) ->
|
||||
return if reentrancyGuardMouseScroll
|
||||
|
||||
reentrancyGuardMouseScroll = true
|
||||
if positionScrollBar x, y, mouseOffset
|
||||
if positionScrollBar x2, y2, mouseOffset
|
||||
recalculate!
|
||||
|
||||
reentrancyGuardMouseScroll = false
|
||||
|
|
@ -1170,11 +1166,8 @@ t.CreateTrueScrollingFrame = ->
|
|||
|
||||
scrollMouseCount = 0
|
||||
|
||||
scrollUpButton.MouseButton1Down\connect ->
|
||||
scrollUp!
|
||||
|
||||
scrollDownButton.MouseButton1Down\connect ->
|
||||
scrollDown!
|
||||
scrollUpButton.MouseButton1Down\connect -> scrollUp!
|
||||
scrollDownButton.MouseButton1Down\connect -> scrollDown!
|
||||
|
||||
|
||||
scrollTick = ->
|
||||
|
|
@ -1331,7 +1324,7 @@ t.CreateScrollingFrame = (orderList, scrollStyle) ->
|
|||
|
||||
totalPixelsX = frame.AbsoluteSize.X
|
||||
|
||||
xCounter = 0
|
||||
xCounter = \
|
||||
rowSizeCounter = 0
|
||||
setRowSize = true
|
||||
|
||||
|
|
@ -2055,13 +2048,14 @@ CreateBasicTutorialPage = (name, handleResize, skipTutorial, giveDoneButton) ->
|
|||
Size: UDim2.new 1, -55, 0, 22
|
||||
Position: UDim2.new 0, 0, 0, 0
|
||||
|
||||
skipButton = New "ImageButton", "SkipButton"
|
||||
AutoButtonColor: false
|
||||
BackgroundTransparency: 1
|
||||
Image: "rbxasset://textures/ui/closeButton.png"
|
||||
Size: UDim2.new 0, 25, 0, 25
|
||||
Position: UDim2.new 1, -25, 0, 0
|
||||
Parent: frame
|
||||
* New "ImageButton", "SkipButton"
|
||||
AutoButtonColor: false
|
||||
BackgroundTransparency: 1
|
||||
Image: "rbxasset://textures/ui/closeButton.png"
|
||||
Size: UDim2.new 0, 25, 0, 25
|
||||
Position: UDim2.new 1, -25, 0, 0
|
||||
|
||||
{ SkipButton: skipButton } = frame
|
||||
|
||||
skipButton.MouseButton1Click\connect ->
|
||||
skipTutorial!
|
||||
|
|
@ -2096,10 +2090,10 @@ CreateBasicTutorialPage = (name, handleResize, skipTutorial, giveDoneButton) ->
|
|||
Position: UDim2.new 0, 0, 0, 25
|
||||
Parent: frame
|
||||
|
||||
innerFrame.Size = if giveDoneButton
|
||||
UDim2.new 1, 0, 1, -75
|
||||
innerFrame.Size = UDim2.new 1, 0, 1, if giveDoneButton
|
||||
-75
|
||||
else
|
||||
UDim2.new 1, 0, 1, -22
|
||||
-22
|
||||
|
||||
|
||||
local parentConnection
|
||||
|
|
@ -2122,10 +2116,8 @@ CreateBasicTutorialPage = (name, handleResize, skipTutorial, giveDoneButton) ->
|
|||
wait!
|
||||
basicHandleResize!
|
||||
|
||||
|
||||
basicHandleResize!
|
||||
|
||||
|
||||
if prop == "Visible"
|
||||
basicHandleResize!
|
||||
|
||||
|
|
|
|||
|
|
@ -912,12 +912,12 @@ createGameSettingsMenu = (baseZIndex, _) ->
|
|||
isAutoGraphics = active
|
||||
if active
|
||||
autoGraphicsButton.Text = "X"
|
||||
betterQualityText.ZIndex = 1
|
||||
betterQualityShortcut.ZIndex = 1
|
||||
fasterShortcut.ZIndex = 1
|
||||
fasterText.ZIndex = 1
|
||||
graphicsSlider.Bar.ZIndex = 1
|
||||
graphicsSlider.Bar.Slider.ZIndex = 1
|
||||
betterQualityText.ZIndex = \
|
||||
betterQualityShortcut.ZIndex = \
|
||||
fasterShortcut.ZIndex = \
|
||||
fasterText.ZIndex = \
|
||||
graphicsSlider.Bar.ZIndex = \
|
||||
graphicsSlider.Bar.Slider.ZIndex = \
|
||||
graphicsSetter.ZIndex = 1
|
||||
graphicsSetter.Text = "Auto"
|
||||
else
|
||||
|
|
@ -997,13 +997,13 @@ createGameSettingsMenu = (baseZIndex, _) ->
|
|||
|
||||
|
||||
hideManualGraphics = ->
|
||||
betterQualityText.ZIndex = 1
|
||||
betterQualityShortcut.ZIndex = 1
|
||||
fasterShortcut.ZIndex = 1
|
||||
fasterText.ZIndex = 1
|
||||
graphicsSlider.Bar.ZIndex = 1
|
||||
graphicsSlider.Bar.Slider.ZIndex = 1
|
||||
graphicsSetter.ZIndex = 1
|
||||
betterQualityText.ZIndex \
|
||||
= betterQualityShortcut.ZIndex \
|
||||
= fasterShortcut.ZIndex \
|
||||
= fasterText.ZIndex \
|
||||
= graphicsSlider.Bar.ZIndex \
|
||||
= graphicsSlider.Bar.Slider.ZIndex \
|
||||
= graphicsSetter.ZIndex = 1
|
||||
|
||||
|
||||
translateSavedQualityLevelToInt = (savedQualityLevel) ->
|
||||
|
|
|
|||
|
|
@ -864,13 +864,14 @@ local SelectedPlayerEntry
|
|||
local SelectedPlayer
|
||||
|
||||
-- locks(semaphores) for stopping race conditions
|
||||
AddingFrameLock = false
|
||||
AddingStatLock = false
|
||||
BaseUpdateLock = false
|
||||
WaitForClickLock = false
|
||||
InPopupWaitForClick = false
|
||||
PlayerChangedLock = false
|
||||
NeutralTeamLock = false
|
||||
AddingFrameLock \
|
||||
= AddingStatLock \
|
||||
= BaseUpdateLock \
|
||||
= WaitForClickLock \
|
||||
= InPopupWaitForClick \
|
||||
= PlayerChangedLock \
|
||||
= NeutralTeamLock \
|
||||
= false
|
||||
|
||||
ScrollWheelConnections = {}
|
||||
|
||||
|
|
|
|||
|
|
@ -840,12 +840,13 @@ ColorZone = makeZone(
|
|||
UDim2.new(0.5, -60, 0.5, -100),
|
||||
ColorFrame
|
||||
)
|
||||
makeStyledButton("Head", UDim2.new(0.26, 0, 0.19, 0), UDim2.new(0.37, 0, 0.02, 0), ColorZone).AutoButtonColor = false
|
||||
makeStyledButton("LeftArm", UDim2.new(0.19, 0, 0.36, 0), UDim2.new(0.78, 0, 0.26, 0), ColorZone).AutoButtonColor = false
|
||||
makeStyledButton("RightArm", UDim2.new(0.19, 0, 0.36, 0), UDim2.new(0.025, 0, 0.26, 0), ColorZone).AutoButtonColor = false
|
||||
makeStyledButton("Torso", UDim2.new(0.43, 0, 0.36, 0), UDim2.new(0.28, 0, 0.26, 0), ColorZone).AutoButtonColor = false
|
||||
makeStyledButton("RightLeg", UDim2.new(0.19, 0, 0.31, 0), UDim2.new(0.275, 0, 0.67, 0), ColorZone).AutoButtonColor = false
|
||||
makeStyledButton("LeftLeg", UDim2.new(0.19, 0, 0.31, 0), UDim2.new(0.525, 0, 0.67, 0), ColorZone).AutoButtonColor = false
|
||||
makeStyledButton("Head", UDim2.new(0.26, 0, 0.19, 0), UDim2.new(0.37, 0, 0.02, 0), ColorZone).AutoButtonColor \
|
||||
= makeStyledButton("LeftArm", UDim2.new(0.19, 0, 0.36, 0), UDim2.new(0.78, 0, 0.26, 0), ColorZone).AutoButtonColor \
|
||||
= makeStyledButton("RightArm", UDim2.new(0.19, 0, 0.36, 0), UDim2.new(0.025, 0, 0.26, 0), ColorZone).AutoButtonColor \
|
||||
= makeStyledButton("Torso", UDim2.new(0.43, 0, 0.36, 0), UDim2.new(0.28, 0, 0.26, 0), ColorZone).AutoButtonColor \
|
||||
= makeStyledButton("RightLeg", UDim2.new(0.19, 0, 0.31, 0), UDim2.new(0.275, 0, 0.67, 0), ColorZone).AutoButtonColor \
|
||||
= makeStyledButton("LeftLeg", UDim2.new(0.19, 0, 0.31, 0), UDim2.new(0.525, 0, 0.67, 0), ColorZone).AutoButtonColor \
|
||||
= false
|
||||
|
||||
-- no need for this to stick around
|
||||
|
||||
|
|
|
|||
|
|
@ -218,7 +218,10 @@ insertGear = (gear, addToSlot) ->
|
|||
|
||||
for i = start, pos + 1, -1
|
||||
gearSlots[i] = gearSlots[i - 1]
|
||||
gearSlots[i].SlotNumber.Text = gearSlots[i].SlotNumberDownShadow.Text = gearSlots[i].SlotNumberUpShadow.Text = if i == 10
|
||||
gearSlots[i].SlotNumber.Text \
|
||||
= gearSlots[i].SlotNumberDownShadow.Text \
|
||||
= gearSlots[i].SlotNumberUpShadow.Text \
|
||||
= if i == 10
|
||||
"0"
|
||||
else
|
||||
i
|
||||
|
|
@ -228,8 +231,8 @@ insertGear = (gear, addToSlot) ->
|
|||
if pos ~= maxNumLoadoutItems
|
||||
if type"#{pos}" == "string"
|
||||
posString = "#{pos}"
|
||||
gear.SlotNumber.Text = posString
|
||||
gear.SlotNumberDownShadow.Text = posString
|
||||
gear.SlotNumber.Text = \
|
||||
gear.SlotNumberDownShadow.Text = \
|
||||
gear.SlotNumberUpShadow.Text = posString
|
||||
|
||||
else -- tenth gear doesn't follow mathematical pattern :(
|
||||
|
|
|
|||
|
|
@ -106,11 +106,10 @@ JsonWriter.WriteString = (o) => @\Append "#{o}"
|
|||
JsonWriter.ParseString = (s) =>
|
||||
@\Append '"'
|
||||
@\Append string.gsub s, '[%z%c\\"/]', (n) ->
|
||||
c = @backslashes[n]
|
||||
if c
|
||||
if c = @backslashes[n]
|
||||
return c
|
||||
|
||||
return string.format "\\u%.4X", string.byte n
|
||||
string.format "\\u%.4X", string.byte n
|
||||
|
||||
@\Append '"'
|
||||
|
||||
|
|
@ -123,7 +122,7 @@ JsonWriter.IsArray = (t) =>
|
|||
math.floor(k) == k
|
||||
|
||||
return true
|
||||
return false
|
||||
false
|
||||
|
||||
for k, _ in pairs t
|
||||
if not isindex k
|
||||
|
|
|
|||
Loading…
Reference in New Issue