visual adjustments for voxel selection component
All checks were successful
studiorailgun/Renderer/pipeline/head This commit looks good

This commit is contained in:
austin 2024-09-24 17:40:41 -04:00
parent 63f0f3338c
commit dd415681bb
4 changed files with 37 additions and 9 deletions

View File

@ -12,12 +12,11 @@
+ fix the vibes + fix the vibes
Ticketed randomizer node for BTs to more heavily weight attacking and waiting Ticketed randomizer node for BTs to more heavily weight attacking and waiting
Lots of crates causes lag
- Physics thread time exploding -- need to sleep bodies
+ feedback driven requirements + feedback driven requirements
Add punching/unarmed combat Item/Equip overhaul (again)
UI spacing and scaling - Add punching/unarmed combat
Fix ui scaling on abnormal monitors
Better skybox Better skybox
- Fix transparency calculations for far-out objects - Fix transparency calculations for far-out objects
Crouching Crouching
@ -25,7 +24,6 @@
particles, light on sword collision particles, light on sword collision
Looking angle leverages rotators to swing sword at angle (ie if you look up you swing your sword into the sky) Looking angle leverages rotators to swing sword at angle (ie if you look up you swing your sword into the sky)
Come up with a title for the game and create a title menu for it (ideally with some animation and music) Come up with a title for the game and create a title menu for it (ideally with some animation and music)
Item/Equip overhaul (again)
Objectives Objectives
- PVP arena mode initially? - PVP arena mode initially?
- Spawn player at start of a dungeon - Spawn player at start of a dungeon

View File

@ -839,6 +839,9 @@ Change timescale for test
Refactor graphics entity definitions to be under dedicated object Refactor graphics entity definitions to be under dedicated object
Tree model debug menu Tree model debug menu
(09/24/2024)
Make voxel selection panel have better spacing
# TODO # TODO

View File

@ -100,7 +100,7 @@ public class MenuGeneratorsTerrainEditing {
//scrollable that contains all the voxel types //scrollable that contains all the voxel types
VirtualScrollable scrollable = new VirtualScrollable(VOXEL_SCROLLABLE_WIDTH, VOXEL_SCROLLABLE_HEIGHT); VirtualScrollable scrollable = new VirtualScrollable(VOXEL_SCROLLABLE_WIDTH, VOXEL_SCROLLABLE_HEIGHT);
scrollable.setFlexDirection(YogaFlexDirection.Row); scrollable.setFlexDirection(YogaFlexDirection.Column);
scrollable.setAlignItems(YogaAlignment.Start); scrollable.setAlignItems(YogaAlignment.Start);
//search input //search input
@ -134,14 +134,23 @@ public class MenuGeneratorsTerrainEditing {
scrollable.clearChildren(); scrollable.clearChildren();
VoxelData voxelData = Globals.gameConfigCurrent.getVoxelData(); VoxelData voxelData = Globals.gameConfigCurrent.getVoxelData();
List<VoxelType> matchingVoxels = voxelData.getTypes().stream().filter((type)->type.getName().toLowerCase().contains(searchString.toLowerCase())).toList(); List<VoxelType> matchingVoxels = voxelData.getTypes().stream().filter((type)->type.getName().toLowerCase().contains(searchString.toLowerCase())).toList();
Div currentRow = null;
int incrementer = 0;
//generate voxel buttons //generate voxel buttons
for(VoxelType type : matchingVoxels){ for(VoxelType type : matchingVoxels){
if(incrementer % 4 == 0){
currentRow = Div.createRow();
currentRow.setJustifyContent(YogaJustification.Evenly);
scrollable.addChild(currentRow);
}
Div containerDiv = Div.createDiv();
containerDiv.setMinWidthPercent(25.0f);
currentRow.addChild(containerDiv);
Button newButton = new Button(); Button newButton = new Button();
newButton.setAlignItems(YogaAlignment.Center); newButton.setAlignItems(YogaAlignment.Center);
//dimensions //dimensions
newButton.setWidth(VOXEL_BUTTON_WIDTH);
newButton.setMinWidth(VOXEL_BUTTON_WIDTH); newButton.setMinWidth(VOXEL_BUTTON_WIDTH);
newButton.setHeight(VOXEL_BUTTON_HEIGHT);
newButton.setMinHeight(VOXEL_BUTTON_HEIGHT); newButton.setMinHeight(VOXEL_BUTTON_HEIGHT);
//margin //margin
newButton.setMarginBottom(MARGIN_EACH_SIDE); newButton.setMarginBottom(MARGIN_EACH_SIDE);
@ -157,7 +166,12 @@ public class MenuGeneratorsTerrainEditing {
} }
texturePanel.setWidth(VOXEL_BUTTON_TEXTURE_DIM); texturePanel.setWidth(VOXEL_BUTTON_TEXTURE_DIM);
texturePanel.setHeight(VOXEL_BUTTON_TEXTURE_DIM); texturePanel.setHeight(VOXEL_BUTTON_TEXTURE_DIM);
texturePanel.setMarginBottom(MARGIN_EACH_SIDE);
texturePanel.setMarginLeft(MARGIN_EACH_SIDE);
texturePanel.setMarginRight(MARGIN_EACH_SIDE);
texturePanel.setMarginTop(MARGIN_EACH_SIDE);
newButton.addChild(texturePanel); newButton.addChild(texturePanel);
texturePanel.setAlignSelf(YogaAlignment.Center);
//button handling //button handling
newButton.addChild(voxelLabel); newButton.addChild(voxelLabel);
newButton.setOnClick(new ClickEventCallback() {public boolean execute(ClickEvent event){ newButton.setOnClick(new ClickEventCallback() {public boolean execute(ClickEvent event){
@ -166,7 +180,13 @@ public class MenuGeneratorsTerrainEditing {
Globals.clientSelectedVoxelType = type; Globals.clientSelectedVoxelType = type;
return false; return false;
}}); }});
scrollable.addChild(newButton); containerDiv.addChild(newButton);
incrementer++;
}
for(int i = incrementer; i % 4 != 0; i++){
Div spacerDiv = Div.createDiv();
spacerDiv.setMinWidthPercent(25.0f);
currentRow.addChild(spacerDiv);
} }
} }

