Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Update tutorial to latest engine #11

Merged
merged 3 commits into from
Sep 2, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,23 +1,10 @@
/*
* Copyright 2016 MovingBlocks
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Copyright 2021 The Terasology Foundation
// SPDX-License-Identifier: Apache-2.0
package org.terasology.tutorialnui;

import org.terasology.engine.Time;
import org.terasology.registry.In;
import org.terasology.rendering.nui.CoreScreenLayer;
import org.terasology.engine.core.Time;
import org.terasology.engine.registry.In;
import org.terasology.engine.rendering.nui.CoreScreenLayer;
import org.terasology.nui.widgets.UIButton;
import org.terasology.nui.widgets.UIText;

Expand Down
19 changes: 3 additions & 16 deletions src/main/java/org/terasology/tutorialnui/widgets/UIBoxScreen.java
Original file line number Diff line number Diff line change
@@ -1,21 +1,8 @@
/*
* Copyright 2016 MovingBlocks
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Copyright 2021 The Terasology Foundation
// SPDX-License-Identifier: Apache-2.0
package org.terasology.tutorialnui.widgets;

import org.terasology.rendering.nui.CoreScreenLayer;
import org.terasology.engine.rendering.nui.CoreScreenLayer;

public class UIBoxScreen extends CoreScreenLayer {
@Override
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,8 @@
/*
* Copyright 2016 MovingBlocks
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Copyright 2021 The Terasology Foundation
// SPDX-License-Identifier: Apache-2.0
package org.terasology.tutorialnui.widgets;

import org.terasology.rendering.nui.CoreScreenLayer;
import org.terasology.engine.rendering.nui.CoreScreenLayer;

public class UIButtonScreen extends CoreScreenLayer {
@Override
Expand Down
Original file line number Diff line number Diff line change
@@ -1,25 +1,10 @@
/*
* Copyright 2016 MovingBlocks
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Copyright 2021 The Terasology Foundation
// SPDX-License-Identifier: Apache-2.0
package org.terasology.tutorialnui.widgets;

import org.terasology.rendering.nui.CoreScreenLayer;
import org.terasology.engine.rendering.nui.CoreScreenLayer;

public class UICheckboxScreen extends CoreScreenLayer {
@Override
public void initialise(){

}
public void initialise() { }
}
Original file line number Diff line number Diff line change
@@ -1,22 +1,9 @@
/*
* Copyright 2016 MovingBlocks
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Copyright 2021 The Terasology Foundation
// SPDX-License-Identifier: Apache-2.0
package org.terasology.tutorialnui.widgets;


import org.terasology.rendering.nui.CoreScreenLayer;
import org.terasology.engine.rendering.nui.CoreScreenLayer;

public class UIDoubleSliderScreen extends CoreScreenLayer {
@Override
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// Copyright 2020 The Terasology Foundation
// Copyright 2021 The Terasology Foundation
// SPDX-License-Identifier: Apache-2.0
package org.terasology.tutorialnui.widgets;

import org.terasology.rendering.nui.CoreScreenLayer;
import org.terasology.engine.rendering.nui.CoreScreenLayer;
import org.terasology.nui.widgets.UIDropdown;

import java.util.ArrayList;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// Copyright 2020 The Terasology Foundation
// Copyright 2021 The Terasology Foundation
// SPDX-License-Identifier: Apache-2.0
package org.terasology.tutorialnui.widgets;

import org.terasology.rendering.nui.CoreScreenLayer;
import org.terasology.engine.rendering.nui.CoreScreenLayer;
import org.terasology.nui.widgets.UIDropdownScrollable;

import java.util.ArrayList;
Expand All @@ -12,10 +12,12 @@ public class UIDropdownScrollableScreen extends CoreScreenLayer {

@Override
public void initialise() {
UIDropdownScrollable dropdown = find("Dropdown", UIDropdownScrollable.class);
UIDropdownScrollable<String> dropdown = find("Dropdown", UIDropdownScrollable.class);

List<String> options = new ArrayList<>();
for (int i = 1; i <= 10; i++)
for (int i = 1; i <= 10; i++) {
options.add("Option " + i);
}
dropdown.setOptions(options);
}
}
Original file line number Diff line number Diff line change
@@ -1,21 +1,8 @@
/*
* Copyright 2016 MovingBlocks
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Copyright 2021 The Terasology Foundation
// SPDX-License-Identifier: Apache-2.0
package org.terasology.tutorialnui.widgets;

import org.terasology.rendering.nui.CoreScreenLayer;
import org.terasology.engine.rendering.nui.CoreScreenLayer;

public class UIIconBarScreen extends CoreScreenLayer {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,8 @@
/*
* Copyright 2016 MovingBlocks
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Copyright 2021 The Terasology Foundation
// SPDX-License-Identifier: Apache-2.0
package org.terasology.tutorialnui.widgets;

import org.terasology.rendering.nui.CoreScreenLayer;
import org.terasology.engine.rendering.nui.CoreScreenLayer;

public class UIImageScreen extends CoreScreenLayer {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,8 @@
/*
* Copyright 2016 MovingBlocks
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Copyright 2021 The Terasology Foundation
// SPDX-License-Identifier: Apache-2.0
package org.terasology.tutorialnui.widgets;

import org.terasology.rendering.nui.CoreScreenLayer;
import org.terasology.engine.rendering.nui.CoreScreenLayer;

public class UILabelScreen extends CoreScreenLayer {

Expand Down
19 changes: 3 additions & 16 deletions src/main/java/org/terasology/tutorialnui/widgets/UIListScreen.java
Original file line number Diff line number Diff line change
@@ -1,21 +1,8 @@
/*
* Copyright 2016 MovingBlocks
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Copyright 2021 The Terasology Foundation
// SPDX-License-Identifier: Apache-2.0
package org.terasology.tutorialnui.widgets;

import org.terasology.rendering.nui.CoreScreenLayer;
import org.terasology.engine.rendering.nui.CoreScreenLayer;
import org.terasology.nui.widgets.UIList;

import java.util.ArrayList;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,8 @@
/*
* Copyright 2016 MovingBlocks
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Copyright 2021 The Terasology Foundation
// SPDX-License-Identifier: Apache-2.0
package org.terasology.tutorialnui.widgets;

import org.terasology.rendering.nui.CoreScreenLayer;
import org.terasology.engine.rendering.nui.CoreScreenLayer;

public class UILoadBarScreen extends CoreScreenLayer {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,8 @@
/*
* Copyright 2016 MovingBlocks
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Copyright 2021 The Terasology Foundation
// SPDX-License-Identifier: Apache-2.0
package org.terasology.tutorialnui.widgets;

import org.terasology.rendering.nui.CoreScreenLayer;
import org.terasology.engine.rendering.nui.CoreScreenLayer;

public class UIRadialScreen extends CoreScreenLayer {
@Override
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,8 @@
/*
* Copyright 2016 MovingBlocks
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Copyright 2021 The Terasology Foundation
// SPDX-License-Identifier: Apache-2.0
package org.terasology.tutorialnui.widgets;

import org.terasology.rendering.nui.CoreScreenLayer;
import org.terasology.engine.rendering.nui.CoreScreenLayer;

public class UIScrollbarScreen extends CoreScreenLayer {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,8 @@
/*
* Copyright 2016 MovingBlocks
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Copyright 2021 The Terasology Foundation
// SPDX-License-Identifier: Apache-2.0
package org.terasology.tutorialnui.widgets;

import org.terasology.rendering.nui.CoreScreenLayer;
import org.terasology.engine.rendering.nui.CoreScreenLayer;

public class UIScrollingTextScreen extends CoreScreenLayer {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,8 @@
/*
* Copyright 2016 MovingBlocks
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Copyright 2021 The Terasology Foundation
// SPDX-License-Identifier: Apache-2.0
package org.terasology.tutorialnui.widgets;

import org.terasology.rendering.nui.CoreScreenLayer;
import org.terasology.engine.rendering.nui.CoreScreenLayer;

public class UISliderScreen extends CoreScreenLayer {

Expand Down