forked from rojo-rbx/rojo
plugin: Title bar in session window, clean up Config
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
local Roact = require(script:FindFirstAncestor("Rojo").Roact)
|
||||
|
||||
local Config = require(script.Parent.Parent.Config)
|
||||
|
||||
local FitList = require(script.Parent.FitList)
|
||||
local FitText = require(script.Parent.FitText)
|
||||
|
||||
@@ -14,8 +16,8 @@ function ConnectPanel:init()
|
||||
self.labelSize, self.setLabelSize = Roact.createBinding(Vector2.new())
|
||||
|
||||
self:setState({
|
||||
address = "localhost",
|
||||
port = "34872",
|
||||
address = Config.defaultHost,
|
||||
port = Config.defaultPort,
|
||||
})
|
||||
end
|
||||
|
||||
@@ -44,6 +46,29 @@ function ConnectPanel:render()
|
||||
Position = UDim2.new(0.5, 0, 0, 0),
|
||||
AnchorPoint = Vector2.new(0.5, 0),
|
||||
},
|
||||
}, {
|
||||
Title = e("TextLabel", {
|
||||
LayoutOrder = 1,
|
||||
Font = Enum.Font.SourceSans,
|
||||
TextSize = 22,
|
||||
Text = "Start Rojo Session",
|
||||
Size = UDim2.new(1, 0, 0, 28),
|
||||
BackgroundTransparency = 1,
|
||||
TextColor3 = Color3.new(1, 1, 1),
|
||||
}, {
|
||||
BottomBorder = e("Frame", {
|
||||
BorderSizePixel = 0,
|
||||
BackgroundColor3 = Color3.fromRGB(48, 48, 48),
|
||||
Size = UDim2.new(1, 0, 0, 1),
|
||||
Position = UDim2.new(0, 0, 1, -1),
|
||||
}),
|
||||
}),
|
||||
|
||||
Body = e(FitList, {
|
||||
containerProps = {
|
||||
BackgroundTransparency = 1,
|
||||
LayoutOrder = 2,
|
||||
},
|
||||
layoutProps = {
|
||||
Padding = UDim.new(0, 8),
|
||||
},
|
||||
@@ -215,6 +240,7 @@ function ConnectPanel:render()
|
||||
}),
|
||||
})
|
||||
})
|
||||
})
|
||||
end
|
||||
|
||||
return ConnectPanel
|
||||
@@ -3,5 +3,6 @@ return {
|
||||
version = {0, 5, 0},
|
||||
expectedServerVersionString = "0.5.0 or newer",
|
||||
protocolVersion = 2,
|
||||
port = 34872,
|
||||
defaultHost = "localhost",
|
||||
defaultPort = 34872,
|
||||
}
|
||||
Reference in New Issue
Block a user