Hey there,
first: Sorry for my bad english ^^
I try to find a new Position for the QuickSort Plugin...
see Image...
For example 1 block:
Now i have two question.Code:elements.Add(new CuiButton { Button = { Command = "quicksort existing", Color = "0.6 0.6 0.6 0.1" }, RectTransform = { AnchorMin = "0.74 0.6", AnchorMax = "1 1" }, Text = { Text = Lang("DepositExisting"), FontSize = 16, Align = TextAnchor.MiddleCenter } }, panel);
1st: How can in replace the text @ the small Buttons with a Image...
2nd: Were can i find the original Rust Images in the Crafting List like "food" "build" "items"....
Replace text with images in CUI
Discussion in 'Rust Development' started by ScHigGn, Jul 9, 2016.
-
Attached Files:
-
-
Well... i´m done

But cant find the right Icon for Ressources and Deployable....Attached Files:
-
-
Wulf Community Admin
Feel free to pass it along if you'd like to share it and I'll implement it as an option.
-
It´s not perfect in my eyes right now. But i try to make it a little bit looks more like Original Rust UI...
And maybe the way how i edit your code is not the best ^^
Here is a code for one Button.
I dont find a better way to get an icon in the button xDCode:elements.Add(new CuiPanel { Image = { Sprite = "Assets/Icons/Weapon.png", Color = "0.6 0.6 0.6 1"}, RectTransform = { AnchorMin = "0.50 0.335", AnchorMax = "0.54 0.51"} }, panel); elements.Add(new CuiButton { Button = { Command = "quicksort weapon", Color = "0.6 0.6 0.6 0.1" }, RectTransform = { AnchorMin = "0.47 0.285", AnchorMax = "0.57 0.56" }, Text = { Text = Lang("DepositWeapons"), FontSize = 8, Align = TextAnchor.MiddleCenter, Color = "0 0 0 0"} }, panel);
PS: And i need the Asset/Icon for Ressources and Depoyable ..... i cant find it
Last edited by a moderator: Jul 10, 2016 -
Wulf Community Admin
Looks pretty good actually, I'm not sure what would be best for the other, but let me know! -
Its awkward to set the size of the Icon.
Ohw, cant explain in english what i mean
It would by nice if the size of it would % by the size of the respective CuiButton, not the full frame -
Wulf Community Admin
Yeah, that's how Rust is setup to handle it though.


