This commit is contained in:
Yoshman29
2023-03-18 21:32:12 +01:00
parent 2ed0fbeca9
commit c145ef7cef
2 changed files with 5 additions and 4 deletions
+5 -2
View File
@@ -50,8 +50,11 @@ typedef UIContextMenuOption = {
class UIContextMenuOptionSpr extends UISpliceSprite {
public var label:UIText;
public function new(x:Float, y:Float, t:String) {
label = new UIText(20, 2, 0, t);
public var option:UIContextMenuOption;
public function new(x:Float, y:Float, option:UIContextMenuOption) {
label = new UIText(20, 2, 0, option.label);
this.option = option;
super(x, y, label.frameWidth + 22, label.frameHeight + 4, 'editors/ui/button');
members.push(label);