room tool work
	
		
			
	
		
	
	
		
	
		
			All checks were successful
		
		
	
	
		
			
				
	
				studiorailgun/Renderer/pipeline/head This commit looks good
				
			
		
		
	
	
				
					
				
			
		
			All checks were successful
		
		
	
	studiorailgun/Renderer/pipeline/head This commit looks good
				
			This commit is contained in:
		
							parent
							
								
									50a5da2f81
								
							
						
					
					
						commit
						279c7e3f38
					
				@ -204,8 +204,12 @@
 | 
				
			|||||||
                    "path" : "Models/basic/geometry/unitvector.glb"
 | 
					                    "path" : "Models/basic/geometry/unitvector.glb"
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
            },
 | 
					            },
 | 
				
			||||||
 | 
					            "primaryUsage" : {
 | 
				
			||||||
 | 
					                "clientHook" : "ROOM_TOOL_ACTION",
 | 
				
			||||||
 | 
					                "suppressServerRequest": true
 | 
				
			||||||
 | 
					            },
 | 
				
			||||||
            "secondaryUsage" : {
 | 
					            "secondaryUsage" : {
 | 
				
			||||||
                "clientHook" : "SELECT_ROOM",
 | 
					                "clientHook" : "ROOM_TOOL_MENU",
 | 
				
			||||||
                "suppressServerRequest": true
 | 
					                "suppressServerRequest": true
 | 
				
			||||||
            },
 | 
					            },
 | 
				
			||||||
            "collidable": {
 | 
					            "collidable": {
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										20
									
								
								assets/Data/menu/room/roomToolConfig.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										20
									
								
								assets/Data/menu/room/roomToolConfig.html
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,20 @@
 | 
				
			|||||||
 | 
					<style>
 | 
				
			||||||
 | 
					testClass {
 | 
				
			||||||
 | 
					    margin-top: "50px";
 | 
				
			||||||
 | 
					    margin-left: "50px";
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					mainPanel {
 | 
				
			||||||
 | 
					    margin-top: 50px;
 | 
				
			||||||
 | 
					    margin-right: 50px;
 | 
				
			||||||
 | 
					    margin-bottom: 50px;
 | 
				
			||||||
 | 
					    margin-left: 50px;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					</style>
 | 
				
			||||||
 | 
					<div class="mainPanel">
 | 
				
			||||||
 | 
					    <p class="testClass">Room Tool Menu!</p>
 | 
				
			||||||
 | 
					    <button onclick="hook('ROOM_TOOL_TOGGLE')">Select Rooms</button>
 | 
				
			||||||
 | 
					    <button onclick="hook('ROOM_TOOL_TOGGLE')">Show Rooms</button>
 | 
				
			||||||
 | 
					    <button onclick="hook('ROOM_TOOL_TOGGLE')">Select Furniture Spots</button>
 | 
				
			||||||
 | 
					    <button onclick="hook('ROOM_TOOL_TOGGLE')">Show Furniture Spots</button>
 | 
				
			||||||
 | 
					    <button onclick="hook('ROOM_TOOL_TOGGLE')">Detect Room</button>
 | 
				
			||||||
 | 
					</div>
 | 
				
			||||||
@ -61,10 +61,16 @@ export const clientHooks: Hook[] = [
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        signal: "SELECT_ROOM",
 | 
					        signal: "ROOM_TOOL_ACTION",
 | 
				
			||||||
        callback: (engine: Engine) => {
 | 
					        callback: (engine: Engine) => {
 | 
				
			||||||
            engine.classes.areaUtils.static.selectAreaRectangular()
 | 
					            engine.classes.areaUtils.static.selectAreaRectangular()
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        signal: "ROOM_TOOL_MENU",
 | 
				
			||||||
 | 
					        callback: (engine: Engine) => {
 | 
				
			||||||
 | 
					            engine.classes.menuUtils.static.openDialog('Data/menu/room/roomToolConfig.html')
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
    clientUIButtonHook,
 | 
					    clientUIButtonHook,
 | 
				
			||||||
]
 | 
					]
 | 
				
			||||||
@ -1,3 +1,4 @@
 | 
				
			|||||||
 | 
					import { GLOBAL_SCENE_ID } from "/Scripts/engine/hooks/hook-manager";
 | 
				
			||||||
import { Engine } from "/Scripts/types/engine";
 | 
					import { Engine } from "/Scripts/types/engine";
 | 
				
			||||||
import { Hook } from "/Scripts/types/hook";
 | 
					import { Hook } from "/Scripts/types/hook";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -10,6 +11,8 @@ export const clientUIButtonHook: Hook =
 | 
				
			|||||||
    callback: (engine: Engine, data: string) => {
 | 
					    callback: (engine: Engine, data: string) => {
 | 
				
			||||||
        if(data.length > 4 && data.substring(0,9) === "openDiag("){
 | 
					        if(data.length > 4 && data.substring(0,9) === "openDiag("){
 | 
				
			||||||
            engine.classes.menuUtils.static.openDialog(data.substring(9,data.length - 1))
 | 
					            engine.classes.menuUtils.static.openDialog(data.substring(9,data.length - 1))
 | 
				
			||||||
 | 
					        } else if(data.length > 4 && data.substring(0,5) === "hook("){
 | 
				
			||||||
 | 
					            engine.hookManager.fireSignal(GLOBAL_SCENE_ID,data.substring(5,data.length - 1))
 | 
				
			||||||
        } else {
 | 
					        } else {
 | 
				
			||||||
            console.log("button clicked " + data)
 | 
					            console.log("button clicked " + data)
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
				
			|||||||
@ -1830,6 +1830,7 @@ Move engine flags under engineState
 | 
				
			|||||||
Move rendering flags under renderingEngine
 | 
					Move rendering flags under renderingEngine
 | 
				
			||||||
Move database connection into serverState
 | 
					Move database connection into serverState
 | 
				
			||||||
Move more services into engineState
 | 
					Move more services into engineState
 | 
				
			||||||
 | 
					Room tool functionality scaffolding
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -66,7 +66,8 @@ public class DialogMenuGenerator {
 | 
				
			|||||||
        rVal.setParentAlignItem(YogaAlignment.Center);
 | 
					        rVal.setParentAlignItem(YogaAlignment.Center);
 | 
				
			||||||
        rVal.setParentJustifyContent(YogaJustification.Center);
 | 
					        rVal.setParentJustifyContent(YogaJustification.Center);
 | 
				
			||||||
        rVal.setOnNavigationCallback(new NavigationEventCallback() {public boolean execute(NavigationEvent event){
 | 
					        rVal.setOnNavigationCallback(new NavigationEventCallback() {public boolean execute(NavigationEvent event){
 | 
				
			||||||
            WindowUtils.recursiveSetVisible(Globals.elementService.getWindow(WindowStrings.NPC_DIALOG), false);
 | 
					            WindowUtils.closeWindow(WindowStrings.NPC_DIALOG);
 | 
				
			||||||
 | 
					            Globals.controlHandler.hintUpdateControlState(ControlsState.MAIN_GAME);
 | 
				
			||||||
            return false;
 | 
					            return false;
 | 
				
			||||||
        }});
 | 
					        }});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -99,6 +99,7 @@ public class ControlHandler {
 | 
				
			|||||||
        WindowStrings.WINDOW_MENU_INGAME_MAIN,
 | 
					        WindowStrings.WINDOW_MENU_INGAME_MAIN,
 | 
				
			||||||
        WindowStrings.WINDOW_MENU_INVENTORY,
 | 
					        WindowStrings.WINDOW_MENU_INVENTORY,
 | 
				
			||||||
        WindowStrings.WINDOW_MENU_MAIN,
 | 
					        WindowStrings.WINDOW_MENU_MAIN,
 | 
				
			||||||
 | 
					        WindowStrings.NPC_DIALOG,
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user