• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Help & Support

Status
Not open for further replies.
Level 1
Joined
Jun 28, 2021
Messages
2
Hello,
I have done some basic UI for my game with your system, it is excellent and only limited by what we think of.
Now I am having an issue which is, when the map starts I have a lot of triggers that run and cause a half-a-second delay on map start, during that the UI stays on screen, all of it, what is the best way to remove it from there?
 

NightKnight

Hosted Project RUID
Level 14
Joined
Sep 3, 2014
Messages
222
Hello,
I have done some basic UI for my game with your system, it is excellent and only limited by what we think of.
Now I am having an issue which is, when the map starts I have a lot of triggers that run and cause a half-a-second delay on map start, during that the UI stays on screen, all of it, what is the best way to remove it from there?
If you dont want the Ui initialized at map start, you will have to manually edit the jass output, prevent the library from automatically running the initialization and calling the init function manually when you want.
 

NightKnight

Hosted Project RUID
Level 14
Joined
Sep 3, 2014
Messages
222
Hello, I wanna know how can I make dynamic sized a frame created with this program?, because how it works the size is determined or is there something that I'm missing?
You can turn on "relative position" for the frame you want, then it will be dynamic and change size if the parent's size changes.
 
Level 9
Joined
Nov 27, 2014
Messages
1,966
A quick question, does the UI innately support Multiplayer? Suppose I want a similar custom UI to show for all players that they can independently interact with, do I need to do any kind of arrays or workaround?
 
Last edited:

NightKnight

Hosted Project RUID
Level 14
Joined
Sep 3, 2014
Messages
222
A quick question, does the UI innately support Multiplayer? Suppose I want a similar custom UI to show for all players that they can independently interact with, do I need to do any kind of arrays or workaround?
There are 2 ways:
1- Using the same UI, you would identify the player interacting with the UI and do actions or modifications for them, and if modifications on the UI, you would do it locally for them.
2- Using an isolated UI set for each player (basically a copy of all the UI for each), you'd only show 1 copy to each player, and then you will already know whose UI for which player, so you dont need to identify the player, as well as you won't need to do UI modifications locally, since you only show that UI for that specific player only.
First way is the classic way, second way is great if you know how to deal with OOP in whatever language you use (most easily done in TypeScript).
 
Level 9
Joined
Nov 27, 2014
Messages
1,966
There are 2 ways:
1- Using the same UI, you would identify the player interacting with the UI and do actions or modifications for them, and if modifications on the UI, you would do it locally for them.
2- Using an isolated UI set for each player (basically a copy of all the UI for each), you'd only show 1 copy to each player, and then you will already know whose UI for which player, so you dont need to identify the player, as well as you won't need to do UI modifications locally, since you only show that UI for that specific player only.
First way is the classic way, second way is great if you know how to deal with OOP in whatever language you use (most easily done in TypeScript).
1) I’m going this route rn. (Bear with me for a bit longer please)
I am still new to JASS(and it is confusing/painful at times) and have been looking around for any kind of local UI modification techniques. Closest i've come across is getting LocalPlayer and GettingTriggerPlayer then doing said UI changes. I have not tested this in a Multi sense so far but would like to know if this is the best/correct way or any other potential paths to do so.
Appreciate, any help.

2) I have not used Typescript but , I have some knowledge in OOP and am interested to try. Would this better in your opinion? If so where would i start?
 
Last edited:

NightKnight

Hosted Project RUID
Level 14
Joined
Sep 3, 2014
Messages
222
1) I’m going this route rn. (Bear with me for a bit longer please)
I am still new to JASS(and it is confusing/painful at times) and have been looking around for any kind of local UI modification techniques. Closest i've come across is getting LocalPlayer and GettingTriggerPlayer then doing said UI changes. I have not tested this in a Multi sense so far but would like to know if this is the best/correct way or any other potential paths to do so.
Appreciate, any help.

2) I have not used Typescript but , I have some knowledge in OOP and am interested to try. Would this better in your opinion? If so where would i start?
1) yep, thats the way to do it. You can also test multiplayer solo by opening 2 instances of wc3 and playing on local host.


2) Typescript is definitely by far much superior to using JASS. To start with typescript: Getting Started | Warcraft III - TypeScript
To learn typescript, well you mainly need to learn JavaScript first (and then some minor modifications for tyepscript). There are a lot of resources for it online.

In both cases, you will also have a good time getting help from other active devs on the Hiveworkshop discord channel.
P.S.: There's some kind of OOP with JASS too, in the form of structs.
 
Level 9
Joined
Nov 27, 2014
Messages
1,966
I've just started using TypeScript. I just wanted to post here because I'm not sure whether this was an issue with the editor or myself. I have exported a file via TypeScript and copied it into a Custom Script in the Editor after configuring everything. There seems to be a syntax error right from the start. Not sure exactly which is causing it but it's essentially no changes in export from it's JASS counterpart which i was using before. Is this just an World Editor thing or the script itself having issues?
1666059093153.png
TypeScript:
export class SelectionGUI {
 

   Blackdrop1Main: Frame
   BackdropFactionSelect: Frame
   BackdropCommanderSelect: Frame
   BackdropBegin: Frame
   BackdropText: Frame
   BackDropBanner: Frame
   BackdropRandomOption: Frame
   TitleText: Frame
   BackdropFaction: Frame
   FactionHeader: Frame
   BackdropCommanderBase: Frame
   CommanderButtonInvisibleT: Frame[] = []
   CommanderHeader: Frame
   GoButton: Frame
   BackdropGoButton: Frame
   BeginText: Frame
   BackdropTextBackground: Frame
   Banner: Frame
   BackdropRandomCustom: Frame
   FactionButtonT: Frame[] = []
   BackdropFactionButtonT: Frame[] = []
   CommanderButtonBaseT: Frame[] = []
   TextHeaderT: Frame[] = []
   ButtonRandom: Frame
   BackdropButtonRandom: Frame
   RandomTitle: Frame
   TextBodyT: Frame[] = []
   TextFluffT: Frame[] = []

