goody comit beacuse I going to sleep
This commit is contained in:
4
src/Lualibs/CustomTextButton.d.ts
vendored
4
src/Lualibs/CustomTextButton.d.ts
vendored
@@ -1,5 +1,5 @@
|
|||||||
declare class CustomTextButtonClass {
|
declare class CustomTextButton {
|
||||||
constructor(buttonName: string, labelText: string);
|
constructor(buttonName: string, labelText: string);
|
||||||
GetButton(): Instance;
|
GetButton(): Instance;
|
||||||
}
|
}
|
||||||
export = CustomTextButtonClass;
|
export = CustomTextButton;
|
||||||
|
|||||||
4
src/Lualibs/ImageButtonWithText.d.ts
vendored
4
src/Lualibs/ImageButtonWithText.d.ts
vendored
@@ -1,4 +1,4 @@
|
|||||||
declare class ImageButtonWithTextClass {
|
declare class ImageButtonWithText {
|
||||||
constructor(
|
constructor(
|
||||||
name: string,
|
name: string,
|
||||||
layoutOrder: number,
|
layoutOrder: number,
|
||||||
@@ -14,4 +14,4 @@ declare class ImageButtonWithTextClass {
|
|||||||
SetSelected(selected: boolean): void;
|
SetSelected(selected: boolean): void;
|
||||||
GetSelected(): boolean;
|
GetSelected(): boolean;
|
||||||
}
|
}
|
||||||
export = ImageButtonWithTextClass;
|
export = ImageButtonWithText;
|
||||||
|
|||||||
4
src/Lualibs/LabeledCheckbox.d.ts
vendored
4
src/Lualibs/LabeledCheckbox.d.ts
vendored
@@ -1,4 +1,4 @@
|
|||||||
declare class LabeledCheckboxClass {
|
declare class LabeledCheckbox {
|
||||||
constructor(nameSuffix: string, labelText: string, initValue?: boolean, initDisabled?: boolean);
|
constructor(nameSuffix: string, labelText: string, initValue?: boolean, initDisabled?: boolean);
|
||||||
GetFrame(): Instance;
|
GetFrame(): Instance;
|
||||||
GetValue(): boolean;
|
GetValue(): boolean;
|
||||||
@@ -11,4 +11,4 @@ declare class LabeledCheckboxClass {
|
|||||||
UseSmallSize(): void;
|
UseSmallSize(): void;
|
||||||
DisableWithOverrideValue(overrideValue: boolean): void;
|
DisableWithOverrideValue(overrideValue: boolean): void;
|
||||||
}
|
}
|
||||||
export = LabeledCheckboxClass;
|
export = LabeledCheckbox;
|
||||||
|
|||||||
4
src/Lualibs/LabeledMultiChoice.d.ts
vendored
4
src/Lualibs/LabeledMultiChoice.d.ts
vendored
@@ -2,11 +2,11 @@ interface LabeledMultiChoiceChoice {
|
|||||||
Id: string;
|
Id: string;
|
||||||
Text: string;
|
Text: string;
|
||||||
}
|
}
|
||||||
declare class LabeledMultiChoiceClass {
|
declare class LabeledMultiChoice {
|
||||||
constructor(nameSuffix: string, labelText: string, choices: LabeledMultiChoiceChoice[], initChoiceIndex?: number);
|
constructor(nameSuffix: string, labelText: string, choices: LabeledMultiChoiceChoice[], initChoiceIndex?: number);
|
||||||
SetSelectedIndex(index: number): void;
|
SetSelectedIndex(index: number): void;
|
||||||
GetSelectedIndex(): number;
|
GetSelectedIndex(): number;
|
||||||
SetValueChangedFunction(fn: (index: number) => void): void;
|
SetValueChangedFunction(fn: (index: number) => void): void;
|
||||||
GetFrame(): Instance;
|
GetFrame(): Instance;
|
||||||
}
|
}
|
||||||
export = LabeledMultiChoiceClass;
|
export = LabeledMultiChoice;
|
||||||
|
|||||||
4
src/Lualibs/LabeledRadioButton.d.ts
vendored
4
src/Lualibs/LabeledRadioButton.d.ts
vendored
@@ -1,8 +1,8 @@
|
|||||||
declare class LabeledRadioButtonClass {
|
declare class LabeledRadioButton {
|
||||||
constructor(nameSuffix: string, labelText: string);
|
constructor(nameSuffix: string, labelText: string);
|
||||||
GetFrame(): Instance;
|
GetFrame(): Instance;
|
||||||
GetValue(): boolean;
|
GetValue(): boolean;
|
||||||
SetValueChangedFunction(fn: (value: boolean) => void): void;
|
SetValueChangedFunction(fn: (value: boolean) => void): void;
|
||||||
SetValue(value: boolean): void;
|
SetValue(value: boolean): void;
|
||||||
}
|
}
|
||||||
export = LabeledRadioButtonClass;
|
export = LabeledRadioButton;
|
||||||
|
|||||||
4
src/Lualibs/LabeledSlider.d.ts
vendored
4
src/Lualibs/LabeledSlider.d.ts
vendored
@@ -1,8 +1,8 @@
|
|||||||
declare class LabeledSliderClass {
|
declare class LabeledSlider {
|
||||||
constructor(nameSuffix: string, labelText: string, sliderIntervals?: number, defaultValue?: number);
|
constructor(nameSuffix: string, labelText: string, sliderIntervals?: number, defaultValue?: number);
|
||||||
SetValueChangedFunction(fn: (value: number) => void): void;
|
SetValueChangedFunction(fn: (value: number) => void): void;
|
||||||
GetFrame(): Instance;
|
GetFrame(): Instance;
|
||||||
SetValue(value: number): void;
|
SetValue(value: number): void;
|
||||||
GetValue(): number;
|
GetValue(): number;
|
||||||
}
|
}
|
||||||
export = LabeledSliderClass;
|
export = LabeledSlider;
|
||||||
|
|||||||
4
src/Lualibs/StatefulImageButton.d.ts
vendored
4
src/Lualibs/StatefulImageButton.d.ts
vendored
@@ -1,7 +1,7 @@
|
|||||||
declare class StatefulImageButtonClass {
|
declare class StatefulImageButton {
|
||||||
constructor(buttonName: string, imageAsset: string, buttonSize: UDim2);
|
constructor(buttonName: string, imageAsset: string, buttonSize: UDim2);
|
||||||
setSelected(selected: boolean): void;
|
setSelected(selected: boolean): void;
|
||||||
getSelected(): boolean;
|
getSelected(): boolean;
|
||||||
getButton(): Instance;
|
getButton(): Instance;
|
||||||
}
|
}
|
||||||
export = StatefulImageButtonClass;
|
export = StatefulImageButton;
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import CollapsibleTitledSection from "Lualibs/CollapsibleTitledSection";
|
import CollapsibleTitledSection from "Lualibs/CollapsibleTitledSection";
|
||||||
|
import CustomTextButton from "Lualibs/CustomTextButton";
|
||||||
import LabeledTextInput from "Lualibs/LabeledTextInput";
|
import LabeledTextInput from "Lualibs/LabeledTextInput";
|
||||||
import VerticallyScalingListFrame from "Lualibs/VerticallyScalingListFrame";
|
import VerticallyScalingListFrame from "Lualibs/VerticallyScalingListFrame";
|
||||||
import VerticalScrollingFrame from "Lualibs/VerticalScrollingFrame";
|
import VerticalScrollingFrame from "Lualibs/VerticalScrollingFrame";
|
||||||
@@ -65,11 +66,11 @@ export class RoomWidget {
|
|||||||
|
|
||||||
// Setup Widget
|
// Setup Widget
|
||||||
this.roomIdInput.GetFrame().Parent = this.roomCollapse.GetContentsFrame();
|
this.roomIdInput.GetFrame().Parent = this.roomCollapse.GetContentsFrame();
|
||||||
const textbox = this.roomIdInput.GetFrame().FindFirstChildOfClass("TextBox")!;
|
const idTextBox = this.roomIdInput.GetFrame().FindFirstChildWhichIsA("TextBox", true)!;
|
||||||
textbox.ClearTextOnFocus = false;
|
idTextBox.ClearTextOnFocus = false;
|
||||||
this.roomTypeInput.GetFrame().Parent = this.roomCollapse.GetContentsFrame();
|
this.roomTypeInput.GetFrame().Parent = this.roomCollapse.GetContentsFrame();
|
||||||
const textboxf = this.roomTypeInput.GetFrame().FindFirstChildOfClass("TextBox")!;
|
const typeTextBox = this.roomTypeInput.GetFrame().FindFirstChildWhichIsA("TextBox", true)!;
|
||||||
textboxf.ClearTextOnFocus = false;
|
typeTextBox.ClearTextOnFocus = false;
|
||||||
this.listFrame.AddChild(this.roomCollapse.GetSectionFrame());
|
this.listFrame.AddChild(this.roomCollapse.GetSectionFrame());
|
||||||
this.listFrame.AddChild(this.exitCollapse.GetSectionFrame());
|
this.listFrame.AddChild(this.exitCollapse.GetSectionFrame());
|
||||||
|
|
||||||
@@ -88,4 +89,28 @@ export class RoomWidget {
|
|||||||
SetActive(active: boolean) {
|
SetActive(active: boolean) {
|
||||||
this.noRoomLabel.Visible = !active;
|
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();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ const roomWidget = new RoomWidget(plugin, pluginModel);
|
|||||||
const toolbar = plugin.CreateToolbar("Next Station Plugin");
|
const toolbar = plugin.CreateToolbar("Next Station Plugin");
|
||||||
|
|
||||||
// Create Buttons
|
// Create Buttons
|
||||||
new WidgetButton(toolbar, roomWidget.widget, "Room Info", "rbxassetid//14978048121");
|
new WidgetButton(toolbar, roomWidget.widget, "Room Info", "rbxassetid://14978048121");
|
||||||
createNewRoomButton(toolbar);
|
createNewRoomButton(toolbar);
|
||||||
|
|
||||||
// Selection Room Config Controller
|
// Selection Room Config Controller
|
||||||
|
|||||||
Reference in New Issue
Block a user