goody comit beacuse I going to sleep
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import CollapsibleTitledSection from "Lualibs/CollapsibleTitledSection";
|
||||
import CustomTextButton from "Lualibs/CustomTextButton";
|
||||
import LabeledTextInput from "Lualibs/LabeledTextInput";
|
||||
import VerticallyScalingListFrame from "Lualibs/VerticallyScalingListFrame";
|
||||
import VerticalScrollingFrame from "Lualibs/VerticalScrollingFrame";
|
||||
@@ -65,11 +66,11 @@ export class RoomWidget {
|
||||
|
||||
// Setup Widget
|
||||
this.roomIdInput.GetFrame().Parent = this.roomCollapse.GetContentsFrame();
|
||||
const textbox = this.roomIdInput.GetFrame().FindFirstChildOfClass("TextBox")!;
|
||||
textbox.ClearTextOnFocus = false;
|
||||
const idTextBox = this.roomIdInput.GetFrame().FindFirstChildWhichIsA("TextBox", true)!;
|
||||
idTextBox.ClearTextOnFocus = false;
|
||||
this.roomTypeInput.GetFrame().Parent = this.roomCollapse.GetContentsFrame();
|
||||
const textboxf = this.roomTypeInput.GetFrame().FindFirstChildOfClass("TextBox")!;
|
||||
textboxf.ClearTextOnFocus = false;
|
||||
const typeTextBox = this.roomTypeInput.GetFrame().FindFirstChildWhichIsA("TextBox", true)!;
|
||||
typeTextBox.ClearTextOnFocus = false;
|
||||
this.listFrame.AddChild(this.roomCollapse.GetSectionFrame());
|
||||
this.listFrame.AddChild(this.exitCollapse.GetSectionFrame());
|
||||
|
||||
@@ -88,4 +89,28 @@ export class RoomWidget {
|
||||
SetActive(active: boolean) {
|
||||
this.noRoomLabel.Visible = !active;
|
||||
}
|
||||
ReloadExits(exits: CFrameValue[]) {
|
||||
this.exitCollapse.GetContentsFrame().ClearAllChildren();
|
||||
|
||||
for (const exit of exits) {
|
||||
const exitCollapse = new CollapsibleTitledSection(
|
||||
"ExitCollapse_" + exit.Name, // name suffix of the gui object
|
||||
exit.Name, // the text displayed beside the collapsible arrow
|
||||
true, // have the content frame auto-update its size?
|
||||
true, // minimizable?
|
||||
false, // minimized by default?
|
||||
);
|
||||
|
||||
const button = new CustomTextButton(
|
||||
"edit_button", // name of the gui object
|
||||
"Edit", // the text displayed on the button
|
||||
);
|
||||
(button.GetButton() as ImageButton).Activated.Connect(() => {
|
||||
|
||||
});
|
||||
|
||||
// Handle widget
|
||||
exitCollapse.GetContentsFrame().Parent = this.exitCollapse.GetSectionFrame();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user