This commit is contained in:
2025-09-17 21:37:53 +02:00
parent 1003e84648
commit 1c6cd065db
11 changed files with 92 additions and 25 deletions

View File

@@ -3,6 +3,7 @@ import LabeledTextInput from "Lualibs/LabeledTextInput";
import VerticallyScalingListFrame from "Lualibs/VerticallyScalingListFrame";
import VerticalScrollingFrame from "Lualibs/VerticalScrollingFrame";
import { syncGuiColors } from "Utils/Gui";
import { RoomConfig } from "Utils/Room";
export class RoomWidget {
plugin: Plugin;
@@ -64,7 +65,11 @@ export class RoomWidget {
// Setup Widget
this.roomIdInput.GetFrame().Parent = this.roomCollapse.GetContentsFrame();
const textbox = this.roomIdInput.GetFrame().FindFirstChildOfClass("TextBox")!;
textbox.ClearTextOnFocus = false;
this.roomTypeInput.GetFrame().Parent = this.roomCollapse.GetContentsFrame();
const textboxf = this.roomTypeInput.GetFrame().FindFirstChildOfClass("TextBox")!;
textboxf.ClearTextOnFocus = false;
this.listFrame.AddChild(this.roomCollapse.GetSectionFrame());
this.listFrame.AddChild(this.exitCollapse.GetSectionFrame());
@@ -74,8 +79,11 @@ export class RoomWidget {
this.scrollFrame.GetSectionFrame().Parent = this.widget;
this.noRoomLabel.Parent = this.widget;
}
UpdateValue() {
UpdateValue(config: RoomConfig) {
this.roomIdValue = config.RoomId;
this.roomIdInput.SetValue(tostring(config.RoomId.Value));
this.roomTypeValue = config.RoomType;
this.roomTypeInput.SetValue(config.RoomType.Value);
}
SetActive(active: boolean) {
this.noRoomLabel.Visible = !active;