goody comit beacuse I going to sleep

This commit is contained in:
2025-09-17 21:22:44 +00:00
parent 1c6cd065db
commit f838fe45e7
9 changed files with 44 additions and 19 deletions

View File

@@ -1,5 +1,5 @@
declare class CustomTextButtonClass {
declare class CustomTextButton {
constructor(buttonName: string, labelText: string);
GetButton(): Instance;
}
export = CustomTextButtonClass;
export = CustomTextButton;

View File

@@ -1,4 +1,4 @@
declare class ImageButtonWithTextClass {
declare class ImageButtonWithText {
constructor(
name: string,
layoutOrder: number,
@@ -14,4 +14,4 @@ declare class ImageButtonWithTextClass {
SetSelected(selected: boolean): void;
GetSelected(): boolean;
}
export = ImageButtonWithTextClass;
export = ImageButtonWithText;

View File

@@ -1,4 +1,4 @@
declare class LabeledCheckboxClass {
declare class LabeledCheckbox {
constructor(nameSuffix: string, labelText: string, initValue?: boolean, initDisabled?: boolean);
GetFrame(): Instance;
GetValue(): boolean;
@@ -11,4 +11,4 @@ declare class LabeledCheckboxClass {
UseSmallSize(): void;
DisableWithOverrideValue(overrideValue: boolean): void;
}
export = LabeledCheckboxClass;
export = LabeledCheckbox;

View File

@@ -2,11 +2,11 @@ interface LabeledMultiChoiceChoice {
Id: string;
Text: string;
}
declare class LabeledMultiChoiceClass {
declare class LabeledMultiChoice {
constructor(nameSuffix: string, labelText: string, choices: LabeledMultiChoiceChoice[], initChoiceIndex?: number);
SetSelectedIndex(index: number): void;
GetSelectedIndex(): number;
SetValueChangedFunction(fn: (index: number) => void): void;
GetFrame(): Instance;
}
export = LabeledMultiChoiceClass;
export = LabeledMultiChoice;

View File

@@ -1,8 +1,8 @@
declare class LabeledRadioButtonClass {
declare class LabeledRadioButton {
constructor(nameSuffix: string, labelText: string);
GetFrame(): Instance;
GetValue(): boolean;
SetValueChangedFunction(fn: (value: boolean) => void): void;
SetValue(value: boolean): void;
}
export = LabeledRadioButtonClass;
export = LabeledRadioButton;

View File

@@ -1,8 +1,8 @@
declare class LabeledSliderClass {
declare class LabeledSlider {
constructor(nameSuffix: string, labelText: string, sliderIntervals?: number, defaultValue?: number);
SetValueChangedFunction(fn: (value: number) => void): void;
GetFrame(): Instance;
SetValue(value: number): void;
GetValue(): number;
}
export = LabeledSliderClass;
export = LabeledSlider;

View File

@@ -1,7 +1,7 @@
declare class StatefulImageButtonClass {
declare class StatefulImageButton {
constructor(buttonName: string, imageAsset: string, buttonSize: UDim2);
setSelected(selected: boolean): void;
getSelected(): boolean;
getButton(): Instance;
}
export = StatefulImageButtonClass;
export = StatefulImageButton;

View File

@@ -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();
}
}
}

View File

@@ -25,7 +25,7 @@ const roomWidget = new RoomWidget(plugin, pluginModel);
const toolbar = plugin.CreateToolbar("Next Station Plugin");
// Create Buttons
new WidgetButton(toolbar, roomWidget.widget, "Room Info", "rbxassetid//14978048121");
new WidgetButton(toolbar, roomWidget.widget, "Room Info", "rbxassetid://14978048121");
createNewRoomButton(toolbar);
// Selection Room Config Controller