public InputButton(InputGraphic parent, Vector2 pos, string keyName, Func <Inputs, bool> inputGetter) : this(parent, pos, inputGetter) { _key = new FLabel("font", keyName); Move(Vector2.zero); AddToContainer(); if (scale < 0.75f) { _key.text = keyName.Substring(0, 1); } }
private void RoomCamera_ctor(On.RoomCamera.orig_ctor orig, RoomCamera self, RainWorldGame game, int cameraNumber) { orig(self, game, cameraNumber); if (inputGraphics.Length <= cameraNumber) { Array.Resize(ref inputGraphics, cameraNumber + 1); } inputGraphics[self.cameraNumber]?.Remove(); InputGraphic ig = new InputGraphic(self); inputGraphics[cameraNumber] = ig; ig.Move(); }
private InputButton(InputGraphic parent, Vector2 pos, Func <Inputs, bool> inputGetter) { this.parent = parent; _back = new FSprite("pixel") { anchorX = 0f, anchorY = 0f, scale = Size, color = backColor }; _front = new FSprite("pixel") { anchorX = 0f, anchorY = 0f, scale = Size - 2f }; _rtIndicator = new FSprite("deerEyeB") { anchorX = 0f, anchorY = 0f }; _inputGetter = inputGetter; relPos = pos; }
public InputButton(InputGraphic parent, Vector2 pos, FSprite keySprite, Func <Inputs, bool> inputGetter) : this(parent, pos, inputGetter) { _keySprite = keySprite; Move(Vector2.zero); AddToContainer(); }