  constructor() {
      let t: Trigger;

BlzHideOriginFrames(true)
BlzFrameSetVisible(BlzGetFrameByName("ConsoleUIBackdrop",0), false)
BlzFrameSetVisible(BlzGetOriginFrame(ORIGIN_FRAME_HERO_BAR,0), false)
BlzFrameSetVisible(BlzGetOriginFrame(ORIGIN_FRAME_MINIMAP,0), false)
BlzFrameSetVisible(BlzGetFrameByName("ResourceBarFrame",0), false)
BlzFrameSetVisible(BlzGetFrameByName("UpperButtonBarFrame",0), false)
BlzFrameSetVisible(BlzGetOriginFrame(ORIGIN_FRAME_PORTRAIT, 0), false)


  this.Blackdrop1Main = new Frame("BACKDROP", Frame.fromOrigin(ORIGIN_FRAME_GAME_UI, 0), 1, 1, 'BACKDROP', "")
    .setAbsPoint(FRAMEPOINT_TOPLEFT, 0.000220000, 0.602250)
    .setAbsPoint(FRAMEPOINT_BOTTOMRIGHT, 0.800900, 0.0000200000)
    .setTexture("Backdrop_1.blp", 0, true)

  this.BackdropFactionSelect = new Frame("QuestButtonBaseTemplate", Frame.fromOrigin(ORIGIN_FRAME_GAME_UI, 0), 0, 0)
    .setAbsPoint(FRAMEPOINT_TOPLEFT, 0.320710, 0.526580)
    .setAbsPoint(FRAMEPOINT_BOTTOMRIGHT, 0.748410, 0.250000)

  this.BackdropCommanderSelect = new Frame("QuestButtonBaseTemplate", Frame.fromOrigin(ORIGIN_FRAME_GAME_UI, 0), 0, 0)
    .setAbsPoint(FRAMEPOINT_TOPLEFT, 0.321830, 0.240890)
    .setAbsPoint(FRAMEPOINT_BOTTOMRIGHT, 0.647910, 0.114870)

  this.BackdropBegin = new Frame("QuestButtonPushedBackdropTemplate", Frame.fromOrigin(ORIGIN_FRAME_GAME_UI, 0), 0, 0)
    .setAbsPoint(FRAMEPOINT_TOPLEFT, 0.550760, 0.111530)
    .setAbsPoint(FRAMEPOINT_BOTTOMRIGHT, 0.683650, 0.0379200)

  this.BackdropText = new Frame("QuestButtonBaseTemplate", Frame.fromOrigin(ORIGIN_FRAME_GAME_UI, 0), 0, 0)
    .setAbsPoint(FRAMEPOINT_TOPLEFT, 0.0370700, 0.306690)
    .setAbsPoint(FRAMEPOINT_BOTTOMRIGHT, 0.318480, 0.0211900)

  this.BackDropBanner = new Frame("QuestButtonBaseTemplate", Frame.fromOrigin(ORIGIN_FRAME_GAME_UI, 0), 0, 0)
    .setAbsPoint(FRAMEPOINT_TOPLEFT, 0.0716900, 0.531930)
    .setAbsPoint(FRAMEPOINT_BOTTOMRIGHT, 0.295030, 0.310000)

  this.BackdropRandomOption = new Frame("QuestButtonBaseTemplate", Frame.fromOrigin(ORIGIN_FRAME_GAME_UI, 0), 0, 0)
    .setAbsPoint(FRAMEPOINT_TOPLEFT, 0.321830, 0.112860)
    .setAbsPoint(FRAMEPOINT_BOTTOMRIGHT, 0.545170, 0.0225300)

  this.TitleText = new Frame("name", this.Blackdrop1Main, 0, 0, 'TEXT', "")
    .setAbsPoint(FRAMEPOINT_TOPLEFT, 0.220000, 0.602230)
    .setAbsPoint(FRAMEPOINT_BOTTOMRIGHT, 0.620000, 0.547580)
    .setText("|cffffc800Realm Commanders|r")
    .setEnabled(false)
    .setScale(3.57)
  BlzFrameSetTextAlignment(this.TitleText.handle, TEXT_JUSTIFY_CENTER, TEXT_JUSTIFY_MIDDLE)

  this.BackdropFaction = new Frame("BACKDROP", this.BackdropFactionSelect, 1, 1, 'BACKDROP', "")
    .setPoint(FRAMEPOINT_TOPLEFT, this.BackdropFactionSelect, FRAMEPOINT_TOPLEFT, 0.0067000, -0.0045000)
    .setPoint(FRAMEPOINT_BOTTOMRIGHT, this.BackdropFactionSelect, FRAMEPOINT_BOTTOMRIGHT, -0.0067000, 0.010000)
    .setTexture("Backdrop_2.blp", 0, true)

  this.FactionHeader = new Frame("name", this.BackdropFactionSelect, 0, 0, 'TEXT', "")
    .setAbsPoint(FRAMEPOINT_TOPLEFT, 0.398880, 0.509660)
    .setAbsPoint(FRAMEPOINT_BOTTOMRIGHT, 0.655720, 0.451670)
    .setText("|cffFFCC00SELECT FACTION|r")
    .setEnabled(false)
    .setScale(2.14)
  BlzFrameSetTextAlignment(this.FactionHeader.handle, TEXT_JUSTIFY_CENTER, TEXT_JUSTIFY_MIDDLE)

  this.BackdropCommanderBase = new Frame("BACKDROP", this.BackdropCommanderSelect, 1, 1, 'BACKDROP', "")
    .setPoint(FRAMEPOINT_TOPLEFT, this.BackdropCommanderSelect, FRAMEPOINT_TOPLEFT, 0.0078200, -0.0048800)
    .setPoint(FRAMEPOINT_BOTTOMRIGHT, this.BackdropCommanderSelect, FRAMEPOINT_BOTTOMRIGHT, -0.011160, 0.0040400)
    .setTexture("Backdrop_3.blp", 0, true)

  this.CommanderButtonInvisibleT[0] = new Frame("IconButtonTemplate", this.BackdropCommanderSelect, 0, 0)
    .setAbsPoint(FRAMEPOINT_TOPLEFT, 0.350000, 0.200000)
    .setAbsPoint(FRAMEPOINT_BOTTOMRIGHT, 0.420000, 0.130000)
t = new Trigger()
t.triggerRegisterFrameEvent(this.CommanderButtonInvisibleT[0], FRAMEEVENT_CONTROL_CLICK)
t.addAction( () => {
this.CommanderButtonInvisibleT[0].enabled = false
this.CommanderButtonInvisibleT[0].enabled = true
})

  this.CommanderHeader = new Frame("name", this.BackdropCommanderSelect, 0, 0, 'TEXT', "")
    .setAbsPoint(FRAMEPOINT_TOPLEFT, 0.360000, 0.247990)
    .setAbsPoint(FRAMEPOINT_BOTTOMRIGHT, 0.616840, 0.190000)
    .setText("|cffFFCC00SELECT COMMANDER|r")
    .setEnabled(false)
    .setScale(2.14)
  BlzFrameSetTextAlignment(this.CommanderHeader.handle, TEXT_JUSTIFY_CENTER, TEXT_JUSTIFY_MIDDLE)

  this.CommanderButtonInvisibleT[1] = new Frame("IconButtonTemplate", this.BackdropCommanderSelect, 0, 0)
    .setAbsPoint(FRAMEPOINT_TOPLEFT, 0.450000, 0.200000)
    .setAbsPoint(FRAMEPOINT_BOTTOMRIGHT, 0.520000, 0.130000)
t = new Trigger()
t.triggerRegisterFrameEvent(this.CommanderButtonInvisibleT[1], FRAMEEVENT_CONTROL_CLICK)
t.addAction( () => {
this.CommanderButtonInvisibleT[1].enabled = false
this.CommanderButtonInvisibleT[1].enabled = true
})

  this.CommanderButtonInvisibleT[2] = new Frame("IconButtonTemplate", this.BackdropCommanderSelect, 0, 0)
    .setAbsPoint(FRAMEPOINT_TOPLEFT, 0.550000, 0.200000)
    .setAbsPoint(FRAMEPOINT_BOTTOMRIGHT, 0.620000, 0.130000)
t = new Trigger()
t.triggerRegisterFrameEvent(this.CommanderButtonInvisibleT[2], FRAMEEVENT_CONTROL_CLICK)
t.addAction( () => {
this.CommanderButtonInvisibleT[2].enabled = false
this.CommanderButtonInvisibleT[2].enabled = true
})

  this.GoButton = new Frame("IconButtonTemplate", this.BackdropBegin, 0, 0)
    .setPoint(FRAMEPOINT_TOPLEFT, this.BackdropBegin, FRAMEPOINT_TOPLEFT, 0.0078100, -0.0043800)
    .setPoint(FRAMEPOINT_BOTTOMRIGHT, this.BackdropBegin, FRAMEPOINT_BOTTOMRIGHT, -0.0089400, 0.0056600)

  this.BackdropGoButton = new Frame("BackdropGoButton", this.GoButton, 0, 0, 'BACKDROP', "")
  .setAllPoints(this.GoButton)
    .setTexture("Button_Begin.blp", 0, true)
t = new Trigger()
t.triggerRegisterFrameEvent(this.GoButton, FRAMEEVENT_CONTROL_CLICK)
t.addAction( () => {
this.GoButton.enabled = false
this.GoButton.enabled = true
})

  this.BeginText = new Frame("name", this.BackdropBegin, 0, 0, 'TEXT', "")
    .setAbsPoint(FRAMEPOINT_TOPLEFT, 0.580910, 0.0947900)
    .setAbsPoint(FRAMEPOINT_BOTTOMRIGHT, 0.653500, 0.0579900)
    .setText("|cffFFCC00BEGIN|r")
    .setEnabled(false)
    .setScale(2.43)
  BlzFrameSetTextAlignment(this.BeginText.handle, TEXT_JUSTIFY_CENTER, TEXT_JUSTIFY_MIDDLE)

  this.BackdropTextBackground = new Frame("BACKDROP", this.BackdropText, 1, 1, 'BACKDROP', "")
    .setPoint(FRAMEPOINT_TOPLEFT, this.BackdropText, FRAMEPOINT_TOPLEFT, 0.0089300, -0.0066900)
    .setPoint(FRAMEPOINT_BOTTOMRIGHT, this.BackdropText, FRAMEPOINT_BOTTOMRIGHT, -0.0078200, 0.0078100)
    .setTexture("Backdrop_Text.blp", 0, true)

  this.Banner = new Frame("BACKDROP", this.BackDropBanner, 1, 1, 'BACKDROP', "")
    .setAbsPoint(FRAMEPOINT_TOPLEFT, 0.0783900, 0.527510)
    .setAbsPoint(FRAMEPOINT_BOTTOMRIGHT, 0.288390, 0.317840)
    .setTexture("Banner_None.blp", 0, true)

  this.BackdropRandomCustom = new Frame("BACKDROP", this.BackdropRandomOption, 1, 1, 'BACKDROP', "")
    .setPoint(FRAMEPOINT_TOPLEFT, this.BackdropRandomOption, FRAMEPOINT_TOPLEFT, 0.0067000, -0.0048700)
    .setPoint(FRAMEPOINT_BOTTOMRIGHT, this.BackdropRandomOption, FRAMEPOINT_BOTTOMRIGHT, -0.0055800, 0.0051600)
    .setTexture("Random_Box.blp", 0, true)

  this.FactionButtonT[0] = new Frame("IconButtonTemplate", this.BackdropFaction, 0, 0)
    .setPoint(FRAMEPOINT_TOPLEFT, this.BackdropFaction, FRAMEPOINT_TOPLEFT, 0.018990, -0.069590)
    .setPoint(FRAMEPOINT_BOTTOMRIGHT, this.BackdropFaction, FRAMEPOINT_BOTTOMRIGHT, -0.31531, 0.11249)

  this.BackdropFactionButtonT[0] = new Frame("BackdropFactionButtonT[0]", this.FactionButtonT[0], 0, 0, 'BACKDROP', "")
  .setAllPoints(this.FactionButtonT[0])
    .setTexture("Icon_Stygia.blp", 0, true)
t = new Trigger()
t.triggerRegisterFrameEvent(this.FactionButtonT[0], FRAMEEVENT_CONTROL_CLICK)
t.addAction( () => {
this.FactionButtonT[0].enabled = false
this.FactionButtonT[0].enabled = true
})

  this.FactionButtonT[1] = new Frame("IconButtonTemplate", this.BackdropFaction, 0, 0)
    .setPoint(FRAMEPOINT_TOPLEFT, this.BackdropFaction, FRAMEPOINT_TOPLEFT, 0.11787, -0.070700)
    .setPoint(FRAMEPOINT_BOTTOMRIGHT, this.BackdropFaction, FRAMEPOINT_BOTTOMRIGHT, -0.21643, 0.11138)

  this.BackdropFactionButtonT[1] = new Frame("BackdropFactionButtonT[1]", this.FactionButtonT[1], 0, 0, 'BACKDROP', "")
  .setAllPoints(this.FactionButtonT[1])
    .setTexture("Icon_Faction_Base.blp", 0, true)
t = new Trigger()
t.triggerRegisterFrameEvent(this.FactionButtonT[1], FRAMEEVENT_CONTROL_CLICK)
t.addAction( () => {
this.FactionButtonT[1].enabled = false
this.FactionButtonT[1].enabled = true
})

  this.FactionButtonT[2] = new Frame("IconButtonTemplate", this.BackdropFaction, 0, 0)
    .setPoint(FRAMEPOINT_TOPLEFT, this.BackdropFaction, FRAMEPOINT_TOPLEFT, 0.21787, -0.070700)
    .setPoint(FRAMEPOINT_BOTTOMRIGHT, this.BackdropFaction, FRAMEPOINT_BOTTOMRIGHT, -0.11643, 0.11138)

  this.BackdropFactionButtonT[2] = new Frame("BackdropFactionButtonT[2]", this.FactionButtonT[2], 0, 0, 'BACKDROP', "")
  .setAllPoints(this.FactionButtonT[2])
    .setTexture("Icon_Faction_Base.blp", 0, true)
t = new Trigger()
t.triggerRegisterFrameEvent(this.FactionButtonT[2], FRAMEEVENT_CONTROL_CLICK)
t.addAction( () => {
this.FactionButtonT[2].enabled = false
this.FactionButtonT[2].enabled = true
})

  this.FactionButtonT[3] = new Frame("IconButtonTemplate", this.BackdropFaction, 0, 0)
    .setPoint(FRAMEPOINT_TOPLEFT, this.BackdropFaction, FRAMEPOINT_TOPLEFT, 0.31787, -0.070700)
    .setPoint(FRAMEPOINT_BOTTOMRIGHT, this.BackdropFaction, FRAMEPOINT_BOTTOMRIGHT, -0.016430, 0.11138)

  this.BackdropFactionButtonT[3] = new Frame("BackdropFactionButtonT[3]", this.FactionButtonT[3], 0, 0, 'BACKDROP', "")
  .setAllPoints(this.FactionButtonT[3])
    .setTexture("Icon_Faction_Base.blp", 0, true)
t = new Trigger()
t.triggerRegisterFrameEvent(this.FactionButtonT[3], FRAMEEVENT_CONTROL_CLICK)
t.addAction( () => {
this.FactionButtonT[3].enabled = false
this.FactionButtonT[3].enabled = true
})

  this.FactionButtonT[4] = new Frame("IconButtonTemplate", this.BackdropFaction, 0, 0)
    .setPoint(FRAMEPOINT_TOPLEFT, this.BackdropFaction, FRAMEPOINT_TOPLEFT, 0.017870, -0.16070)
    .setPoint(FRAMEPOINT_BOTTOMRIGHT, this.BackdropFaction, FRAMEPOINT_BOTTOMRIGHT, -0.31643, 0.021380)

  this.BackdropFactionButtonT[4] = new Frame("BackdropFactionButtonT[4]", this.FactionButtonT[4], 0, 0, 'BACKDROP', "")
  .setAllPoints(this.FactionButtonT[4])
    .setTexture("Icon_Faction_Base.blp", 0, true)
t = new Trigger()
t.triggerRegisterFrameEvent(this.FactionButtonT[4], FRAMEEVENT_CONTROL_CLICK)
t.addAction( () => {
this.FactionButtonT[4].enabled = false
this.FactionButtonT[4].enabled = true
})

  this.FactionButtonT[5] = new Frame("IconButtonTemplate", this.BackdropFaction, 0, 0)
    .setPoint(FRAMEPOINT_TOPLEFT, this.BackdropFaction, FRAMEPOINT_TOPLEFT, 0.11787, -0.16070)
    .setPoint(FRAMEPOINT_BOTTOMRIGHT, this.BackdropFaction, FRAMEPOINT_BOTTOMRIGHT, -0.21643, 0.021380)

  this.BackdropFactionButtonT[5] = new Frame("BackdropFactionButtonT[5]", this.FactionButtonT[5], 0, 0, 'BACKDROP', "")
  .setAllPoints(this.FactionButtonT[5])
    .setTexture("Icon_Faction_Base.blp", 0, true)
t = new Trigger()
t.triggerRegisterFrameEvent(this.FactionButtonT[5], FRAMEEVENT_CONTROL_CLICK)
t.addAction( () => {
this.FactionButtonT[5].enabled = false
this.FactionButtonT[5].enabled = true
})

  this.FactionButtonT[6] = new Frame("IconButtonTemplate", this.BackdropFaction, 0, 0)
    .setPoint(FRAMEPOINT_TOPLEFT, this.BackdropFaction, FRAMEPOINT_TOPLEFT, 0.21787, -0.16070)
    .setPoint(FRAMEPOINT_BOTTOMRIGHT, this.BackdropFaction, FRAMEPOINT_BOTTOMRIGHT, -0.11643, 0.021380)

  this.BackdropFactionButtonT[6] = new Frame("BackdropFactionButtonT[6]", this.FactionButtonT[6], 0, 0, 'BACKDROP', "")
  .setAllPoints(this.FactionButtonT[6])
    .setTexture("Icon_Faction_Base.blp", 0, true)
t = new Trigger()
t.triggerRegisterFrameEvent(this.FactionButtonT[6], FRAMEEVENT_CONTROL_CLICK)
t.addAction( () => {
this.FactionButtonT[6].enabled = false
this.FactionButtonT[6].enabled = true
})

  this.FactionButtonT[7] = new Frame("IconButtonTemplate", this.BackdropFaction, 0, 0)
    .setPoint(FRAMEPOINT_TOPLEFT, this.BackdropFaction, FRAMEPOINT_TOPLEFT, 0.31787, -0.16070)
    .setPoint(FRAMEPOINT_BOTTOMRIGHT, this.BackdropFaction, FRAMEPOINT_BOTTOMRIGHT, -0.016430, 0.021380)

  this.BackdropFactionButtonT[7] = new Frame("BackdropFactionButtonT[7]", this.FactionButtonT[7], 0, 0, 'BACKDROP', "")
  .setAllPoints(this.FactionButtonT[7])
    .setTexture("Icon_Faction_Base.blp", 0, true)
t = new Trigger()
t.triggerRegisterFrameEvent(this.FactionButtonT[7], FRAMEEVENT_CONTROL_CLICK)
t.addAction( () => {
this.FactionButtonT[7].enabled = false
this.FactionButtonT[7].enabled = true
})

  this.CommanderButtonBaseT[0] = new Frame("BACKDROP", this.BackdropCommanderBase, 1, 1, 'BACKDROP', "")
    .setPoint(FRAMEPOINT_TOPLEFT, this.BackdropCommanderBase, FRAMEPOINT_TOPLEFT, 0.020350, -0.036010)
    .setPoint(FRAMEPOINT_BOTTOMRIGHT, this.BackdropCommanderBase, FRAMEPOINT_BOTTOMRIGHT, -0.21675, 0.011090)
    .setTexture("Icon_Commander_Base.blp", 0, true)

  this.CommanderButtonBaseT[1] = new Frame("BACKDROP", this.BackdropCommanderBase, 1, 1, 'BACKDROP', "")
    .setPoint(FRAMEPOINT_TOPLEFT, this.BackdropCommanderBase, FRAMEPOINT_TOPLEFT, 0.12035, -0.036010)
    .setPoint(FRAMEPOINT_BOTTOMRIGHT, this.BackdropCommanderBase, FRAMEPOINT_BOTTOMRIGHT, -0.11675, 0.011090)
    .setTexture("Icon_Commander_Base.blp", 0, true)

  this.CommanderButtonBaseT[2] = new Frame("BACKDROP", this.BackdropCommanderBase, 1, 1, 'BACKDROP', "")
    .setPoint(FRAMEPOINT_TOPLEFT, this.BackdropCommanderBase, FRAMEPOINT_TOPLEFT, 0.22035, -0.036010)
    .setPoint(FRAMEPOINT_BOTTOMRIGHT, this.BackdropCommanderBase, FRAMEPOINT_BOTTOMRIGHT, -0.016750, 0.011090)
    .setTexture("Icon_Commander_Base.blp", 0, true)

  this.TextHeaderT[0] = new Frame("name", this.BackdropTextBackground, 0, 0, 'TEXT', "")
    .setAbsPoint(FRAMEPOINT_TOPLEFT, 0.0515900, 0.297770)
    .setAbsPoint(FRAMEPOINT_BOTTOMRIGHT, 0.308430, 0.277700)
    .setText("|cffFFCC00No Allegiance\n|r")
    .setEnabled(false)
    .setScale(1.71)
  BlzFrameSetTextAlignment(this.TextHeaderT[0].handle, TEXT_JUSTIFY_TOP, TEXT_JUSTIFY_MIDDLE)

  this.TextHeaderT[1] = new Frame("name", this.BackdropTextBackground, 0, 0, 'TEXT', "")
    .setAbsPoint(FRAMEPOINT_TOPLEFT, 0.0515900, 0.162700)
    .setAbsPoint(FRAMEPOINT_BOTTOMRIGHT, 0.308430, 0.142630)
    .setText("|cffFFCC00No Leader\n|r")
    .setEnabled(false)
    .setScale(1.71)
  BlzFrameSetTextAlignment(this.TextHeaderT[1].handle, TEXT_JUSTIFY_TOP, TEXT_JUSTIFY_MIDDLE)

  this.ButtonRandom = new Frame("IconButtonTemplate", this.BackdropRandomCustom, 0, 0)
    .setAbsPoint(FRAMEPOINT_TOPLEFT, 0.460000, 0.103000)
    .setAbsPoint(FRAMEPOINT_BOTTOMRIGHT, 0.530000, 0.0330000)

  this.BackdropButtonRandom = new Frame("BackdropButtonRandom", this.ButtonRandom, 0, 0, 'BACKDROP', "")
  .setAllPoints(this.ButtonRandom)
    .setTexture("Icon_All_Random.blp", 0, true)
t = new Trigger()
t.triggerRegisterFrameEvent(this.ButtonRandom, FRAMEEVENT_CONTROL_CLICK)
t.addAction( () => {
this.ButtonRandom.enabled = false
this.ButtonRandom.enabled = true
})

  this.RandomTitle = new Frame("name", this.BackdropRandomCustom, 0, 0, 'TEXT', "")
    .setAbsPoint(FRAMEPOINT_TOPLEFT, 0.350000, 0.0934700)
    .setAbsPoint(FRAMEPOINT_BOTTOMRIGHT, 0.448270, 0.0354800)
    .setText("|cffFFCC00ALL\nRANDOM|r")
    .setEnabled(false)
    .setScale(1.71)
  BlzFrameSetTextAlignment(this.RandomTitle.handle, TEXT_JUSTIFY_CENTER, TEXT_JUSTIFY_MIDDLE)

  this.TextBodyT[0] = new Frame("name", this.TextHeaderT[0], 0, 0, 'TEXT', "")
    .setAbsPoint(FRAMEPOINT_TOPLEFT, 0.0515900, 0.268780)
    .setAbsPoint(FRAMEPOINT_BOTTOMRIGHT, 0.308430, 0.162830)
    .setText("|cffffffffIt is recommended you choose a Faction or one will be picked for you.|r")
    .setEnabled(false)
    .setScale(0.858)
  BlzFrameSetTextAlignment(this.TextBodyT[0].handle, TEXT_JUSTIFY_TOP, TEXT_JUSTIFY_LEFT)

  this.TextBodyT[1] = new Frame("name", this.TextHeaderT[0], 0, 0, 'TEXT', "")
    .setAbsPoint(FRAMEPOINT_TOPLEFT, 0.0515900, 0.132830)
    .setAbsPoint(FRAMEPOINT_BOTTOMRIGHT, 0.308430, 0.0268800)
    .setText("|cffffffffIt is recommended you choose a Commander or one will be picked for you.|r")
    .setEnabled(false)
    .setScale(0.858)
  BlzFrameSetTextAlignment(this.TextBodyT[1].handle, TEXT_JUSTIFY_TOP, TEXT_JUSTIFY_LEFT)

  this.TextFluffT[0] = new Frame("name", this.TextBodyT[0], 0, 0, 'TEXT', "")
    .setAbsPoint(FRAMEPOINT_TOPLEFT, 0.0515900, 0.279820)
    .setAbsPoint(FRAMEPOINT_BOTTOMRIGHT, 0.308430, 0.267550)
    .setText("|cffafaa97Endless Realms Exists, Endless Possibilities To Discover|r")
    .setEnabled(false)
    .setScale(0.858)
  BlzFrameSetTextAlignment(this.TextFluffT[0].handle, TEXT_JUSTIFY_TOP, TEXT_JUSTIFY_MIDDLE)

  this.TextFluffT[1] = new Frame("name", this.TextBodyT[0], 0, 0, 'TEXT', "")
    .setAbsPoint(FRAMEPOINT_TOPLEFT, 0.0515900, 0.143270)
    .setAbsPoint(FRAMEPOINT_BOTTOMRIGHT, 0.308430, 0.131000)
    .setText("|cffafaa97Be afraid of an army led by a lion over one by a sheep|r")
    .setEnabled(false)
    .setScale(0.858)
  BlzFrameSetTextAlignment(this.TextFluffT[1].handle, TEXT_JUSTIFY_TOP, TEXT_JUSTIFY_MIDDLE)
}

}

