增加一個圖片

在 GUI 裡頭的圖片一般均為  [ImageLabel](<https://developer.roblox.com/en-us/api-reference/class/ImageLabel>) 物件,是基本的 2D 圖片能夠根據需要來重新調整大小

  1. 加入一個 ImageLabel 到 **ScoreBarFrame 物件,**接著選擇它

https://developer.roblox.com/assets/blt641619462dcc31a4/0eabf351f4271bbf02b47e9d7e5eb5e8.png

  1. 為了要擺放範例的皇冠圖片來作為標籤,找到 Image 屬性並貼入內容 rbxassetid://5673786644

https://developer.roblox.com/assets/bltbf439942dc4fc455/931b2aaa5a6c4612c12569032a65ff15.png

https://developer.roblox.com/assets/bltab49a78e64279227/90b238070bfdf8d2214c31e3656d65c7.jpg

  1. 展開圖片物件的 Size,並設定以下屬性值:

https://developer.roblox.com/assets/blt89249382be85522e/1e7bafe068cd8bd25624a9c296ebca05.png

https://developer.roblox.com/assets/blt84519a489a04e01c/686f5072c33bc0b0ee9bafef13e6ca85.jpg

  1. 就如你所見,這些 scaling 的值能根據 frame 的全寬來延展圖片。為了確保只有高被納入評估,改變圖片的 SizeConstraintRelativeYY

https://developer.roblox.com/assets/blt3bfdd361c74469e2/72c50cfacb1f90ee29e42ae38295cd84.png

https://developer.roblox.com/assets/blt9c9dda94bf61f39d/a14fd00a8760621434c9554cd9f49084.jpg

  1. [UIListLayout](<https://developer.roblox.com/en-us/api-reference/class/UIListLayout>) 內的元素是被它們的 LayoutOrder 來進行排序**。** 改變他的屬性為1,因為在 frame 內的圖片應該是第一個元素。你將看不到任何改變因為圖片是唯一的元素,但就目前是個好主意來設定佈局排序

https://developer.roblox.com/assets/blt6aa3536b4fc1ddbb/b2a2c42e40af332fd157aac8f938da32.png

  1. 最終,改變圖片的背景從白色改為全透明,透過設定 BackgroundTransparency 為 1

https://developer.roblox.com/assets/blt03b9102b99d35ee0/17f468ce827ba0b76303993057820c59.png

https://developer.roblox.com/assets/blt5c2345120f453a47/9e12c2196c9cbac60a08e9494bdf72d3.jpg

增加文字

GUI 文字一般透過 [TextLabel](<https://developer.roblox.com/en-us/api-reference/class/TextLabel>) 物件來渲染,這讓你能夠選擇字型.顏色.對齊以及更多