Skip to content

Possible issue with options controller? #26

Open
@onedayitwillmake

Description

@onedayitwillmake

Calling the setValue function of an options controller does not modify the selected index of the drop down.
Modifying the selected index of the drop down, does not modify the initial value when you call getValue();

// Temp work around i'm doing is to just set both
var realIndex = parseInt( localStorage.getItem("lastSlot") );

var slotController = this._gui.add(this, '_currentSlot')
    .options([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10])
    .name("Save Slot");
slotController.domElement.childNodes[1].selectedIndex = realIndex;
slotController.setValue( realIndex )

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions