Setting things accordingly to which box is selected in resource panel