Forums WoW Modding Support Archives WoWModding Threads [DiscordArchive] How can I implement a system where you can sele...

[DiscordArchive] How can I implement a system where you can sele...

[DiscordArchive] How can I implement a system where you can sele...

rektbyfaith
Administrator
0
08-05-2025, 11:34 AM
#1
Archived author: Needle • Posted: 2025-08-05T11:34:14.413000+00:00
Original source

rektbyfaith
08-05-2025, 11:34 AM #1

Archived author: Needle • Posted: 2025-08-05T11:34:14.413000+00:00
Original source

rektbyfaith
Administrator
0
08-05-2025, 11:34 AM
#2
Archived author: Needle • Posted: 2025-08-05T11:34:15.186000+00:00
Original source

Thread automatically created by Ne'Ergo in <#415944535718494208>
rektbyfaith
08-05-2025, 11:34 AM #2

Archived author: Needle • Posted: 2025-08-05T11:34:15.186000+00:00
Original source

Thread automatically created by Ne'Ergo in <#415944535718494208>

rektbyfaith
Administrator
0
08-05-2025, 12:42 PM
#3
Archived author: Ike • Posted: 2025-08-05T12:42:09.987000+00:00
Original source

This is somewhat simple if you have a modified wow.exe that allows you to modify the login screen.
In `Interface/GlueXML/AccountLogin.xml` add this after the `OptionsButton`:
```xml
<Frame name="RealmlistDropDown" inherits="GlueDropDownMenuTemplate">
<Anchors>
<Anchor point="BOTTOM" relativeTo="OptionsButton" relativePoint="TOP">
<Offset>
<AbsDimension x="0" y="-2"/>
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad>
GlueDropDownMenu_SetWidth(124, self);
GlueDropDownMenu_SetSelectedValue(self, GetCVar("realmlist"));
GlueDropDownMenu_Initialize(self, RealmlistDropDown_Initialize);
RealmlistDropDownText:SetJustifyH("LEFT");
</OnLoad>
</Scripts>
</Frame>
```
rektbyfaith
08-05-2025, 12:42 PM #3

Archived author: Ike • Posted: 2025-08-05T12:42:09.987000+00:00
Original source

This is somewhat simple if you have a modified wow.exe that allows you to modify the login screen.
In `Interface/GlueXML/AccountLogin.xml` add this after the `OptionsButton`:
```xml
<Frame name="RealmlistDropDown" inherits="GlueDropDownMenuTemplate">
<Anchors>
<Anchor point="BOTTOM" relativeTo="OptionsButton" relativePoint="TOP">
<Offset>
<AbsDimension x="0" y="-2"/>
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad>
GlueDropDownMenu_SetWidth(124, self);
GlueDropDownMenu_SetSelectedValue(self, GetCVar("realmlist"));
GlueDropDownMenu_Initialize(self, RealmlistDropDown_Initialize);
RealmlistDropDownText:SetJustifyH("LEFT");
</OnLoad>
</Scripts>
</Frame>
```

rektbyfaith
Administrator
0
08-05-2025, 12:42 PM
#4
Archived author: Ike • Posted: 2025-08-05T12:42:12.550000+00:00
Original source

In `Interface/GlueXML/AccountLogin.lua` add this at the end of the file:
```lua
function RealmlistDropDown_OnClick(self)
GlueDropDownMenu_SetSelectedValue(RealmlistDropDown, self.value);
SetCVar("realmlist", self.value)
end

local Realmlist = {
{
text=GetCVar("realmlist"),
value=GetCVar("realmlist"),
checked=true,
selected=true,
func = RealmlistDropDown_OnClick
},
{
text="play.foo.bar",
value="play.foo.bar",
checked=false,
selected=false,
func = RealmlistDropDown_OnClick
}}

function RealmlistDropDown_Initialize()
local selectedValue = GlueDropDownMenu_GetSelectedValue(RealmlistDropDown);
for i = 1, #Realmlist do
Realmlist[i].checked = (Realmlist[i].text == selectedValue)
GlueDropDownMenu_AddButton(Realmlist[i]);
if Realmlist[i].checked then
GlueDropDownMenu_SetSelectedValue(RealmlistDropDown, Realmlist[i]);
GlueDropDownMenu_SetSelectedName(RealmlistDropDown, Realmlist[i].text);
GlueDropDownMenu_SetText(Realmlist[i].text, RealmlistDropDown);
end
end
end

```
That's pretty much it!
rektbyfaith
08-05-2025, 12:42 PM #4

Archived author: Ike • Posted: 2025-08-05T12:42:12.550000+00:00
Original source

In `Interface/GlueXML/AccountLogin.lua` add this at the end of the file:
```lua
function RealmlistDropDown_OnClick(self)
GlueDropDownMenu_SetSelectedValue(RealmlistDropDown, self.value);
SetCVar("realmlist", self.value)
end

local Realmlist = {
{
text=GetCVar("realmlist"),
value=GetCVar("realmlist"),
checked=true,
selected=true,
func = RealmlistDropDown_OnClick
},
{
text="play.foo.bar",
value="play.foo.bar",
checked=false,
selected=false,
func = RealmlistDropDown_OnClick
}}

function RealmlistDropDown_Initialize()
local selectedValue = GlueDropDownMenu_GetSelectedValue(RealmlistDropDown);
for i = 1, #Realmlist do
Realmlist[i].checked = (Realmlist[i].text == selectedValue)
GlueDropDownMenu_AddButton(Realmlist[i]);
if Realmlist[i].checked then
GlueDropDownMenu_SetSelectedValue(RealmlistDropDown, Realmlist[i]);
GlueDropDownMenu_SetSelectedName(RealmlistDropDown, Realmlist[i].text);
GlueDropDownMenu_SetText(Realmlist[i].text, RealmlistDropDown);
end
end
end

```
That's pretty much it!

rektbyfaith
Administrator
0
08-06-2025, 03:53 AM
#5
Archived author: Ergo • Posted: 2025-08-06T03:53:10.967000+00:00
Original source

you are awesome! Thank you!
rektbyfaith
08-06-2025, 03:53 AM #5

Archived author: Ergo • Posted: 2025-08-06T03:53:10.967000+00:00
Original source

you are awesome! Thank you!

Recently Browsing
 1 Guest(s)
Recently Browsing
 1 Guest(s)