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
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
Add punching/unarmed combat
UI spacing and scaling
Item/Equip overhaul (again)
- Add punching/unarmed combat
Fix ui scaling on abnormal monitors
Better skybox
- Fix transparency calculations for far-out objects
Crouching
@ -25,7 +24,6 @@
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)
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
- PVP arena mode initially?
- 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
Tree model debug menu
(09/24/2024)
Make voxel selection panel have better spacing
# TODO

View File

@ -100,7 +100,7 @@ public class MenuGeneratorsTerrainEditing {
//scrollable that contains all the voxel types
VirtualScrollable scrollable = new VirtualScrollable(VOXEL_SCROLLABLE_WIDTH, VOXEL_SCROLLABLE_HEIGHT);
scrollable.setFlexDirection(YogaFlexDirection.Row);
scrollable.setFlexDirection(YogaFlexDirection.Column);
scrollable.setAlignItems(YogaAlignment.Start);
//search input
@ -134,14 +134,23 @@ public class MenuGeneratorsTerrainEditing {
scrollable.clearChildren();
VoxelData voxelData = Globals.gameConfigCurrent.getVoxelData();
List<VoxelType> matchingVoxels = voxelData.getTypes().stream().filter((type)->type.getName().toLowerCase().contains(searchString.toLowerCase())).toList();
Div currentRow = null;
int incrementer = 0;
//generate voxel buttons
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();
newButton.setAlignItems(YogaAlignment.Center);
//dimensions
newButton.setWidth(VOXEL_BUTTON_WIDTH);
newButton.setMinWidth(VOXEL_BUTTON_WIDTH);
newButton.setHeight(VOXEL_BUTTON_HEIGHT);
newButton.setMinHeight(VOXEL_BUTTON_HEIGHT);
//margin
newButton.setMarginBottom(MARGIN_EACH_SIDE);
@ -157,7 +166,12 @@ public class MenuGeneratorsTerrainEditing {
}
texturePanel.setWidth(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);
texturePanel.setAlignSelf(YogaAlignment.Center);
//button handling
newButton.addChild(voxelLabel);
newButton.setOnClick(new ClickEventCallback() {public boolean execute(ClickEvent event){
@ -166,7 +180,13 @@ public class MenuGeneratorsTerrainEditing {
Globals.clientSelectedVoxelType = type;
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.ui.menu.WindowUtils;
import electrosphere.client.ui.menu.ingame.MenuGeneratorsTerrainEditing;
import electrosphere.engine.Globals;
import electrosphere.engine.assetmanager.AssetDataStrings;
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.UnrelationalInventoryState;
import electrosphere.game.data.creature.type.equip.EquipPoint;
import electrosphere.game.data.voxel.VoxelType;
import electrosphere.renderer.actor.ActorUtils;
import electrosphere.renderer.ui.components.CharacterCustomizer;
import electrosphere.renderer.ui.components.EquipmentInventoryPanel;
@ -57,6 +59,7 @@ public class MenuGeneratorsUITesting {
"CharacterCustomizer",
"NaturalInventoryPanel",
"EquipInventoryPanel",
"VoxelPicker",
}),
(ValueChangeEvent event) -> {
attachComponent(rVal,event.getAsString());
@ -135,6 +138,10 @@ public class MenuGeneratorsUITesting {
InventoryUtils.setEquipInventory(ent, invent);
formEl.addChild(EquipmentInventoryPanel.createEquipmentInventoryPanel(ent));
} break;
case "VoxelPicker": {
formEl.addChild(MenuGeneratorsTerrainEditing.createVoxelTypeSelectionPanel((VoxelType voxelType) -> {
}));
} break;
}
}