Edit: Attached TS file
 

Attachments

  • SelectionGui.ts
    17.9 KB · Views: 2
Level 24
Joined
Jun 26, 2020
Messages
1,914
I've just started using TypeScript. I just wanted to post here because I'm not sure whether this was an issue with the editor or myself. I have exported a file via TypeScript and copied it into a Custom Script in the Editor after configuring everything. There seems to be a syntax error right from the start. Not sure exactly which is causing it but it's essentially no changes in export from it's JASS counterpart which i was using before. Is this just an World Editor thing or the script itself having issues?
TypeScript:
export class SelectionGUI {
 

   Blackdrop1Main: Frame
   BackdropFactionSelect: Frame
   BackdropCommanderSelect: Frame
   BackdropBegin: Frame
   BackdropText: Frame
   BackDropBanner: Frame
   BackdropRandomOption: Frame
   TitleText: Frame
   BackdropFaction: Frame
   FactionHeader: Frame
   BackdropCommanderBase: Frame
   CommanderButtonInvisibleT: Frame[] = []
   CommanderHeader: Frame
   GoButton: Frame
   BackdropGoButton: Frame
   BeginText: Frame
   BackdropTextBackground: Frame
   Banner: Frame
   BackdropRandomCustom: Frame
   FactionButtonT: Frame[] = []
   BackdropFactionButtonT: Frame[] = []
   CommanderButtonBaseT: Frame[] = []
   TextHeaderT: Frame[] = []
   ButtonRandom: Frame
   BackdropButtonRandom: Frame
   RandomTitle: Frame
   TextBodyT: Frame[] = []
   TextFluffT: Frame[] = []

