Compare commits
	
		
			2 Commits
		
	
	
		
			0ae74d294f
			...
			051e5afe8b
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						 | 
					051e5afe8b | ||
| 
						 | 
					8b9a725763 | 
@ -77,6 +77,110 @@
 | 
			
		||||
                "offsetZ" : 0
 | 
			
		||||
            },
 | 
			
		||||
            "iconPath" : "Textures/icons/itemIconItemGeneric.png"
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
            "id" : "Copper",
 | 
			
		||||
            "tokens" : [
 | 
			
		||||
                "GRAVITY",
 | 
			
		||||
                "TARGETABLE"
 | 
			
		||||
            ],
 | 
			
		||||
            "graphicsTemplate": {
 | 
			
		||||
                "model": {
 | 
			
		||||
                    "path" : "Models/items/materials/rock1.glb"
 | 
			
		||||
                }
 | 
			
		||||
            },
 | 
			
		||||
            "collidable": {
 | 
			
		||||
                "type" : "CUBE",
 | 
			
		||||
                "dimension1" : 0.1,
 | 
			
		||||
                "dimension2" : 0.1,
 | 
			
		||||
                "dimension3" : 0.35,
 | 
			
		||||
                "rotX": 0,
 | 
			
		||||
                "rotY": 0,
 | 
			
		||||
                "rotZ": 0,
 | 
			
		||||
                "rotW": 1,
 | 
			
		||||
                "offsetX" : 0,
 | 
			
		||||
                "offsetY" : 0.05,
 | 
			
		||||
                "offsetZ" : 0
 | 
			
		||||
            },
 | 
			
		||||
            "iconPath" : "Textures/icons/itemIconItemGeneric.png"
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
            "id" : "Tin",
 | 
			
		||||
            "tokens" : [
 | 
			
		||||
                "GRAVITY",
 | 
			
		||||
                "TARGETABLE"
 | 
			
		||||
            ],
 | 
			
		||||
            "graphicsTemplate": {
 | 
			
		||||
                "model": {
 | 
			
		||||
                    "path" : "Models/items/materials/rock1.glb"
 | 
			
		||||
                }
 | 
			
		||||
            },
 | 
			
		||||
            "collidable": {
 | 
			
		||||
                "type" : "CUBE",
 | 
			
		||||
                "dimension1" : 0.1,
 | 
			
		||||
                "dimension2" : 0.1,
 | 
			
		||||
                "dimension3" : 0.35,
 | 
			
		||||
                "rotX": 0,
 | 
			
		||||
                "rotY": 0,
 | 
			
		||||
                "rotZ": 0,
 | 
			
		||||
                "rotW": 1,
 | 
			
		||||
                "offsetX" : 0,
 | 
			
		||||
                "offsetY" : 0.05,
 | 
			
		||||
                "offsetZ" : 0
 | 
			
		||||
            },
 | 
			
		||||
            "iconPath" : "Textures/icons/itemIconItemGeneric.png"
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
            "id" : "Bronze",
 | 
			
		||||
            "tokens" : [
 | 
			
		||||
                "GRAVITY",
 | 
			
		||||
                "TARGETABLE"
 | 
			
		||||
            ],
 | 
			
		||||
            "graphicsTemplate": {
 | 
			
		||||
                "model": {
 | 
			
		||||
                    "path" : "Models/items/materials/rock1.glb"
 | 
			
		||||
                }
 | 
			
		||||
            },
 | 
			
		||||
            "collidable": {
 | 
			
		||||
                "type" : "CUBE",
 | 
			
		||||
                "dimension1" : 0.1,
 | 
			
		||||
                "dimension2" : 0.1,
 | 
			
		||||
                "dimension3" : 0.35,
 | 
			
		||||
                "rotX": 0,
 | 
			
		||||
                "rotY": 0,
 | 
			
		||||
                "rotZ": 0,
 | 
			
		||||
                "rotW": 1,
 | 
			
		||||
                "offsetX" : 0,
 | 
			
		||||
                "offsetY" : 0.05,
 | 
			
		||||
                "offsetZ" : 0
 | 
			
		||||
            },
 | 
			
		||||
            "iconPath" : "Textures/icons/itemIconItemGeneric.png"
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
            "id" : "Clay",
 | 
			
		||||
            "tokens" : [
 | 
			
		||||
                "GRAVITY",
 | 
			
		||||
                "TARGETABLE"
 | 
			
		||||
            ],
 | 
			
		||||
            "graphicsTemplate": {
 | 
			
		||||
                "model": {
 | 
			
		||||
                    "path" : "Models/items/materials/rock1.glb"
 | 
			
		||||
                }
 | 
			
		||||
            },
 | 
			
		||||
            "collidable": {
 | 
			
		||||
                "type" : "CUBE",
 | 
			
		||||
                "dimension1" : 0.1,
 | 
			
		||||
                "dimension2" : 0.1,
 | 
			
		||||
                "dimension3" : 0.35,
 | 
			
		||||
                "rotX": 0,
 | 
			
		||||
                "rotY": 0,
 | 
			
		||||
                "rotZ": 0,
 | 
			
		||||
                "rotW": 1,
 | 
			
		||||
                "offsetX" : 0,
 | 
			
		||||
                "offsetY" : 0.05,
 | 
			
		||||
                "offsetZ" : 0
 | 
			
		||||
            },
 | 
			
		||||
            "iconPath" : "Textures/icons/itemIconItemGeneric.png"
 | 
			
		||||
        }
 | 
			
		||||
    ],
 | 
			
		||||
    "files" : [
 | 
			
		||||
 | 
			
		||||
@ -32,6 +32,7 @@ Chop trees for lumber
 | 
			
		||||
Stone products
 | 
			
		||||
 - Stone tools
 | 
			
		||||
 - Forge
 | 
			
		||||
 - Hearth
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# Copper Age
 | 
			
		||||
@ -43,10 +44,38 @@ Copper materials
 | 
			
		||||
Tools
 | 
			
		||||
 - Scissors
 | 
			
		||||
 - Saw
 | 
			
		||||
 - 
 | 
			
		||||
 | 
			
		||||
Crafting Stations
 | 
			
		||||
 - Spinning wheel
 | 
			
		||||
 - Loom
 | 
			
		||||
 - Anvil
 | 
			
		||||
 | 
			
		||||
Electrical wire
 | 
			
		||||
 | 
			
		||||
Piping (antimicrobial)
 | 
			
		||||
 | 
			
		||||
# Bronze Age
 | 
			
		||||
Essentially just durability improvements on copper age
 | 
			
		||||
Allows mining of Iron
 | 
			
		||||
 | 
			
		||||
New mechanics?
 | 
			
		||||
 - Automatons
 | 
			
		||||
 - Complex machinery
 | 
			
		||||
 - Flying contraptions
 | 
			
		||||
 | 
			
		||||
Tin
 | 
			
		||||
 - Floating glass process
 | 
			
		||||
 | 
			
		||||
# Iron Age
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Magnets
 | 
			
		||||
 - Generators
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# Steel Age
 | 
			
		||||
 | 
			
		||||
Rails
 | 
			
		||||
Pipes
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -13,6 +13,7 @@ import electrosphere.renderer.ui.elements.Label;
 | 
			
		||||
import electrosphere.renderer.ui.elements.VirtualScrollable;
 | 
			
		||||
import electrosphere.renderer.ui.elementtypes.Element;
 | 
			
		||||
import electrosphere.renderer.ui.elementtypes.ContainerElement.YogaAlignment;
 | 
			
		||||
import electrosphere.renderer.ui.events.FocusEvent;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * The crafting panel
 | 
			
		||||
@ -88,6 +89,12 @@ public class CraftingPanel {
 | 
			
		||||
                CraftingPanel.setDetails(rVal, recipeDetailsSection, recipe);
 | 
			
		||||
                selectedRecipe = recipe;
 | 
			
		||||
            });
 | 
			
		||||
            recipeButton.setOnFocus((FocusEvent event) -> {
 | 
			
		||||
                CraftingPanel.setDetails(rVal, recipeDetailsSection, recipe);
 | 
			
		||||
                selectedRecipe = recipe;
 | 
			
		||||
            });
 | 
			
		||||
            recipeButton.setMarginTop(DETAILS_SPACER_HEIGHT);
 | 
			
		||||
            recipeButton.setMarginLeft(DETAILS_SPACER_HEIGHT);
 | 
			
		||||
            recipeScrollable.addChild(recipeButton);
 | 
			
		||||
        });
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -1,5 +1,7 @@
 | 
			
		||||
package electrosphere.renderer.ui.elements;
 | 
			
		||||
 | 
			
		||||
import java.util.function.Consumer;
 | 
			
		||||
 | 
			
		||||
import org.joml.Vector3f;
 | 
			
		||||
 | 
			
		||||
import electrosphere.engine.Globals;
 | 
			
		||||
@ -310,6 +312,20 @@ public class Button extends StandardContainerElement implements DrawableElement,
 | 
			
		||||
        onFocusCallback = callback;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * Custom method to register a consumer as a callback for focus
 | 
			
		||||
     * @param callback The callback
 | 
			
		||||
     */
 | 
			
		||||
    public void setOnFocus(Consumer<FocusEvent> callback){
 | 
			
		||||
        onFocusCallback = new FocusEventCallback() {
 | 
			
		||||
            @Override
 | 
			
		||||
            public boolean execute(FocusEvent event) {
 | 
			
		||||
                callback.accept(event);
 | 
			
		||||
                return false;
 | 
			
		||||
            }
 | 
			
		||||
        };
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Override
 | 
			
		||||
    public void setOnLoseFocus(FocusEventCallback callback) {
 | 
			
		||||
        onLoseFocusCallback = callback;
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user