guiElement drop-down not updating selected_index

Bugs that are actually features.
Post Reply

Rseding91
Factorio Staff
Factorio Staff
Posts: 13247
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: guiElement drop-down not updating selected_index

Post by Rseding91 »

I can't reproduce. When I test it, the GUI is updated perfectly every time.
If you want to get ahold of me I'm almost always on Discord.

mophydeen
Filter Inserter
Filter Inserter
Posts: 529
Joined: Sun Nov 22, 2015 5:02 pm
Contact:

Re: guiElement drop-down not updating selected_index

Post by mophydeen »

Figured it out.

works:

Code: Select all

global["dropdown"].selected_index = index
works

Code: Select all

	local temp = global["dropdown"]
	temp.selected_index = index
doesn't work

Code: Select all

	local temp = global["dropdown"].selected_index
	temp = index
:D

Rseding91
Factorio Staff
Factorio Staff
Posts: 13247
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: guiElement drop-down not updating selected_index

Post by Rseding91 »

mophydeen wrote:Figured it out.

works:

Code: Select all

global["dropdown"].selected_index = index
works

Code: Select all

	local temp = global["dropdown"]
	temp.selected_index = index
doesn't work

Code: Select all

	local temp = global["dropdown"].selected_index
	temp = index
:D
Ah, well yeah :P
If you want to get ahold of me I'm almost always on Discord.

Post Reply

Return to “Not a bug”