  constructor() {
      let t: Trigger;

BlzHideOriginFrames(true)
BlzFrameSetVisible(BlzGetFrameByName("ConsoleUIBackdrop",0), false)
BlzFrameSetVisible(BlzGetOriginFrame(ORIGIN_FRAME_HERO_BAR,0), false)
BlzFrameSetVisible(BlzGetOriginFrame(ORIGIN_FRAME_MINIMAP,0), false)
BlzFrameSetVisible(BlzGetFrameByName("ResourceBarFrame",0), false)
BlzFrameSetVisible(BlzGetFrameByName("UpperButtonBarFrame",0), false)
BlzFrameSetVisible(BlzGetOriginFrame(ORIGIN_FRAME_PORTRAIT, 0), false)


  this.Blackdrop1Main = new Frame("BACKDROP", Frame.fromOrigin(ORIGIN_FRAME_GAME_UI, 0), 1, 1, 'BACKDROP', "")
    .setAbsPoint(FRAMEPOINT_TOPLEFT, 0.000220000, 0.602250)
    .setAbsPoint(FRAMEPOINT_BOTTOMRIGHT, 0.800900, 0.0000200000)
    .setTexture("Backdrop_1.blp", 0, true)

  this.BackdropFactionSelect = new Frame("QuestButtonBaseTemplate", Frame.fromOrigin(ORIGIN_FRAME_GAME_UI, 0), 0, 0)
    .setAbsPoint(FRAMEPOINT_TOPLEFT, 0.320710, 0.526580)
    .setAbsPoint(FRAMEPOINT_BOTTOMRIGHT, 0.748410, 0.250000)

  this.BackdropCommanderSelect = new Frame("QuestButtonBaseTemplate", Frame.fromOrigin(ORIGIN_FRAME_GAME_UI, 0), 0, 0)
    .setAbsPoint(FRAMEPOINT_TOPLEFT, 0.321830, 0.240890)
    .setAbsPoint(FRAMEPOINT_BOTTOMRIGHT, 0.647910, 0.114870)

  this.BackdropBegin = new Frame("QuestButtonPushedBackdropTemplate", Frame.fromOrigin(ORIGIN_FRAME_GAME_UI, 0), 0, 0)
    .setAbsPoint(FRAMEPOINT_TOPLEFT, 0.550760, 0.111530)
    .setAbsPoint(FRAMEPOINT_BOTTOMRIGHT, 0.683650, 0.0379200)

  this.BackdropText = new Frame("QuestButtonBaseTemplate", Frame.fromOrigin(ORIGIN_FRAME_GAME_UI, 0), 0, 0)
    .setAbsPoint(FRAMEPOINT_TOPLEFT, 0.0370700, 0.306690)
    .setAbsPoint(FRAMEPOINT_BOTTOMRIGHT, 0.318480, 0.0211900)

  this.BackDropBanner = new Frame("QuestButtonBaseTemplate", Frame.fromOrigin(ORIGIN_FRAME_GAME_UI, 0), 0, 0)
    .setAbsPoint(FRAMEPOINT_TOPLEFT, 0.0716900, 0.531930)
    .setAbsPoint(FRAMEPOINT_BOTTOMRIGHT, 0.295030, 0.310000)

  this.BackdropRandomOption = new Frame("QuestButtonBaseTemplate", Frame.fromOrigin(ORIGIN_FRAME_GAME_UI, 0), 0, 0)
    .setAbsPoint(FRAMEPOINT_TOPLEFT, 0.321830, 0.112860)
    .setAbsPoint(FRAMEPOINT_BOTTOMRIGHT, 0.545170, 0.0225300)

  this.TitleText = new Frame("name", this.Blackdrop1Main, 0, 0, 'TEXT', "")
    .setAbsPoint(FRAMEPOINT_TOPLEFT, 0.220000, 0.602230)
    .setAbsPoint(FRAMEPOINT_BOTTOMRIGHT, 0.620000, 0.547580)
    .setText("|cffffc800Realm Commanders|r")
    .setEnabled(false)
    .setScale(3.57)
  BlzFrameSetTextAlignment(this.TitleText.handle, TEXT_JUSTIFY_CENTER, TEXT_JUSTIFY_MIDDLE)

  this.BackdropFaction = new Frame("BACKDROP", this.BackdropFactionSelect, 1, 1, 'BACKDROP', "")
    .setPoint(FRAMEPOINT_TOPLEFT, this.BackdropFactionSelect, FRAMEPOINT_TOPLEFT, 0.0067000, -0.0045000)
    .setPoint(FRAMEPOINT_BOTTOMRIGHT, this.BackdropFactionSelect, FRAMEPOINT_BOTTOMRIGHT, -0.0067000, 0.010000)
    .setTexture("Backdrop_2.blp", 0, true)

  this.FactionHeader = new Frame("name", this.BackdropFactionSelect, 0, 0, 'TEXT', "")
    .setAbsPoint(FRAMEPOINT_TOPLEFT, 0.398880, 0.509660)
    .setAbsPoint(FRAMEPOINT_BOTTOMRIGHT, 0.655720, 0.451670)
    .setText("|cffFFCC00SELECT FACTION|r")
    .setEnabled(false)
    .setScale(2.14)
  BlzFrameSetTextAlignment(this.FactionHeader.handle, TEXT_JUSTIFY_CENTER, TEXT_JUSTIFY_MIDDLE)

  this.BackdropCommanderBase = new Frame("BACKDROP", this.BackdropCommanderSelect, 1, 1, 'BACKDROP', "")
    .setPoint(FRAMEPOINT_TOPLEFT, this.BackdropCommanderSelect, FRAMEPOINT_TOPLEFT, 0.0078200, -0.0048800)
    .setPoint(FRAMEPOINT_BOTTOMRIGHT, this.BackdropCommanderSelect, FRAMEPOINT_BOTTOMRIGHT, -0.011160, 0.0040400)
    .setTexture("Backdrop_3.blp", 0, true)

  this.CommanderButtonInvisibleT[0] = new Frame("IconButtonTemplate", this.BackdropCommanderSelect, 0, 0)
    .setAbsPoint(FRAMEPOINT_TOPLEFT, 0.350000, 0.200000)
    .setAbsPoint(FRAMEPOINT_BOTTOMRIGHT, 0.420000, 0.130000)
t = new Trigger()
t.triggerRegisterFrameEvent(this.CommanderButtonInvisibleT[0], FRAMEEVENT_CONTROL_CLICK)
t.addAction( () => {
this.CommanderButtonInvisibleT[0].enabled = false
this.CommanderButtonInvisibleT[0].enabled = true
})

  this.CommanderHeader = new Frame("name", this.BackdropCommanderSelect, 0, 0, 'TEXT', "")
    .setAbsPoint(FRAMEPOINT_TOPLEFT, 0.360000, 0.247990)
    .setAbsPoint(FRAMEPOINT_BOTTOMRIGHT, 0.616840, 0.190000)
    .setText("|cffFFCC00SELECT COMMANDER|r")
    .setEnabled(false)
    .setScale(2.14)
  BlzFrameSetTextAlignment(this.CommanderHeader.handle, TEXT_JUSTIFY_CENTER, TEXT_JUSTIFY_MIDDLE)

  this.CommanderButtonInvisibleT[1] = new Frame("IconButtonTemplate", this.BackdropCommanderSelect, 0, 0)
    .setAbsPoint(FRAMEPOINT_TOPLEFT, 0.450000, 0.200000)
    .setAbsPoint(FRAMEPOINT_BOTTOMRIGHT, 0.520000, 0.130000)
t = new Trigger()
t.triggerRegisterFrameEvent(this.CommanderButtonInvisibleT[1], FRAMEEVENT_CONTROL_CLICK)
t.addAction( () => {
this.CommanderButtonInvisibleT[1].enabled = false
this.CommanderButtonInvisibleT[1].enabled = true
})

  this.CommanderButtonInvisibleT[2] = new Frame("IconButtonTemplate", this.BackdropCommanderSelect, 0, 0)
    .setAbsPoint(FRAMEPOINT_TOPLEFT, 0.550000, 0.200000)
    .setAbsPoint(FRAMEPOINT_BOTTOMRIGHT, 0.620000, 0.130000)
t = new Trigger()
t.triggerRegisterFrameEvent(this.CommanderButtonInvisibleT[2], FRAMEEVENT_CONTROL_CLICK)
t.addAction( () => {
this.CommanderButtonInvisibleT[2].enabled = false
this.CommanderButtonInvisibleT[2].enabled = true
})

  this.GoButton = new Frame("IconButtonTemplate", this.BackdropBegin, 0, 0)
    .setPoint(FRAMEPOINT_TOPLEFT, this.BackdropBegin, FRAMEPOINT_TOPLEFT, 0.0078100, -0.0043800)
    .setPoint(FRAMEPOINT_BOTTOMRIGHT, this.BackdropBegin, FRAMEPOINT_BOTTOMRIGHT, -0.0089400, 0.0056600)

  this.BackdropGoButton = new Frame("BackdropGoButton", this.GoButton, 0, 0, 'BACKDROP', "")
  .setAllPoints(this.GoButton)
    .setTexture("Button_Begin.blp", 0, true)
t = new Trigger()
t.triggerRegisterFrameEvent(this.GoButton, FRAMEEVENT_CONTROL_CLICK)
t.addAction( () => {
this.GoButton.enabled = false
this.GoButton.enabled = true
})

  this.BeginText = new Frame("name", this.BackdropBegin, 0, 0, 'TEXT', "")
    .setAbsPoint(FRAMEPOINT_TOPLEFT, 0.580910, 0.0947900)
    .setAbsPoint(FRAMEPOINT_BOTTOMRIGHT, 0.653500, 0.0579900)
    .setText("|cffFFCC00BEGIN|r")
    .setEnabled(false)
    .setScale(2.43)
  BlzFrameSetTextAlignment(this.BeginText.handle, TEXT_JUSTIFY_CENTER, TEXT_JUSTIFY_MIDDLE)

  this.BackdropTextBackground = new Frame("BACKDROP", this.BackdropText, 1, 1, 'BACKDROP', "")
    .setPoint(FRAMEPOINT_TOPLEFT, this.BackdropText, FRAMEPOINT_TOPLEFT, 0.0089300, -0.0066900)
    .setPoint(FRAMEPOINT_BOTTOMRIGHT, this.BackdropText, FRAMEPOINT_BOTTOMRIGHT, -0.0078200, 0.0078100)
    .setTexture("Backdrop_Text.blp", 0, true)

  this.Banner = new Frame("BACKDROP", this.BackDropBanner, 1, 1, 'BACKDROP', "")
    .setAbsPoint(FRAMEPOINT_TOPLEFT, 0.0783900, 0.527510)
    .setAbsPoint(FRAMEPOINT_BOTTOMRIGHT, 0.288390, 0.317840)
    .setTexture("Banner_None.blp", 0, true)

  this.BackdropRandomCustom = new Frame("BACKDROP", this.BackdropRandomOption, 1, 1, 'BACKDROP', "")
    .setPoint(FRAMEPOINT_TOPLEFT, this.BackdropRandomOption, FRAMEPOINT_TOPLEFT, 0.0067000, -0.0048700)
    .setPoint(FRAMEPOINT_BOTTOMRIGHT, this.BackdropRandomOption, FRAMEPOINT_BOTTOMRIGHT, -0.0055800, 0.0051600)
    .setTexture("Random_Box.blp", 0, true)

  this.FactionButtonT[0] = new Frame("IconButtonTemplate", this.BackdropFaction, 0, 0)
    .setPoint(FRAMEPOINT_TOPLEFT, this.BackdropFaction, FRAMEPOINT_TOPLEFT, 0.018990, -0.069590)
    .setPoint(FRAMEPOINT_BOTTOMRIGHT, this.BackdropFaction, FRAMEPOINT_BOTTOMRIGHT, -0.31531, 0.11249)

  this.BackdropFactionButtonT[0] = new Frame("BackdropFactionButtonT[0]", this.FactionButtonT[0], 0, 0, 'BACKDROP', "")
  .setAllPoints(this.FactionButtonT[0])
    .setTexture("Icon_Stygia.blp", 0, true)
t = new Trigger()
t.triggerRegisterFrameEvent(this.FactionButtonT[0], FRAMEEVENT_CONTROL_CLICK)
t.addAction( () => {
this.FactionButtonT[0].enabled = false
this.FactionButtonT[0].enabled = true
})

  this.FactionButtonT[1] = new Frame("IconButtonTemplate", this.BackdropFaction, 0, 0)
    .setPoint(FRAMEPOINT_TOPLEFT, this.BackdropFaction, FRAMEPOINT_TOPLEFT, 0.11787, -0.070700)
    .setPoint(FRAMEPOINT_BOTTOMRIGHT, this.BackdropFaction, FRAMEPOINT_BOTTOMRIGHT, -0.21643, 0.11138)

  this.BackdropFactionButtonT[1] = new Frame("BackdropFactionButtonT[1]", this.FactionButtonT[1], 0, 0, 'BACKDROP', "")
  .setAllPoints(this.FactionButtonT[1])
    .setTexture("Icon_Faction_Base.blp", 0, true)
t = new Trigger()
t.triggerRegisterFrameEvent(this.FactionButtonT[1], FRAMEEVENT_CONTROL_CLICK)
t.addAction( () => {
this.FactionButtonT[1].enabled = false
this.FactionButtonT[1].enabled = true
})

  this.FactionButtonT[2] = new Frame("IconButtonTemplate", this.BackdropFaction, 0, 0)
    .setPoint(FRAMEPOINT_TOPLEFT, this.BackdropFaction, FRAMEPOINT_TOPLEFT, 0.21787, -0.070700)
    .setPoint(FRAMEPOINT_BOTTOMRIGHT, this.BackdropFaction, FRAMEPOINT_BOTTOMRIGHT, -0.11643, 0.11138)

  this.BackdropFactionButtonT[2] = new Frame("BackdropFactionButtonT[2]", this.FactionButtonT[2], 0, 0, 'BACKDROP', "")
  .setAllPoints(this.FactionButtonT[2])
    .setTexture("Icon_Faction_Base.blp", 0, true)
t = new Trigger()
t.triggerRegisterFrameEvent(this.FactionButtonT[2], FRAMEEVENT_CONTROL_CLICK)
t.addAction( () => {
this.FactionButtonT[2].enabled = false
this.FactionButtonT[2].enabled = true
})

  this.FactionButtonT[3] = new Frame("IconButtonTemplate", this.BackdropFaction, 0, 0)
    .setPoint(FRAMEPOINT_TOPLEFT, this.BackdropFaction, FRAMEPOINT_TOPLEFT, 0.31787, -0.070700)
    .setPoint(FRAMEPOINT_BOTTOMRIGHT, this.BackdropFaction, FRAMEPOINT_BOTTOMRIGHT, -0.016430, 0.11138)

  this.BackdropFactionButtonT[3] = new Frame("BackdropFactionButtonT[3]", this.FactionButtonT[3], 0, 0, 'BACKDROP', "")
  .setAllPoints(this.FactionButtonT[3])
    .setTexture("Icon_Faction_Base.blp", 0, true)
t = new Trigger()
t.triggerRegisterFrameEvent(this.FactionButtonT[3], FRAMEEVENT_CONTROL_CLICK)
t.addAction( () => {
this.FactionButtonT[3].enabled = false
this.FactionButtonT[3].enabled = true
})

  this.FactionButtonT[4] = new Frame("IconButtonTemplate", this.BackdropFaction, 0, 0)
    .setPoint(FRAMEPOINT_TOPLEFT, this.BackdropFaction, FRAMEPOINT_TOPLEFT, 0.017870, -0.16070)
    .setPoint(FRAMEPOINT_BOTTOMRIGHT, this.BackdropFaction, FRAMEPOINT_BOTTOMRIGHT, -0.31643, 0.021380)

  this.BackdropFactionButtonT[4] = new Frame("BackdropFactionButtonT[4]", this.FactionButtonT[4], 0, 0, 'BACKDROP', "")
  .setAllPoints(this.FactionButtonT[4])
    .setTexture("Icon_Faction_Base.blp", 0, true)
t = new Trigger()
t.triggerRegisterFrameEvent(this.FactionButtonT[4], FRAMEEVENT_CONTROL_CLICK)
t.addAction( () => {
this.FactionButtonT[4].enabled = false
this.FactionButtonT[4].enabled = true
})

  this.FactionButtonT[5] = new Frame("IconButtonTemplate", this.BackdropFaction, 0, 0)
    .setPoint(FRAMEPOINT_TOPLEFT, this.BackdropFaction, FRAMEPOINT_TOPLEFT, 0.11787, -0.16070)
    .setPoint(FRAMEPOINT_BOTTOMRIGHT, this.BackdropFaction, FRAMEPOINT_BOTTOMRIGHT, -0.21643, 0.021380)

  this.BackdropFactionButtonT[5] = new Frame("BackdropFactionButtonT[5]", this.FactionButtonT[5], 0, 0, 'BACKDROP', "")
  .setAllPoints(this.FactionButtonT[5])
    .setTexture("Icon_Faction_Base.blp", 0, true)
t = new Trigger()
t.triggerRegisterFrameEvent(this.FactionButtonT[5], FRAMEEVENT_CONTROL_CLICK)
t.addAction( () => {
this.FactionButtonT[5].enabled = false
this.FactionButtonT[5].enabled = true
})

  this.FactionButtonT[6] = new Frame("IconButtonTemplate", this.BackdropFaction, 0, 0)
    .setPoint(FRAMEPOINT_TOPLEFT, this.BackdropFaction, FRAMEPOINT_TOPLEFT, 0.21787, -0.16070)
    .setPoint(FRAMEPOINT_BOTTOMRIGHT, this.BackdropFaction, FRAMEPOINT_BOTTOMRIGHT, -0.11643, 0.021380)

  this.BackdropFactionButtonT[6] = new Frame("BackdropFactionButtonT[6]", this.FactionButtonT[6], 0, 0, 'BACKDROP', "")
  .setAllPoints(this.FactionButtonT[6])
    .setTexture("Icon_Faction_Base.blp", 0, true)
t = new Trigger()
t.triggerRegisterFrameEvent(this.FactionButtonT[6], FRAMEEVENT_CONTROL_CLICK)
t.addAction( () => {
this.FactionButtonT[6].enabled = false
this.FactionButtonT[6].enabled = true
})

  this.FactionButtonT[7] = new Frame("IconButtonTemplate", this.BackdropFaction, 0, 0)
    .setPoint(FRAMEPOINT_TOPLEFT, this.BackdropFaction, FRAMEPOINT_TOPLEFT, 0.31787, -0.16070)
    .setPoint(FRAMEPOINT_BOTTOMRIGHT, this.BackdropFaction, FRAMEPOINT_BOTTOMRIGHT, -0.016430, 0.021380)

  this.BackdropFactionButtonT[7] = new Frame("BackdropFactionButtonT[7]", this.FactionButtonT[7], 0, 0, 'BACKDROP', "")
  .setAllPoints(this.FactionButtonT[7])
    .setTexture("Icon_Faction_Base.blp", 0, true)
t = new Trigger()
t.triggerRegisterFrameEvent(this.FactionButtonT[7], FRAMEEVENT_CONTROL_CLICK)
t.addAction( () => {
this.FactionButtonT[7].enabled = false
this.FactionButtonT[7].enabled = true
})

  this.CommanderButtonBaseT[0] = new Frame("BACKDROP", this.BackdropCommanderBase, 1, 1, 'BACKDROP', "")
    .setPoint(FRAMEPOINT_TOPLEFT, this.BackdropCommanderBase, FRAMEPOINT_TOPLEFT, 0.020350, -0.036010)
    .setPoint(FRAMEPOINT_BOTTOMRIGHT, this.BackdropCommanderBase, FRAMEPOINT_BOTTOMRIGHT, -0.21675, 0.011090)
    .setTexture("Icon_Commander_Base.blp", 0, true)

  this.CommanderButtonBaseT[1] = new Frame("BACKDROP", this.BackdropCommanderBase, 1, 1, 'BACKDROP', "")
    .setPoint(FRAMEPOINT_TOPLEFT, this.BackdropCommanderBase, FRAMEPOINT_TOPLEFT, 0.12035, -0.036010)
    .setPoint(FRAMEPOINT_BOTTOMRIGHT, this.BackdropCommanderBase, FRAMEPOINT_BOTTOMRIGHT, -0.11675, 0.011090)
    .setTexture("Icon_Commander_Base.blp", 0, true)

  this.CommanderButtonBaseT[2] = new Frame("BACKDROP", this.BackdropCommanderBase, 1, 1, 'BACKDROP', "")
    .setPoint(FRAMEPOINT_TOPLEFT, this.BackdropCommanderBase, FRAMEPOINT_TOPLEFT, 0.22035, -0.036010)
    .setPoint(FRAMEPOINT_BOTTOMRIGHT, this.BackdropCommanderBase, FRAMEPOINT_BOTTOMRIGHT, -0.016750, 0.011090)
    .setTexture("Icon_Commander_Base.blp", 0, true)

  this.TextHeaderT[0] = new Frame("name", this.BackdropTextBackground, 0, 0, 'TEXT', "")
    .setAbsPoint(FRAMEPOINT_TOPLEFT, 0.0515900, 0.297770)
    .setAbsPoint(FRAMEPOINT_BOTTOMRIGHT, 0.308430, 0.277700)
    .setText("|cffFFCC00No Allegiance\n|r")
    .setEnabled(false)
    .setScale(1.71)
  BlzFrameSetTextAlignment(this.TextHeaderT[0].handle, TEXT_JUSTIFY_TOP, TEXT_JUSTIFY_MIDDLE)

  this.TextHeaderT[1] = new Frame("name", this.BackdropTextBackground, 0, 0, 'TEXT', "")
    .setAbsPoint(FRAMEPOINT_TOPLEFT, 0.0515900, 0.162700)
    .setAbsPoint(FRAMEPOINT_BOTTOMRIGHT, 0.308430, 0.142630)
    .setText("|cffFFCC00No Leader\n|r")
    .setEnabled(false)
    .setScale(1.71)
  BlzFrameSetTextAlignment(this.TextHeaderT[1].handle, TEXT_JUSTIFY_TOP, TEXT_JUSTIFY_MIDDLE)

  this.ButtonRandom = new Frame("IconButtonTemplate", this.BackdropRandomCustom, 0, 0)
    .setAbsPoint(FRAMEPOINT_TOPLEFT, 0.460000, 0.103000)
    .setAbsPoint(FRAMEPOINT_BOTTOMRIGHT, 0.530000, 0.0330000)

  this.BackdropButtonRandom = new Frame("BackdropButtonRandom", this.ButtonRandom, 0, 0, 'BACKDROP', "")
  .setAllPoints(this.ButtonRandom)
    .setTexture("Icon_All_Random.blp", 0, true)
t = new Trigger()
t.triggerRegisterFrameEvent(this.ButtonRandom, FRAMEEVENT_CONTROL_CLICK)
t.addAction( () => {
this.ButtonRandom.enabled = false
this.ButtonRandom.enabled = true
})

  this.RandomTitle = new Frame("name", this.BackdropRandomCustom, 0, 0, 'TEXT', "")
    .setAbsPoint(FRAMEPOINT_TOPLEFT, 0.350000, 0.0934700)
    .setAbsPoint(FRAMEPOINT_BOTTOMRIGHT, 0.448270, 0.0354800)
    .setText("|cffFFCC00ALL\nRANDOM|r")
    .setEnabled(false)
    .setScale(1.71)
  BlzFrameSetTextAlignment(this.RandomTitle.handle, TEXT_JUSTIFY_CENTER, TEXT_JUSTIFY_MIDDLE)

  this.TextBodyT[0] = new Frame("name", this.TextHeaderT[0], 0, 0, 'TEXT', "")
    .setAbsPoint(FRAMEPOINT_TOPLEFT, 0.0515900, 0.268780)
    .setAbsPoint(FRAMEPOINT_BOTTOMRIGHT, 0.308430, 0.162830)
    .setText("|cffffffffIt is recommended you choose a Faction or one will be picked for you.|r")
    .setEnabled(false)
    .setScale(0.858)
  BlzFrameSetTextAlignment(this.TextBodyT[0].handle, TEXT_JUSTIFY_TOP, TEXT_JUSTIFY_LEFT)

  this.TextBodyT[1] = new Frame("name", this.TextHeaderT[0], 0, 0, 'TEXT', "")
    .setAbsPoint(FRAMEPOINT_TOPLEFT, 0.0515900, 0.132830)
    .setAbsPoint(FRAMEPOINT_BOTTOMRIGHT, 0.308430, 0.0268800)
    .setText("|cffffffffIt is recommended you choose a Commander or one will be picked for you.|r")
    .setEnabled(false)
    .setScale(0.858)
  BlzFrameSetTextAlignment(this.TextBodyT[1].handle, TEXT_JUSTIFY_TOP, TEXT_JUSTIFY_LEFT)

  this.TextFluffT[0] = new Frame("name", this.TextBodyT[0], 0, 0, 'TEXT', "")
    .setAbsPoint(FRAMEPOINT_TOPLEFT, 0.0515900, 0.279820)
    .setAbsPoint(FRAMEPOINT_BOTTOMRIGHT, 0.308430, 0.267550)
    .setText("|cffafaa97Endless Realms Exists, Endless Possibilities To Discover|r")
    .setEnabled(false)
    .setScale(0.858)
  BlzFrameSetTextAlignment(this.TextFluffT[0].handle, TEXT_JUSTIFY_TOP, TEXT_JUSTIFY_MIDDLE)

  this.TextFluffT[1] = new Frame("name", this.TextBodyT[0], 0, 0, 'TEXT', "")
    .setAbsPoint(FRAMEPOINT_TOPLEFT, 0.0515900, 0.143270)
    .setAbsPoint(FRAMEPOINT_BOTTOMRIGHT, 0.308430, 0.131000)
    .setText("|cffafaa97Be afraid of an army led by a lion over one by a sheep|r")
    .setEnabled(false)
    .setScale(0.858)
  BlzFrameSetTextAlignment(this.TextFluffT[1].handle, TEXT_JUSTIFY_TOP, TEXT_JUSTIFY_MIDDLE)
}

}