View File

@ -8,6 +8,7 @@ import org.joml.Vector3f;
import electrosphere.client.entity.camera.CameraEntityUtils; import electrosphere.client.entity.camera.CameraEntityUtils;
import electrosphere.client.ui.menu.WindowUtils; import electrosphere.client.ui.menu.WindowUtils;
import electrosphere.client.ui.menu.ingame.MenuGeneratorsTerrainEditing;
import electrosphere.engine.Globals; import electrosphere.engine.Globals;
import electrosphere.engine.assetmanager.AssetDataStrings; import electrosphere.engine.assetmanager.AssetDataStrings;
import electrosphere.entity.Entity; import electrosphere.entity.Entity;
@ -16,6 +17,7 @@ import electrosphere.entity.state.inventory.InventoryUtils;
import electrosphere.entity.state.inventory.RelationalInventoryState; import electrosphere.entity.state.inventory.RelationalInventoryState;
import electrosphere.entity.state.inventory.UnrelationalInventoryState; import electrosphere.entity.state.inventory.UnrelationalInventoryState;
import electrosphere.game.data.creature.type.equip.EquipPoint; import electrosphere.game.data.creature.type.equip.EquipPoint;
import electrosphere.game.data.voxel.VoxelType;
import electrosphere.renderer.actor.ActorUtils; import electrosphere.renderer.actor.ActorUtils;
import electrosphere.renderer.ui.components.CharacterCustomizer; import electrosphere.renderer.ui.components.CharacterCustomizer;
import electrosphere.renderer.ui.components.EquipmentInventoryPanel; import electrosphere.renderer.ui.components.EquipmentInventoryPanel;
@ -57,6 +59,7 @@ public class MenuGeneratorsUITesting {
"CharacterCustomizer", "CharacterCustomizer",
"NaturalInventoryPanel", "NaturalInventoryPanel",
"EquipInventoryPanel", "EquipInventoryPanel",
"VoxelPicker",
}), }),
(ValueChangeEvent event) -> { (ValueChangeEvent event) -> {
attachComponent(rVal,event.getAsString()); attachComponent(rVal,event.getAsString());
@ -135,6 +138,10 @@ public class MenuGeneratorsUITesting {
InventoryUtils.setEquipInventory(ent, invent); InventoryUtils.setEquipInventory(ent, invent);
formEl.addChild(EquipmentInventoryPanel.createEquipmentInventoryPanel(ent)); formEl.addChild(EquipmentInventoryPanel.createEquipmentInventoryPanel(ent));
} break; } break;
case "VoxelPicker": {
formEl.addChild(MenuGeneratorsTerrainEditing.createVoxelTypeSelectionPanel((VoxelType voxelType) -> {
}));
} break;
} }
} }