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
4b1e93067f
commit
cae96992c0
@ -12,9 +12,9 @@ mainPanel {
|
|||||||
</style>
|
</style>
|
||||||
<div class="mainPanel">
|
<div class="mainPanel">
|
||||||
<p class="testClass">Room Tool Menu!</p>
|
<p class="testClass">Room Tool Menu!</p>
|
||||||
<button onclick="hook('ROOM_TOOL_TOGGLE')">Select Rooms</button>
|
<button onclick="engine.playerState.controlState.roomTool.updateState('SelectRoom')">Select Rooms</button>
|
||||||
<button onclick="hook('ROOM_TOOL_TOGGLE')">Show Rooms</button>
|
<button onclick="engine.playerState.controlState.roomTool.updateState('ShowRoom')">Show Rooms</button>
|
||||||
<button onclick="hook('ROOM_TOOL_TOGGLE')">Select Furniture Spots</button>
|
<button onclick="engine.playerState.controlState.roomTool.updateState('SelectFurniture')">Select Furniture Spots</button>
|
||||||
<button onclick="hook('ROOM_TOOL_TOGGLE')">Show Furniture Spots</button>
|
<button onclick="engine.playerState.controlState.roomTool.updateState('ShowFurniture')">Show Furniture Spots</button>
|
||||||
<button onclick="engine.playerState.controlState.roomTool.updateState('Detect Room')">Detect Room</button>
|
<button onclick="engine.playerState.controlState.roomTool.updateState('DetectRoom')">Detect Room</button>
|
||||||
</div>
|
</div>
|
||||||
@ -63,7 +63,19 @@ export const clientHooks: Hook[] = [
|
|||||||
{
|
{
|
||||||
signal: "ROOM_TOOL_ACTION",
|
signal: "ROOM_TOOL_ACTION",
|
||||||
callback: (engine: Engine) => {
|
callback: (engine: Engine) => {
|
||||||
engine.classes.areaUtils.static.selectAreaRectangular()
|
switch(engine.playerState.controlState.roomTool.currentState){
|
||||||
|
case 'DetectRoom': {
|
||||||
|
} break;
|
||||||
|
case 'SelectFurniture': {
|
||||||
|
} break;
|
||||||
|
case 'SelectRoom': {
|
||||||
|
engine.classes.areaUtils.static.selectAreaRectangular()
|
||||||
|
} break;
|
||||||
|
case 'ShowFurniture': {
|
||||||
|
} break;
|
||||||
|
case 'ShowRoom': {
|
||||||
|
} break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@ -18,14 +18,14 @@ export class RoomToolState {
|
|||||||
/**
|
/**
|
||||||
* The currently selected functionality of the room tool
|
* The currently selected functionality of the room tool
|
||||||
*/
|
*/
|
||||||
currentState: number = 0
|
currentState: 'SelectRoom' | 'ShowRoom' | 'SelectFurniture' | 'ShowFurniture' | 'DetectRoom' = 'SelectRoom'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Updates the state of the room tool
|
* Updates the state of the room tool
|
||||||
* @param value The new value
|
* @param value The new value
|
||||||
*/
|
*/
|
||||||
updateState(value: string){
|
updateState(value: 'SelectRoom' | 'ShowRoom' | 'SelectFurniture' | 'ShowFurniture' | 'DetectRoom'){
|
||||||
console.log(value)
|
this.currentState = value
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user