Edit: Attached TS file
Read all the tutorial, you should use an external code editor to use Typescript, but if you wanna stay in the World Editor, so forget about using Typescript and use Jass or Lua.
 

NightKnight

Hosted Project RUID
Level 14
Joined
Sep 3, 2014
Messages
222
I've just started using TypeScript. I just wanted to post here because I'm not sure whether this was an issue with the editor or myself. I have exported a file via TypeScript and copied it into a Custom Script in the Editor after configuring everything. There seems to be a syntax error right from the start. Not sure exactly which is causing it but it's essentially no changes in export from it's JASS counterpart which i was using before. Is this just an World Editor thing or the script itself having issues?
TypeScript:
export class SelectionGUI {
 

   Blackdrop1Main: Frame
   BackdropFactionSelect: Frame
   BackdropCommanderSelect: Frame
   BackdropBegin: Frame
   BackdropText: Frame
   BackDropBanner: Frame
   BackdropRandomOption: Frame
   TitleText: Frame
   BackdropFaction: Frame
   FactionHeader: Frame
   BackdropCommanderBase: Frame
   CommanderButtonInvisibleT: Frame[] = []
   CommanderHeader: Frame
   GoButton: Frame
   BackdropGoButton: Frame
   BeginText: Frame
   BackdropTextBackground: Frame
   Banner: Frame
   BackdropRandomCustom: Frame
   FactionButtonT: Frame[] = []
   BackdropFactionButtonT: Frame[] = []
   CommanderButtonBaseT: Frame[] = []
   TextHeaderT: Frame[] = []
   ButtonRandom: Frame
   BackdropButtonRandom: Frame
   RandomTitle: Frame
   TextBodyT: Frame[] = []
   TextFluffT: Frame[] = []

  constructor() {
      let t: Trigger;

BlzHideOriginFrames(true)
BlzFrameSetVisible(BlzGetFrameByName("ConsoleUIBackdrop",0), false)
BlzFrameSetVisible(BlzGetOriginFrame(ORIGIN_FRAME_HERO_BAR,0), false)
BlzFrameSetVisible(BlzGetOriginFrame(ORIGIN_FRAME_MINIMAP,0), false)
BlzFrameSetVisible(BlzGetFrameByName("ResourceBarFrame",0), false)
BlzFrameSetVisible(BlzGetFrameByName("UpperButtonBarFrame",0), false)
BlzFrameSetVisible(BlzGetOriginFrame(ORIGIN_FRAME_PORTRAIT, 0), false)


  this.Blackdrop1Main = new Frame("BACKDROP", Frame.fromOrigin(ORIGIN_FRAME_GAME_UI, 0), 1, 1, 'BACKDROP', "")
    .setAbsPoint(FRAMEPOINT_TOPLEFT, 0.000220000, 0.602250)
    .setAbsPoint(FRAMEPOINT_BOTTOMRIGHT, 0.800900, 0.0000200000)
    .setTexture("Backdrop_1.blp", 0, true)

  this.BackdropFactionSelect = new Frame("QuestButtonBaseTemplate", Frame.fromOrigin(ORIGIN_FRAME_GAME_UI, 0), 0, 0)
    .setAbsPoint(FRAMEPOINT_TOPLEFT, 0.320710, 0.526580)
    .setAbsPoint(FRAMEPOINT_BOTTOMRIGHT, 0.748410, 0.250000)

  this.BackdropCommanderSelect = new Frame("QuestButtonBaseTemplate", Frame.fromOrigin(ORIGIN_FRAME_GAME_UI, 0), 0, 0)
    .setAbsPoint(FRAMEPOINT_TOPLEFT, 0.321830, 0.240890)
    .setAbsPoint(FRAMEPOINT_BOTTOMRIGHT, 0.647910, 0.114870)

  this.BackdropBegin = new Frame("QuestButtonPushedBackdropTemplate", Frame.fromOrigin(ORIGIN_FRAME_GAME_UI, 0), 0, 0)
    .setAbsPoint(FRAMEPOINT_TOPLEFT, 0.550760, 0.111530)
    .setAbsPoint(FRAMEPOINT_BOTTOMRIGHT, 0.683650, 0.0379200)

  this.BackdropText = new Frame("QuestButtonBaseTemplate", Frame.fromOrigin(ORIGIN_FRAME_GAME_UI, 0), 0, 0)
    .setAbsPoint(FRAMEPOINT_TOPLEFT, 0.0370700, 0.306690)
    .setAbsPoint(FRAMEPOINT_BOTTOMRIGHT, 0.318480, 0.0211900)

  this.BackDropBanner = new Frame("QuestButtonBaseTemplate", Frame.fromOrigin(ORIGIN_FRAME_GAME_UI, 0), 0, 0)
    .setAbsPoint(FRAMEPOINT_TOPLEFT, 0.0716900, 0.531930)
    .setAbsPoint(FRAMEPOINT_BOTTOMRIGHT, 0.295030, 0.310000)

  this.BackdropRandomOption = new Frame("QuestButtonBaseTemplate", Frame.fromOrigin(ORIGIN_FRAME_GAME_UI, 0), 0, 0)
    .setAbsPoint(FRAMEPOINT_TOPLEFT, 0.321830, 0.112860)
    .setAbsPoint(FRAMEPOINT_BOTTOMRIGHT, 0.545170, 0.0225300)

  this.TitleText = new Frame("name", this.Blackdrop1Main, 0, 0, 'TEXT', "")
    .setAbsPoint(FRAMEPOINT_TOPLEFT, 0.220000, 0.602230)
    .setAbsPoint(FRAMEPOINT_BOTTOMRIGHT, 0.620000, 0.547580)
    .setText("|cffffc800Realm Commanders|r")
    .setEnabled(false)
    .setScale(3.57)
  BlzFrameSetTextAlignment(this.TitleText.handle, TEXT_JUSTIFY_CENTER, TEXT_JUSTIFY_MIDDLE)

  this.BackdropFaction = new Frame("BACKDROP", this.BackdropFactionSelect, 1, 1, 'BACKDROP', "")
    .setPoint(FRAMEPOINT_TOPLEFT, this.BackdropFactionSelect, FRAMEPOINT_TOPLEFT, 0.0067000, -0.0045000)
    .setPoint(FRAMEPOINT_BOTTOMRIGHT, this.BackdropFactionSelect, FRAMEPOINT_BOTTOMRIGHT, -0.0067000, 0.010000)
    .setTexture("Backdrop_2.blp", 0, true)

  this.FactionHeader = new Frame("name", this.BackdropFactionSelect, 0, 0, 'TEXT', "")
    .setAbsPoint(FRAMEPOINT_TOPLEFT, 0.398880, 0.509660)
    .setAbsPoint(FRAMEPOINT_BOTTOMRIGHT, 0.655720, 0.451670)
    .setText("|cffFFCC00SELECT FACTION|r")
    .setEnabled(false)
    .setScale(2.14)
  BlzFrameSetTextAlignment(this.FactionHeader.handle, TEXT_JUSTIFY_CENTER, TEXT_JUSTIFY_MIDDLE)

  this.BackdropCommanderBase = new Frame("BACKDROP", this.BackdropCommanderSelect, 1, 1, 'BACKDROP', "")
    .setPoint(FRAMEPOINT_TOPLEFT, this.BackdropCommanderSelect, FRAMEPOINT_TOPLEFT, 0.0078200, -0.0048800)
    .setPoint(FRAMEPOINT_BOTTOMRIGHT, this.BackdropCommanderSelect, FRAMEPOINT_BOTTOMRIGHT, -0.011160, 0.0040400)
    .setTexture("Backdrop_3.blp", 0, true)

  this.CommanderButtonInvisibleT[0] = new Frame("IconButtonTemplate", this.BackdropCommanderSelect, 0, 0)
    .setAbsPoint(FRAMEPOINT_TOPLEFT, 0.350000, 0.200000)
    .setAbsPoint(FRAMEPOINT_BOTTOMRIGHT, 0.420000, 0.130000)
t = new Trigger()
t.triggerRegisterFrameEvent(this.CommanderButtonInvisibleT[0], FRAMEEVENT_CONTROL_CLICK)
t.addAction( () => {
this.CommanderButtonInvisibleT[0].enabled = false
this.CommanderButtonInvisibleT[0].enabled = true
})

  this.CommanderHeader = new Frame("name", this.BackdropCommanderSelect, 0, 0, 'TEXT', "")
    .setAbsPoint(FRAMEPOINT_TOPLEFT, 0.360000, 0.247990)
    .setAbsPoint(FRAMEPOINT_BOTTOMRIGHT, 0.616840, 0.190000)
    .setText("|cffFFCC00SELECT COMMANDER|r")
    .setEnabled(false)
    .setScale(2.14)
  BlzFrameSetTextAlignment(this.CommanderHeader.handle, TEXT_JUSTIFY_CENTER, TEXT_JUSTIFY_MIDDLE)

  this.CommanderButtonInvisibleT[1] = new Frame("IconButtonTemplate", this.BackdropCommanderSelect, 0, 0)
    .setAbsPoint(FRAMEPOINT_TOPLEFT, 0.450000, 0.200000)
    .setAbsPoint(FRAMEPOINT_BOTTOMRIGHT, 0.520000, 0.130000)
t = new Trigger()
t.triggerRegisterFrameEvent(this.CommanderButtonInvisibleT[1], FRAMEEVENT_CONTROL_CLICK)
t.addAction( () => {
this.CommanderButtonInvisibleT[1].enabled = false
this.CommanderButtonInvisibleT[1].enabled = true
})

  this.CommanderButtonInvisibleT[2] = new Frame("IconButtonTemplate", this.BackdropCommanderSelect, 0, 0)
    .setAbsPoint(FRAMEPOINT_TOPLEFT, 0.550000, 0.200000)
    .setAbsPoint(FRAMEPOINT_BOTTOMRIGHT, 0.620000, 0.130000)
t = new Trigger()
t.triggerRegisterFrameEvent(this.CommanderButtonInvisibleT[2], FRAMEEVENT_CONTROL_CLICK)
t.addAction( () => {
this.CommanderButtonInvisibleT[2].enabled = false
this.CommanderButtonInvisibleT[2].enabled = true
})

  this.GoButton = new Frame("IconButtonTemplate", this.BackdropBegin, 0, 0)
    .setPoint(FRAMEPOINT_TOPLEFT, this.BackdropBegin, FRAMEPOINT_TOPLEFT, 0.0078100, -0.0043800)
    .setPoint(FRAMEPOINT_BOTTOMRIGHT, this.BackdropBegin, FRAMEPOINT_BOTTOMRIGHT, -0.0089400, 0.0056600)

  this.BackdropGoButton = new Frame("BackdropGoButton", this.GoButton, 0, 0, 'BACKDROP', "")
  .setAllPoints(this.GoButton)
    .setTexture("Button_Begin.blp", 0, true)
t = new Trigger()
t.triggerRegisterFrameEvent(this.GoButton, FRAMEEVENT_CONTROL_CLICK)
t.addAction( () => {
this.GoButton.enabled = false
this.GoButton.enabled = true
})

  this.BeginText = new Frame("name", this.BackdropBegin, 0, 0, 'TEXT', "")
    .setAbsPoint(FRAMEPOINT_TOPLEFT, 0.580910, 0.0947900)
    .setAbsPoint(FRAMEPOINT_BOTTOMRIGHT, 0.653500, 0.0579900)
    .setText("|cffFFCC00BEGIN|r")
    .setEnabled(false)
    .setScale(2.43)
  BlzFrameSetTextAlignment(this.BeginText.handle, TEXT_JUSTIFY_CENTER, TEXT_JUSTIFY_MIDDLE)

  this.BackdropTextBackground = new Frame("BACKDROP", this.BackdropText, 1, 1, 'BACKDROP', "")
    .setPoint(FRAMEPOINT_TOPLEFT, this.BackdropText, FRAMEPOINT_TOPLEFT, 0.0089300, -0.0066900)
    .setPoint(FRAMEPOINT_BOTTOMRIGHT, this.BackdropText, FRAMEPOINT_BOTTOMRIGHT, -0.0078200, 0.0078100)
    .setTexture("Backdrop_Text.blp", 0, true)

  this.Banner = new Frame("BACKDROP", this.BackDropBanner, 1, 1, 'BACKDROP', "")
    .setAbsPoint(FRAMEPOINT_TOPLEFT, 0.0783900, 0.527510)
    .setAbsPoint(FRAMEPOINT_BOTTOMRIGHT, 0.288390, 0.317840)
    .setTexture("Banner_None.blp", 0, true)

  this.BackdropRandomCustom = new Frame("BACKDROP", this.BackdropRandomOption, 1, 1, 'BACKDROP', "")
    .setPoint(FRAMEPOINT_TOPLEFT, this.BackdropRandomOption, FRAMEPOINT_TOPLEFT, 0.0067000, -0.0048700)
    .setPoint(FRAMEPOINT_BOTTOMRIGHT, this.BackdropRandomOption, FRAMEPOINT_BOTTOMRIGHT, -0.0055800, 0.0051600)
    .setTexture("Random_Box.blp", 0, true)

  this.FactionButtonT[0] = new Frame("IconButtonTemplate", this.BackdropFaction, 0, 0)
    .setPoint(FRAMEPOINT_TOPLEFT, this.BackdropFaction, FRAMEPOINT_TOPLEFT, 0.018990, -0.069590)
    .setPoint(FRAMEPOINT_BOTTOMRIGHT, this.BackdropFaction, FRAMEPOINT_BOTTOMRIGHT, -0.31531, 0.11249)

  this.BackdropFactionButtonT[0] = new Frame("BackdropFactionButtonT[0]", this.FactionButtonT[0], 0, 0, 'BACKDROP', "")
  .setAllPoints(this.FactionButtonT[0])
    .setTexture("Icon_Stygia.blp", 0, true)
t = new Trigger()
t.triggerRegisterFrameEvent(this.FactionButtonT[0], FRAMEEVENT_CONTROL_CLICK)
t.addAction( () => {
this.FactionButtonT[0].enabled = false
this.FactionButtonT[0].enabled = true
})

  this.FactionButtonT[1] = new Frame("IconButtonTemplate", this.BackdropFaction, 0, 0)
    .setPoint(FRAMEPOINT_TOPLEFT, this.BackdropFaction, FRAMEPOINT_TOPLEFT, 0.11787, -0.070700)
    .setPoint(FRAMEPOINT_BOTTOMRIGHT, this.BackdropFaction, FRAMEPOINT_BOTTOMRIGHT, -0.21643, 0.11138)

  this.BackdropFactionButtonT[1] = new Frame("BackdropFactionButtonT[1]", this.FactionButtonT[1], 0, 0, 'BACKDROP', "")
  .setAllPoints(this.FactionButtonT[1])
    .setTexture("Icon_Faction_Base.blp", 0, true)
t = new Trigger()
t.triggerRegisterFrameEvent(this.FactionButtonT[1], FRAMEEVENT_CONTROL_CLICK)
t.addAction( () => {
this.FactionButtonT[1].enabled = false
this.FactionButtonT[1].enabled = true
})

  this.FactionButtonT[2] = new Frame("IconButtonTemplate", this.BackdropFaction, 0, 0)
    .setPoint(FRAMEPOINT_TOPLEFT, this.BackdropFaction, FRAMEPOINT_TOPLEFT, 0.21787, -0.070700)
    .setPoint(FRAMEPOINT_BOTTOMRIGHT, this.BackdropFaction, FRAMEPOINT_BOTTOMRIGHT, -0.11643, 0.11138)

  this.BackdropFactionButtonT[2] = new Frame("BackdropFactionButtonT[2]", this.FactionButtonT[2], 0, 0, 'BACKDROP', "")
  .setAllPoints(this.FactionButtonT[2])
    .setTexture("Icon_Faction_Base.blp", 0, true)
t = new Trigger()
t.triggerRegisterFrameEvent(this.FactionButtonT[2], FRAMEEVENT_CONTROL_CLICK)
t.addAction( () => {
this.FactionButtonT[2].enabled = false
this.FactionButtonT[2].enabled = true
})

  this.FactionButtonT[3] = new Frame("IconButtonTemplate", this.BackdropFaction, 0, 0)
    .setPoint(FRAMEPOINT_TOPLEFT, this.BackdropFaction, FRAMEPOINT_TOPLEFT, 0.31787, -0.070700)
    .setPoint(FRAMEPOINT_BOTTOMRIGHT, this.BackdropFaction, FRAMEPOINT_BOTTOMRIGHT, -0.016430, 0.11138)

  this.BackdropFactionButtonT[3] = new Frame("BackdropFactionButtonT[3]", this.FactionButtonT[3], 0, 0, 'BACKDROP', "")
  .setAllPoints(this.FactionButtonT[3])
    .setTexture("Icon_Faction_Base.blp", 0, true)
t = new Trigger()
t.triggerRegisterFrameEvent(this.FactionButtonT[3], FRAMEEVENT_CONTROL_CLICK)
t.addAction( () => {
this.FactionButtonT[3].enabled = false
this.FactionButtonT[3].enabled = true
})

  this.FactionButtonT[4] = new Frame("IconButtonTemplate", this.BackdropFaction, 0, 0)
    .setPoint(FRAMEPOINT_TOPLEFT, this.BackdropFaction, FRAMEPOINT_TOPLEFT, 0.017870, -0.16070)
    .setPoint(FRAMEPOINT_BOTTOMRIGHT, this.BackdropFaction, FRAMEPOINT_BOTTOMRIGHT, -0.31643, 0.021380)

  this.BackdropFactionButtonT[4] = new Frame("BackdropFactionButtonT[4]", this.FactionButtonT[4], 0, 0, 'BACKDROP', "")
  .setAllPoints(this.FactionButtonT[4])
    .setTexture("Icon_Faction_Base.blp", 0, true)
t = new Trigger()
t.triggerRegisterFrameEvent(this.FactionButtonT[4], FRAMEEVENT_CONTROL_CLICK)
t.addAction( () => {
this.FactionButtonT[4].enabled = false
this.FactionButtonT[4].enabled = true
})

  this.FactionButtonT[5] = new Frame("IconButtonTemplate", this.BackdropFaction, 0, 0)
    .setPoint(FRAMEPOINT_TOPLEFT, this.BackdropFaction, FRAMEPOINT_TOPLEFT, 0.11787, -0.16070)
    .setPoint(FRAMEPOINT_BOTTOMRIGHT, this.BackdropFaction, FRAMEPOINT_BOTTOMRIGHT, -0.21643, 0.021380)

  this.BackdropFactionButtonT[5] = new Frame("BackdropFactionButtonT[5]", this.FactionButtonT[5], 0, 0, 'BACKDROP', "")
  .setAllPoints(this.FactionButtonT[5])
    .setTexture("Icon_Faction_Base.blp", 0, true)
t = new Trigger()
t.triggerRegisterFrameEvent(this.FactionButtonT[5], FRAMEEVENT_CONTROL_CLICK)
t.addAction( () => {
this.FactionButtonT[5].enabled = false
this.FactionButtonT[5].enabled = true
})

  this.FactionButtonT[6] = new Frame("IconButtonTemplate", this.BackdropFaction, 0, 0)
    .setPoint(FRAMEPOINT_TOPLEFT, this.BackdropFaction, FRAMEPOINT_TOPLEFT, 0.21787, -0.16070)
    .setPoint(FRAMEPOINT_BOTTOMRIGHT, this.BackdropFaction, FRAMEPOINT_BOTTOMRIGHT, -0.11643, 0.021380)

  this.BackdropFactionButtonT[6] = new Frame("BackdropFactionButtonT[6]", this.FactionButtonT[6], 0, 0, 'BACKDROP', "")
  .setAllPoints(this.FactionButtonT[6])
    .setTexture("Icon_Faction_Base.blp", 0, true)
t = new Trigger()
t.triggerRegisterFrameEvent(this.FactionButtonT[6], FRAMEEVENT_CONTROL_CLICK)
t.addAction( () => {
this.FactionButtonT[6].enabled = false
this.FactionButtonT[6].enabled = true
})

  this.FactionButtonT[7] = new Frame("IconButtonTemplate", this.BackdropFaction, 0, 0)
    .setPoint(FRAMEPOINT_TOPLEFT, this.BackdropFaction, FRAMEPOINT_TOPLEFT, 0.31787, -0.16070)
    .setPoint(FRAMEPOINT_BOTTOMRIGHT, this.BackdropFaction, FRAMEPOINT_BOTTOMRIGHT, -0.016430, 0.021380)

  this.BackdropFactionButtonT[7] = new Frame("BackdropFactionButtonT[7]", this.FactionButtonT[7], 0, 0, 'BACKDROP', "")
  .setAllPoints(this.FactionButtonT[7])
    .setTexture("Icon_Faction_Base.blp", 0, true)
t = new Trigger()
t.triggerRegisterFrameEvent(this.FactionButtonT[7], FRAMEEVENT_CONTROL_CLICK)
t.addAction( () => {
this.FactionButtonT[7].enabled = false
this.FactionButtonT[7].enabled = true
})

  this.CommanderButtonBaseT[0] = new Frame("BACKDROP", this.BackdropCommanderBase, 1, 1, 'BACKDROP', "")
    .setPoint(FRAMEPOINT_TOPLEFT, this.BackdropCommanderBase, FRAMEPOINT_TOPLEFT, 0.020350, -0.036010)
    .setPoint(FRAMEPOINT_BOTTOMRIGHT, this.BackdropCommanderBase, FRAMEPOINT_BOTTOMRIGHT, -0.21675, 0.011090)
    .setTexture("Icon_Commander_Base.blp", 0, true)

  this.CommanderButtonBaseT[1] = new Frame("BACKDROP", this.BackdropCommanderBase, 1, 1, 'BACKDROP', "")
    .setPoint(FRAMEPOINT_TOPLEFT, this.BackdropCommanderBase, FRAMEPOINT_TOPLEFT, 0.12035, -0.036010)
    .setPoint(FRAMEPOINT_BOTTOMRIGHT, this.BackdropCommanderBase, FRAMEPOINT_BOTTOMRIGHT, -0.11675, 0.011090)
    .setTexture("Icon_Commander_Base.blp", 0, true)

  this.CommanderButtonBaseT[2] = new Frame("BACKDROP", this.BackdropCommanderBase, 1, 1, 'BACKDROP', "")
    .setPoint(FRAMEPOINT_TOPLEFT, this.BackdropCommanderBase, FRAMEPOINT_TOPLEFT, 0.22035, -0.036010)
    .setPoint(FRAMEPOINT_BOTTOMRIGHT, this.BackdropCommanderBase, FRAMEPOINT_BOTTOMRIGHT, -0.016750, 0.011090)
    .setTexture("Icon_Commander_Base.blp", 0, true)

  this.TextHeaderT[0] = new Frame("name", this.BackdropTextBackground, 0, 0, 'TEXT', "")
    .setAbsPoint(FRAMEPOINT_TOPLEFT, 0.0515900, 0.297770)
    .setAbsPoint(FRAMEPOINT_BOTTOMRIGHT, 0.308430, 0.277700)
    .setText("|cffFFCC00No Allegiance\n|r")
    .setEnabled(false)
    .setScale(1.71)
  BlzFrameSetTextAlignment(this.TextHeaderT[0].handle, TEXT_JUSTIFY_TOP, TEXT_JUSTIFY_MIDDLE)

  this.TextHeaderT[1] = new Frame("name", this.BackdropTextBackground, 0, 0, 'TEXT', "")
    .setAbsPoint(FRAMEPOINT_TOPLEFT, 0.0515900, 0.162700)
    .setAbsPoint(FRAMEPOINT_BOTTOMRIGHT, 0.308430, 0.142630)
    .setText("|cffFFCC00No Leader\n|r")
    .setEnabled(false)
    .setScale(1.71)
  BlzFrameSetTextAlignment(this.TextHeaderT[1].handle, TEXT_JUSTIFY_TOP, TEXT_JUSTIFY_MIDDLE)

  this.ButtonRandom = new Frame("IconButtonTemplate", this.BackdropRandomCustom, 0, 0)
    .setAbsPoint(FRAMEPOINT_TOPLEFT, 0.460000, 0.103000)
    .setAbsPoint(FRAMEPOINT_BOTTOMRIGHT, 0.530000, 0.0330000)

  this.BackdropButtonRandom = new Frame("BackdropButtonRandom", this.ButtonRandom, 0, 0, 'BACKDROP', "")
  .setAllPoints(this.ButtonRandom)
    .setTexture("Icon_All_Random.blp", 0, true)
t = new Trigger()
t.triggerRegisterFrameEvent(this.ButtonRandom, FRAMEEVENT_CONTROL_CLICK)
t.addAction( () => {
this.ButtonRandom.enabled = false
this.ButtonRandom.enabled = true
})

  this.RandomTitle = new Frame("name", this.BackdropRandomCustom, 0, 0, 'TEXT', "")
    .setAbsPoint(FRAMEPOINT_TOPLEFT, 0.350000, 0.0934700)
    .setAbsPoint(FRAMEPOINT_BOTTOMRIGHT, 0.448270, 0.0354800)
    .setText("|cffFFCC00ALL\nRANDOM|r")
    .setEnabled(false)
    .setScale(1.71)
  BlzFrameSetTextAlignment(this.RandomTitle.handle, TEXT_JUSTIFY_CENTER, TEXT_JUSTIFY_MIDDLE)

  this.TextBodyT[0] = new Frame("name", this.TextHeaderT[0], 0, 0, 'TEXT', "")
    .setAbsPoint(FRAMEPOINT_TOPLEFT, 0.0515900, 0.268780)
    .setAbsPoint(FRAMEPOINT_BOTTOMRIGHT, 0.308430, 0.162830)
    .setText("|cffffffffIt is recommended you choose a Faction or one will be picked for you.|r")
    .setEnabled(false)
    .setScale(0.858)
  BlzFrameSetTextAlignment(this.TextBodyT[0].handle, TEXT_JUSTIFY_TOP, TEXT_JUSTIFY_LEFT)

  this.TextBodyT[1] = new Frame("name", this.TextHeaderT[0], 0, 0, 'TEXT', "")
    .setAbsPoint(FRAMEPOINT_TOPLEFT, 0.0515900, 0.132830)
    .setAbsPoint(FRAMEPOINT_BOTTOMRIGHT, 0.308430, 0.0268800)
    .setText("|cffffffffIt is recommended you choose a Commander or one will be picked for you.|r")
    .setEnabled(false)
    .setScale(0.858)
  BlzFrameSetTextAlignment(this.TextBodyT[1].handle, TEXT_JUSTIFY_TOP, TEXT_JUSTIFY_LEFT)

  this.TextFluffT[0] = new Frame("name", this.TextBodyT[0], 0, 0, 'TEXT', "")
    .setAbsPoint(FRAMEPOINT_TOPLEFT, 0.0515900, 0.279820)
    .setAbsPoint(FRAMEPOINT_BOTTOMRIGHT, 0.308430, 0.267550)
    .setText("|cffafaa97Endless Realms Exists, Endless Possibilities To Discover|r")
    .setEnabled(false)
    .setScale(0.858)
  BlzFrameSetTextAlignment(this.TextFluffT[0].handle, TEXT_JUSTIFY_TOP, TEXT_JUSTIFY_MIDDLE)

  this.TextFluffT[1] = new Frame("name", this.TextBodyT[0], 0, 0, 'TEXT', "")
    .setAbsPoint(FRAMEPOINT_TOPLEFT, 0.0515900, 0.143270)
    .setAbsPoint(FRAMEPOINT_BOTTOMRIGHT, 0.308430, 0.131000)
    .setText("|cffafaa97Be afraid of an army led by a lion over one by a sheep|r")
    .setEnabled(false)
    .setScale(0.858)
  BlzFrameSetTextAlignment(this.TextFluffT[1].handle, TEXT_JUSTIFY_TOP, TEXT_JUSTIFY_MIDDLE)
}

}

Edit: Attached TS file
as @HerlySQR said.
For more and faster help on TypeScript, join the hive discord chat and ask as much as you like there. They are very helpful.
 
Level 24
Joined
Jun 26, 2020
Messages
1,914
For my issue with the menu, I increased the size of the main frame (in the generated code and ignoring the childs, I just edited the points of the main frame) and it finally looks as it should (except that the buttons are way bigger, but the text frames and script buttons now have the correct size).
 
Status
Not open for further replies.
Top