BoutonsPath
BIN
App1.jar
Normal file
|
@ -2,12 +2,44 @@
|
|||
var.PointerBump = KeepDown(Pressed(wiimote.A),var.ButtonFreezeTime) or KeepDown(Pressed(wiimote.B),var.ButtonFreezeTime)
|
||||
Wiimote.Led1 = true
|
||||
|
||||
var.MoveButton = wiimote.B
|
||||
mouse.LeftButton = wiimote.A
|
||||
mouse.RightButton = wiimote.Plus
|
||||
mouse.MiddleButton = wiimote.Down
|
||||
|
||||
|
||||
mouse.RightButton = wiimote.B ;
|
||||
mouse.LeftButton = wiimote.A
|
||||
Up = wiimote.Up
|
||||
Down = wiimote.Down
|
||||
Left = wiimote.Left
|
||||
Right = wiimote.Right
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if KeepDown(Pressed(wiimote.Plus),var.ButtonFreezeTime) then
|
||||
mouse.x = 0.5
|
||||
mouse.y = 0.5
|
||||
var.HeadMouv = True
|
||||
end if
|
||||
if KeepDown(Pressed(wiimote.Minus),var.ButtonFreezeTime) then
|
||||
mouse.x = 0.5
|
||||
mouse.y = 0.5
|
||||
var.HeadMouv = false
|
||||
end if
|
||||
|
||||
|
||||
|
||||
|
||||
if var.HeadMouv then
|
||||
Wiimote.Led2 = true
|
||||
Wiimote.Led3 = false
|
||||
else
|
||||
Wiimote.Led3 = true
|
||||
Wiimote.Led2 = false
|
||||
if wiimote.PointerVisible but not var.PointerBump then
|
||||
mouse.x = wiimote.PointerX
|
||||
mouse.y = wiimote.PointerY
|
||||
end if
|
||||
end if
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -1,67 +1,67 @@
|
|||
(0, 06-mai-2020 10:24:44) Initializing PieLog
|
||||
(0, 06-mai-2020 10:24:44) Initializing filemode variable
|
||||
(0, 06-mai-2020 10:24:44) Initializing PieSpeech
|
||||
(0, 06-mai-2020 10:24:44) Initializing PieVariables
|
||||
(0, 06-mai-2020 10:24:44) Initializing PieCursorUnit
|
||||
(0, 06-mai-2020 10:24:44) Initializing PieMouse
|
||||
(0, 06-mai-2020 10:24:44) Initializing PieKeyboard
|
||||
(0, 06-mai-2020 10:24:44) Initializing PieInput
|
||||
(0, 06-mai-2020 10:24:44) Initializing PieOSC
|
||||
(0, 06-mai-2020 10:24:44) Initializing PiePie
|
||||
(0, 06-mai-2020 10:24:44) Initializing PieFunction
|
||||
(0, 06-mai-2020 10:24:44) Initializing PieStatement
|
||||
(0, 06-mai-2020 10:24:44) Initializing PieExpression
|
||||
(0, 06-mai-2020 10:24:44) Initializing PieJoystick
|
||||
(0, 06-mai-2020 10:24:44) Initializing PieP5
|
||||
(0, 06-mai-2020 10:24:44) Initializing PieMidi
|
||||
(0, 06-mai-2020 10:24:45) Initializing PiePPJoy
|
||||
(0, 06-mai-2020 10:24:45) Initializing PieRemote
|
||||
(0, 06-mai-2020 10:24:45) Initializing Pie Speech Recognition
|
||||
(0, 06-mai-2020 10:24:45) Initializing PieScreen
|
||||
(0, 06-mai-2020 10:24:45) GetMonitorEDID
|
||||
(0, 06-mai-2020 10:24:45) Initializing PieWIndow
|
||||
(0, 06-mai-2020 10:24:45) Initializing PieCursors
|
||||
(0, 06-mai-2020 10:24:45) Initializing PieZ800
|
||||
(0, 06-mai-2020 10:24:45) Initializing PieIntersense
|
||||
(0, 06-mai-2020 10:24:45) Initializing PieFastrak
|
||||
(0, 06-mai-2020 10:24:45) Initializing PiePPT
|
||||
(0, 06-mai-2020 10:24:45) Initializing PieTrackIR
|
||||
(0, 06-mai-2020 10:24:45) Initializing PiePinch
|
||||
(0, 06-mai-2020 10:24:45) Starting main
|
||||
(0, 06-mai-2020 10:24:45) Application object initialized
|
||||
(0, 06-mai-2020 10:24:45) Creating main window
|
||||
(0, 06-mai-2020 10:24:48) EditorForm.Create
|
||||
(0, 06-mai-2020 10:24:51) Checking command line parameters:
|
||||
(0, 06-mai-2020 10:24:51) Creating debug window
|
||||
(0, 06-mai-2020 10:24:52) Assigning exception handler
|
||||
(0, 06-mai-2020 10:24:52) Creating debug remote control window
|
||||
(0, 06-mai-2020 10:24:52) Running application
|
||||
(0, 06-mai-2020 10:24:54) FormCloseQuery
|
||||
(0, 06-mai-2020 10:24:54) Compile>Stop
|
||||
(0, 06-mai-2020 10:24:54) Application finished
|
||||
(0, 06-mai-2020 10:24:54) Destroying EditorForm
|
||||
(0, 06-mai-2020 10:24:54) Finalizing PiePinch
|
||||
(0, 06-mai-2020 10:24:54) Finalizing PieTrackIR
|
||||
(0, 06-mai-2020 10:24:54) Finalizing PiePPT
|
||||
(0, 06-mai-2020 10:24:54) Finalizing PieFastrak
|
||||
(0, 06-mai-2020 10:24:54) Finalizing PieIntersense
|
||||
(0, 06-mai-2020 10:24:54) Finalizing PieZ800
|
||||
(0, 06-mai-2020 10:24:54) Finalizing PieCursors
|
||||
(0, 06-mai-2020 10:24:54) Finalizing PieWindow
|
||||
(0, 06-mai-2020 10:24:54) Finalizing PieScreen
|
||||
(0, 06-mai-2020 10:24:54) Finalizing Pie Speech Recognition
|
||||
(0, 06-mai-2020 10:24:54) Finalizing PieRemote
|
||||
(0, 06-mai-2020 10:24:54) Finalizing PiePPJoy
|
||||
(0, 06-mai-2020 10:24:54) Finalizing PieMidi
|
||||
(0, 06-mai-2020 10:24:54) Finalizing PieP5
|
||||
(0, 06-mai-2020 10:24:54) Finalizing PieJoystick
|
||||
(0, 06-mai-2020 10:24:54) Finalizing PieStatement
|
||||
(0, 06-mai-2020 10:24:54) Finalizing PieFunction
|
||||
(0, 06-mai-2020 10:24:54) Finalizing PiePie
|
||||
(0, 06-mai-2020 10:24:54) Finalizing PieOSC
|
||||
(0, 06-mai-2020 10:24:54) Finalizing PieKeyboard
|
||||
(0, 06-mai-2020 10:24:54) Finalizing PieMouse
|
||||
(0, 06-mai-2020 10:24:54) Finalizing PieVariables
|
||||
(0, 06-mai-2020 10:24:54) Finalizing PieSpeech
|
||||
(0, 06-mai-2020 10:24:54) Finalizing PieLog
|
||||
(0, 06-mai-2020 10:24:54) Closing log file
|
||||
(0, 07-mai-2020 11:32:54) Initializing PieLog
|
||||
(0, 07-mai-2020 11:32:54) Initializing filemode variable
|
||||
(0, 07-mai-2020 11:32:54) Initializing PieSpeech
|
||||
(0, 07-mai-2020 11:32:54) Initializing PieVariables
|
||||
(0, 07-mai-2020 11:32:54) Initializing PieCursorUnit
|
||||
(0, 07-mai-2020 11:32:54) Initializing PieMouse
|
||||
(0, 07-mai-2020 11:32:54) Initializing PieKeyboard
|
||||
(0, 07-mai-2020 11:32:54) Initializing PieInput
|
||||
(0, 07-mai-2020 11:32:54) Initializing PieOSC
|
||||
(0, 07-mai-2020 11:32:54) Initializing PiePie
|
||||
(0, 07-mai-2020 11:32:54) Initializing PieFunction
|
||||
(0, 07-mai-2020 11:32:54) Initializing PieStatement
|
||||
(0, 07-mai-2020 11:32:54) Initializing PieExpression
|
||||
(0, 07-mai-2020 11:32:54) Initializing PieJoystick
|
||||
(0, 07-mai-2020 11:32:54) Initializing PieP5
|
||||
(0, 07-mai-2020 11:32:54) Initializing PieMidi
|
||||
(0, 07-mai-2020 11:32:54) Initializing PiePPJoy
|
||||
(0, 07-mai-2020 11:32:54) Initializing PieRemote
|
||||
(0, 07-mai-2020 11:32:54) Initializing Pie Speech Recognition
|
||||
(0, 07-mai-2020 11:32:54) Initializing PieScreen
|
||||
(0, 07-mai-2020 11:32:54) GetMonitorEDID
|
||||
(0, 07-mai-2020 11:32:54) Initializing PieWIndow
|
||||
(0, 07-mai-2020 11:32:54) Initializing PieCursors
|
||||
(0, 07-mai-2020 11:32:54) Initializing PieZ800
|
||||
(0, 07-mai-2020 11:32:54) Initializing PieIntersense
|
||||
(0, 07-mai-2020 11:32:54) Initializing PieFastrak
|
||||
(0, 07-mai-2020 11:32:54) Initializing PiePPT
|
||||
(0, 07-mai-2020 11:32:54) Initializing PieTrackIR
|
||||
(0, 07-mai-2020 11:32:54) Initializing PiePinch
|
||||
(0, 07-mai-2020 11:32:54) Starting main
|
||||
(0, 07-mai-2020 11:32:54) Application object initialized
|
||||
(0, 07-mai-2020 11:32:54) Creating main window
|
||||
(0, 07-mai-2020 11:32:54) EditorForm.Create
|
||||
(0, 07-mai-2020 11:32:54) Checking command line parameters:
|
||||
(0, 07-mai-2020 11:32:54) Creating debug window
|
||||
(0, 07-mai-2020 11:32:54) Assigning exception handler
|
||||
(0, 07-mai-2020 11:32:54) Creating debug remote control window
|
||||
(0, 07-mai-2020 11:32:54) Running application
|
||||
(0, 07-mai-2020 11:32:57) FormCloseQuery
|
||||
(0, 07-mai-2020 11:32:57) Compile>Stop
|
||||
(0, 07-mai-2020 11:32:57) Application finished
|
||||
(0, 07-mai-2020 11:32:57) Destroying EditorForm
|
||||
(0, 07-mai-2020 11:32:57) Finalizing PiePinch
|
||||
(0, 07-mai-2020 11:32:57) Finalizing PieTrackIR
|
||||
(0, 07-mai-2020 11:32:57) Finalizing PiePPT
|
||||
(0, 07-mai-2020 11:32:57) Finalizing PieFastrak
|
||||
(0, 07-mai-2020 11:32:57) Finalizing PieIntersense
|
||||
(0, 07-mai-2020 11:32:57) Finalizing PieZ800
|
||||
(0, 07-mai-2020 11:32:57) Finalizing PieCursors
|
||||
(0, 07-mai-2020 11:32:57) Finalizing PieWindow
|
||||
(0, 07-mai-2020 11:32:57) Finalizing PieScreen
|
||||
(0, 07-mai-2020 11:32:57) Finalizing Pie Speech Recognition
|
||||
(0, 07-mai-2020 11:32:57) Finalizing PieRemote
|
||||
(0, 07-mai-2020 11:32:57) Finalizing PiePPJoy
|
||||
(0, 07-mai-2020 11:32:57) Finalizing PieMidi
|
||||
(0, 07-mai-2020 11:32:57) Finalizing PieP5
|
||||
(0, 07-mai-2020 11:32:57) Finalizing PieJoystick
|
||||
(0, 07-mai-2020 11:32:57) Finalizing PieStatement
|
||||
(0, 07-mai-2020 11:32:57) Finalizing PieFunction
|
||||
(0, 07-mai-2020 11:32:57) Finalizing PiePie
|
||||
(0, 07-mai-2020 11:32:57) Finalizing PieOSC
|
||||
(0, 07-mai-2020 11:32:57) Finalizing PieKeyboard
|
||||
(0, 07-mai-2020 11:32:57) Finalizing PieMouse
|
||||
(0, 07-mai-2020 11:32:57) Finalizing PieVariables
|
||||
(0, 07-mai-2020 11:32:57) Finalizing PieSpeech
|
||||
(0, 07-mai-2020 11:32:57) Finalizing PieLog
|
||||
(0, 07-mai-2020 11:32:57) Closing log file
|
||||
|
|
1
External_Software/default.cfg
Normal file
|
@ -0,0 +1 @@
|
|||
{"settingsVersion":"0","videoPortTextBox":"7777","sensorPortTextBox":"5555","hotspotSsidTextBox":"trinus","hotspotPwdTextBox":"mypassword","forcedIPCheckBox":"0","forcedIPTextBox":"192.168.42.129","fake3DComboBox":"0","fakeRollCheckBox":"0","motionBoostCheckBox":"1","qualityComboBox":"2","fastScalingCheckBox":"0","dynamicQualityCheckBox":"0","compressionTrackBar":"3","dynamicCompressionQualityCheckBox":"0","captureModeComboBoxV2":"0","captureCursorCheckBox":"0","maxFrameRateTextBox":"70","headmountComboBox":"0","sensorTypeComboBox":"0","trackIRFixCheckBox":"0","leftActionButton":"{\"actionName\":\"D1\",\"deviceId\":\"keyboard\"}","ignoreActionButton":"{\"actionName\":\"D3\",\"deviceId\":\"keyboard\"}","rightActionButton":"{\"actionName\":\"D2\",\"deviceId\":\"keyboard\"}","sensorResetActionButton":"{\"actionName\":\"D4\",\"deviceId\":\"keyboard\"}","orderYawComboBox":"0","orderPitchComboBox":"1","orderRollComboBox":"2","predictiveTrackBar":"0","scaleX":"146928","scaleY":"230000","scaleInX":"2450000","scaleInY":"1700000","screenCenterX":"500000","screenCenterY":"500000","lensCenterX":"536325","lensCenterY":"500000","warpX":"2300000","warpY":"220000","warpZ":"240000","warpW":"0","absScaleX":"0","absScaleY":"0","absScaleInX":"900","absScaleInY":"900","absScreenCenterX":"0","absScreenCenterY":"0","absLensCenterX":"0","absLensCenterY":"0","absWarpX":"0","absWarpY":"0","absWarpZ":"0","absWarpW":"0","absChroma":"0","absIpd":"500","scaleYawTrackBar":"30","scalePitchTrackBar":"15","scaleRollTrackBar":"0","invertYawCheckBox":"0","invertPitchCheckBox":"0","invertRollCheckBox":"0","previewCheckBox":"1","scaleXTrackBar":"1","scaleYTrackBar":"1","scaleZTrackBar":"1","positionPluginNameComboBox":"0","borderFixLeftTrackBar":"0","borderFixRightTrackBar":"0","borderFixTopTrackBar":"0","borderFixBottomTrackBar":"0","zoomTrackBar":"100","zoomCenterPivotCheckBox":"0","wifiHotspotCheckBox":"0","simpleMode":"0","deadZoneTrackBar":"0","dpiFixCheckBox":"0","precisionMouseCheckBox":"0","queueFramesCheckBox":"1","bruteCheckCheckBox":"1","nvidiaOptimizedCheckBox":"0","lowColorButton":"buttonface","highColorButton":"buttonface","steamVRSourceCheckBox":"0","leftTriggerComboBox":"RESET","centerTriggerComboBox":"RESET","rightTriggerComboBox":"ZOOM","useMoonlightCheckBox":"0","brightnessTrackBar":"500","contrastTrackBar":"500","nsdCheckCheckBox":"1","extSteamVRComboBox":"-1","headZOffsetTrackBar":"0","headYOffsetTrackBar":"0","driftCompensationCheckBox":"0","yawOffsetTrackBar":"0","pitchOffsetTrackBar":"0","steamVRSyncCheckBox":"0","steamVRIPDtrackBar":"600","steamVRHookCaptureCheckBox":"1"}
|
BIN
bin/App1.jar
Normal file
BIN
bin/Application1/carte$7.class
Normal file
BIN
bin/Application1/carte$8.class
Normal file
BIN
bin/Application1/carte$9.class
Normal file
BIN
bin/External_Software/Glovepie/Bird.dll
Normal file
BIN
bin/External_Software/Glovepie/CStereoI.dll
Normal file
BIN
bin/External_Software/Glovepie/D3DX81ab.dll
Normal file
BIN
bin/External_Software/Glovepie/EMADevice_DLL.DLL
Normal file
BIN
bin/External_Software/Glovepie/GlovePIE.exe
Normal file
28
bin/External_Software/Glovepie/GlovePIE.exe.manifest
Normal file
|
@ -0,0 +1,28 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
|
||||
<assemblyIdentity
|
||||
type="win32"
|
||||
name="CodeGear RAD Studio"
|
||||
version="11.0.2627.5503"
|
||||
processorArchitecture="*"/>
|
||||
<dependency>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity
|
||||
type="win32"
|
||||
name="Microsoft.Windows.Common-Controls"
|
||||
version="6.0.0.0"
|
||||
publicKeyToken="6595b64144ccf1df"
|
||||
language="*"
|
||||
processorArchitecture="*"/>
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||
<security>
|
||||
<requestedPrivileges>
|
||||
<requestedExecutionLevel
|
||||
level="requireAdministrator"
|
||||
uiAccess="false"/>
|
||||
</requestedPrivileges>
|
||||
</security>
|
||||
</trustInfo>
|
||||
</assembly>
|
6
bin/External_Software/Glovepie/GlovePIE.ini
Normal file
|
@ -0,0 +1,6 @@
|
|||
[EditorForm]
|
||||
FormVersion=0
|
||||
|
||||
[EditorForm\TEditorForm.FileRecentManager]
|
||||
Item_0=C:\Users\nunes\Desktop\Travail\PIR\Software\Glovepie\WiimoteScripts\Test.PIE
|
||||
|
BIN
bin/External_Software/Glovepie/GlovePIE_Bird_5DT.exe
Normal file
|
@ -0,0 +1,28 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
|
||||
<assemblyIdentity
|
||||
type="win32"
|
||||
name="CodeGear RAD Studio"
|
||||
version="11.0.2627.5503"
|
||||
processorArchitecture="*"/>
|
||||
<dependency>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity
|
||||
type="win32"
|
||||
name="Microsoft.Windows.Common-Controls"
|
||||
version="6.0.0.0"
|
||||
publicKeyToken="6595b64144ccf1df"
|
||||
language="*"
|
||||
processorArchitecture="*"/>
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||
<security>
|
||||
<requestedPrivileges>
|
||||
<requestedExecutionLevel
|
||||
level="requireAdministrator"
|
||||
uiAccess="false"/>
|
||||
</requestedPrivileges>
|
||||
</security>
|
||||
</trustInfo>
|
||||
</assembly>
|
BIN
bin/External_Software/Glovepie/HAT3DIPC.dll
Normal file
188
bin/External_Software/Glovepie/MouseScripts/MouseParty.pie
Normal file
|
@ -0,0 +1,188 @@
|
|||
// Click the RUN Button above -^ to start,
|
||||
// The mice must be plugged in before pressing RUN.
|
||||
|
||||
// Don't click the title bar of THIS window with the REAL mouse or it
|
||||
// will freeze! This includes when it is minimized to the desktop.
|
||||
// You can click title bars of other windows with the real mouse, and
|
||||
// you can click this window's title bar with any fake mouse.
|
||||
// If it freezes, use Alt+Tab to fix it.
|
||||
|
||||
// The mice will move slowly over GlovePIE's window because of the
|
||||
// syntax highlighter. Minimise GlovePIE to see it properly.
|
||||
|
||||
// This script has mouse 1 controlling the real mouse pointer, and up
|
||||
// to 3 other mice controlling fake mouse pointers. The fake mouse
|
||||
// pointers will have a coloured number next to them.
|
||||
|
||||
// All mouse pointers start in the same spot as the original cursor
|
||||
// until you move them.
|
||||
|
||||
if starting then
|
||||
cursor2.visible = false
|
||||
cursor3.visible = false
|
||||
cursor4.visible = false
|
||||
endif
|
||||
|
||||
// The real cursor is now only controlled by mouse 1
|
||||
mouse.Swallow = true
|
||||
fakemouse.DirectInputX = mouse1.DirectInputX
|
||||
fakemouse.DirectInputY = mouse1.DirectInputY
|
||||
mouse.LeftButton = mouse1.LeftButton
|
||||
mouse.RightButton = mouse1.RightButton
|
||||
mouse.MiddleButton = mouse1.MiddleButton
|
||||
mouse.XButton1 = mouse1.XButton1
|
||||
mouse.XButton2 = mouse1.XButton2
|
||||
|
||||
// Show a fake cursor 2
|
||||
if mouse2.present but not var.shown2 then
|
||||
cursor2.visible = true
|
||||
var.Mouse2x = mouse.CursorPosX
|
||||
var.Mouse2y = mouse.CursorPosY
|
||||
var.shown2 = true
|
||||
endif
|
||||
|
||||
// Show a fake cursor 3
|
||||
if mouse3.present but not var.shown3 then
|
||||
cursor3.visible = true
|
||||
var.Mouse3x = mouse.CursorPosX
|
||||
var.Mouse3y = mouse.CursorPosY
|
||||
var.shown3 = true
|
||||
endif
|
||||
|
||||
// Show a fake cursor 4
|
||||
if mouse4.present but not var.shown4 then
|
||||
cursor4.visible = true
|
||||
var.Mouse4x = mouse.CursorPosX
|
||||
var.Mouse4y = mouse.CursorPosY
|
||||
var.shown4 = true
|
||||
endif
|
||||
|
||||
// Do mouse pointer 2
|
||||
if mouse2.present then
|
||||
// How much has mouse 2 moved?
|
||||
var.deltax2 = Delta(mouse2.DirectInputX)
|
||||
var.deltay2 = Delta(mouse2.DirectInputY)
|
||||
|
||||
// Mouse ballistics attempt
|
||||
var.velocity = ([(smooth(var.deltaX2) / 24ms) in inches per second, (smooth(var.deltaY2) / 24ms) in inches per second] )
|
||||
var.speed = |var.velocity|
|
||||
if var.speed <= 0.2 then
|
||||
var.deltax2 = var.deltax2 * 2
|
||||
var.deltay2 = var.deltay2 * 2
|
||||
endif
|
||||
if var.speed > 0.2 and var.speed <= 0.4 then
|
||||
var.deltax2 = var.deltax2 * 4
|
||||
var.deltay2 = var.deltay2 * 4
|
||||
endif
|
||||
if var.speed > 0.4 and var.speed <= 1.25 then
|
||||
var.deltax2 = var.deltax2 * 7
|
||||
var.deltay2 = var.deltay2 * 7
|
||||
endif
|
||||
if var.speed > 1.25 and var.speed <= 3.9 then
|
||||
var.deltax2 = var.deltax2 *12 //* 7
|
||||
var.deltay2 = var.deltay2 *12 //* 7
|
||||
endif
|
||||
if var.speed > 3.9 then
|
||||
var.deltax2 = var.deltax2 * 20// * 13.77
|
||||
var.deltay2 = var.deltay2 * 20// * 13.77
|
||||
endif
|
||||
var.Mouse2x = var.Mouse2x pixels + (var.deltax2 in pixels)
|
||||
var.Mouse2y = var.Mouse2y pixels + (var.deltay2 in pixels)
|
||||
if var.Mouse2x < screen.DesktopLeft then var.Mouse2x = screen.DesktopLeft
|
||||
if var.Mouse2x > screen.DesktopRight then var.Mouse2x = screen.DesktopRight
|
||||
if var.Mouse2y < screen.DesktopTop then var.Mouse2y = screen.DesktopTop
|
||||
if var.Mouse2y > screen.DesktopBottom then var.Mouse2y = screen.DesktopBottom
|
||||
endif
|
||||
Cursor2.PosX = var.Mouse2x
|
||||
Cursor2.PosY = var.Mouse2y
|
||||
Cursor2.LeftButton = mouse2.LeftButton
|
||||
Cursor2.RightButton = mouse2.RightButton
|
||||
Cursor2.MiddleButton = mouse2.MiddleButton
|
||||
|
||||
// Do mouse pointer 3
|
||||
if mouse3.present then
|
||||
// How much has mouse 2 moved?
|
||||
var.deltax3 = Delta(mouse3.DirectInputX)
|
||||
var.deltay3 = Delta(mouse3.DirectInputY)
|
||||
|
||||
// Mouse ballistics attempt
|
||||
var.velocity = ([(smooth(var.deltaX3) / 24ms) in inches per second, (smooth(var.deltaY3) / 24ms) in inches per second] )
|
||||
var.speed = |var.velocity|
|
||||
if var.speed <= 0.2 then
|
||||
var.deltax3 = var.deltax3 * 2
|
||||
var.deltay3 = var.deltay3 * 2
|
||||
endif
|
||||
if var.speed > 0.2 and var.speed <= 0.4 then
|
||||
var.deltax3 = var.deltax3 * 4
|
||||
var.deltay3 = var.deltay3 * 4
|
||||
endif
|
||||
if var.speed > 0.4 and var.speed <= 1.25 then
|
||||
var.deltax3 = var.deltax3 * 7
|
||||
var.deltay3 = var.deltay3 * 7
|
||||
endif
|
||||
if var.speed > 1.25 and var.speed <= 3.9 then
|
||||
var.deltax3 = var.deltax3 *12 //* 7
|
||||
var.deltay3 = var.deltay3 *12 //* 7
|
||||
endif
|
||||
if var.speed > 3.9 then
|
||||
var.deltax3 = var.deltax3 * 20// * 13.77
|
||||
var.deltay3 = var.deltay3 * 20// * 13.77
|
||||
endif
|
||||
var.Mouse3x = var.Mouse3x pixels + (var.deltax3 in pixels)
|
||||
var.Mouse3y = var.Mouse3y pixels + (var.deltay3 in pixels)
|
||||
if var.Mouse3x < screen.DesktopLeft then var.Mouse3x = screen.DesktopLeft
|
||||
if var.Mouse3x > screen.DesktopRight then var.Mouse3x = screen.DesktopRight
|
||||
if var.Mouse3y < screen.DesktopTop then var.Mouse3y = screen.DesktopTop
|
||||
if var.Mouse3y > screen.DesktopBottom then var.Mouse3y = screen.DesktopBottom
|
||||
endif
|
||||
Cursor3.PosX = var.Mouse3x
|
||||
Cursor3.PosY = var.Mouse3y
|
||||
Cursor3.LeftButton = mouse3.LeftButton
|
||||
Cursor3.RightButton = mouse3.RightButton
|
||||
Cursor3.MiddleButton = mouse3.MiddleButton
|
||||
|
||||
// Do mouse pointer 4
|
||||
if mouse4.present then
|
||||
// How much has mouse 2 moved?
|
||||
var.deltax4 = Delta(mouse4.DirectInputX)
|
||||
var.deltay4 = Delta(mouse4.DirectInputY)
|
||||
|
||||
// Mouse ballistics attempt
|
||||
var.velocity = ([(smooth(var.deltaX4) / 24ms) in inches per second, (smooth(var.deltaY4) / 24ms) in inches per second] )
|
||||
var.speed = |var.velocity|
|
||||
if var.speed <= 0.2 then
|
||||
var.deltax4 = var.deltax4 * 2
|
||||
var.deltay4 = var.deltay4 * 2
|
||||
endif
|
||||
if var.speed > 0.2 and var.speed <= 0.4 then
|
||||
var.deltax4 = var.deltax4 * 4
|
||||
var.deltay4 = var.deltay4 * 4
|
||||
endif
|
||||
if var.speed > 0.4 and var.speed <= 1.25 then
|
||||
var.deltax4 = var.deltax4 * 7
|
||||
var.deltay4 = var.deltay4 * 7
|
||||
endif
|
||||
if var.speed > 1.25 and var.speed <= 3.9 then
|
||||
var.deltax4 = var.deltax4 *12 //* 7
|
||||
var.deltay4 = var.deltay4 *12 //* 7
|
||||
endif
|
||||
if var.speed > 3.9 then
|
||||
var.deltax4 = var.deltax4 * 20// * 13.77
|
||||
var.deltay4 = var.deltay4 * 20// * 13.77
|
||||
endif
|
||||
var.Mouse4x = var.Mouse4x pixels + (var.deltax4 in pixels)
|
||||
var.Mouse4y = var.Mouse4y pixels + (var.deltay4 in pixels)
|
||||
if var.Mouse4x < screen.DesktopLeft then var.Mouse4x = screen.DesktopLeft
|
||||
if var.Mouse4x > screen.DesktopRight then var.Mouse4x = screen.DesktopRight
|
||||
if var.Mouse4y < screen.DesktopTop then var.Mouse4y = screen.DesktopTop
|
||||
if var.Mouse4y > screen.DesktopBottom then var.Mouse4y = screen.DesktopBottom
|
||||
endif
|
||||
Cursor4.PosX = var.Mouse4x
|
||||
Cursor4.PosY = var.Mouse4y
|
||||
Cursor4.LeftButton = mouse4.LeftButton
|
||||
Cursor4.RightButton = mouse4.RightButton
|
||||
Cursor4.MiddleButton = mouse4.MiddleButton
|
||||
|
||||
|
||||
|
||||
|
BIN
bin/External_Software/Glovepie/NPClient.dll
Normal file
559
bin/External_Software/Glovepie/PIE.html
Normal file
|
@ -0,0 +1,559 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>Programmable Input Emulator 0.41</title>
|
||||
|
||||
<meta http-equiv="content-type"
|
||||
content="text/html; charset=ISO-8859-1">
|
||||
|
||||
<meta name="author" content="Carl Kenner">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<h1>Programmable Input Emulator 0.41 Introduction</h1>
|
||||
<br>
|
||||
|
||||
(Don't forget to also read the Documentation.rtf file)<p>
|
||||
The GlovePIE Programmable Input Emulator (previously known as PIE) emulates input devices
|
||||
by using other input devices.<br>
|
||||
This means you can use the joystick in a keyboard only game (eg. DOOM3)
|
||||
or the keyboard in a joystick only game (eg. Return Of The King Co-op mode).
|
||||
Or you can control any game with a virtual reality glove. Or you can create
|
||||
macros to do complex moves at the touch of a button (eg. Mortal Kombat).
|
||||
Or you can play musical instruments from your PC.<br>
|
||||
<br>
|
||||
This is still a beta version, so it will be buggy and incomplete.<br>
|
||||
|
||||
<h2>You can emulate:</h2>
|
||||
|
||||
<ul>
|
||||
<li>the mouse</li>
|
||||
<li>the keyboard (on windows 2000 and XP)</li>
|
||||
<li>Multiple joysticks or gamepads (if you download and install PPJoy)</li>
|
||||
<li>Multiple MIDI devices (if you download and install Midi Yoke or
|
||||
Hubi's loopback driver)</li>
|
||||
<li>Microphone input (in theory)</li>
|
||||
|
||||
</ul>
|
||||
<br>
|
||||
|
||||
<h2>You can get input from:</h2>
|
||||
|
||||
<ul>
|
||||
<li>multiple mice</li>
|
||||
<li>multiple keyboards</li>
|
||||
<li>multiple joysticks or gamepads</li>
|
||||
<li>Multiple Essential Reality P5 virtual reality gloves</li>
|
||||
<li>multiple MIDI devices</li>
|
||||
<li>a microphone</li>
|
||||
|
||||
</ul>
|
||||
<br>
|
||||
|
||||
<h2>Requirements:</h2>
|
||||
|
||||
<ul>
|
||||
<li>DirectX 8 or higher</li>
|
||||
<li>PPJoy if you want to use virtual joysticks</li>
|
||||
<li>Midi Yoke if you want to emulate MIDI
|
||||
input</li>
|
||||
<li>Windows 2000 or above if you want to emulate the keyboard</li>
|
||||
<li>SAPI 5.0 (Comes with Windows XP and Office XP) or SAPI 5.1 if you
|
||||
want speech synthesis and recognition</li>
|
||||
|
||||
</ul>
|
||||
I highly recommend buying an Essential Reality P5 virtual reality glove.
|
||||
They are very cheap. You can do wonderous
|
||||
things with a virtual reality glove and PIE! Actually you should buy two since
|
||||
they are cheap and you save on shipping if you buy both at once.<br>
|
||||
<br>
|
||||
|
||||
<h2>Installing:</h2>
|
||||
<br>
|
||||
Just extract the ZIP file into whatever folder you want. There is
|
||||
no installation program.<br>
|
||||
You will also need to download and install PPJoy and Midi Yoke if you
|
||||
want to use them. After you install PPJoy you need to create at least one
|
||||
virtual joystick.<br>
|
||||
You should associate .PIE files with GlovePIE in windows, so you can just click
|
||||
on PIE scripts and open them in GlovePIE.<br>
|
||||
<br>
|
||||
|
||||
<h2>Uninstalling:</h2>
|
||||
Just delete the folder you installed GlovePIE into.<br>
|
||||
You may also want to remove or change the association for .PIE files.<br>
|
||||
<br>
|
||||
|
||||
<h2>Running:</h2>
|
||||
You can start GlovePIE by double clicking on its icon in windows explorer,
|
||||
or by double clicking on a .PIE file if you have set up the associations.
|
||||
You can also start it from a command prompt (aka DOS window), or create
|
||||
a shortcut to it on your desktop, quick-launch bar, or start menu. <br>
|
||||
<br>
|
||||
By default, when PIE starts it displays an empty script window. You can
|
||||
write a new PIE script there, or you can load an existing file from the
|
||||
file menu. But it will not actually do anything until you choose "Run" from
|
||||
the "Run!" menu. Then it will check your script for errors and run it. If
|
||||
there are any errors it will just ignore those lines. When you have finished
|
||||
playing you can choose "Stop" from the "Run!" menu. PIE will not emulate
|
||||
anything unless it is running. Exiting PIE by closing its window will stop
|
||||
all emulation. You can also just check your program for errors without running
|
||||
it by choosing "Check for errors" from the "Run" menu. If there are any
|
||||
errors a box will pop up at the bottom of the window with a list of errors
|
||||
and line numbers. If nothing appears then there are no errors. You can tell
|
||||
when your script is running because the title bar at the top of the window
|
||||
will change.<br>
|
||||
<br>
|
||||
If you run PIE from the command prompt or a shortcut then you can specify
|
||||
command line parameters. You must use quotation marks around any parameter
|
||||
which includes a space.<br>
|
||||
|
||||
<table cellpadding="2" cellspacing="2" border="1" width="60%">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td valign="top"><i>filename.PIE</i><br>
|
||||
</td>
|
||||
<td valign="top">The name of a PIE script to open. You may or may
|
||||
not include the .PIE extension. The script will not do anything until you
|
||||
choose "Run" from the "Run!" menu.<br>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top">
|
||||
<pre>-<i>filename.PIE</i></pre>
|
||||
</td>
|
||||
<td valign="top">The name of a PIE script to open and run. You may
|
||||
or may not include the .PIE extension. It will start running automatically<br>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top">
|
||||
<pre>/r:<i>filename.EXE</i></pre>
|
||||
</td>
|
||||
<td valign="top">The name of a .EXE file or other program to start
|
||||
running automatically when PIE starts. This allows you to start the game
|
||||
and PIE at the same time.<br>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
<br>
|
||||
<br>
|
||||
|
||||
<h2>Menus:</h2>
|
||||
PIE has the following menus:<br>
|
||||
<br>
|
||||
|
||||
<table cellpadding="2" cellspacing="2" border="1" width="100%">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td valign="top">File<br>
|
||||
</td>
|
||||
<td valign="top"><br>
|
||||
</td>
|
||||
<td valign="top">Standard file menu. Except the only way to save
|
||||
files is by choosing "Save As..."<br>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top">File<br>
|
||||
</td>
|
||||
<td valign="top">New<br>
|
||||
</td>
|
||||
<td valign="top">Clears the script window. You will lose your work
|
||||
if you haven't saved it.<br>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top">File<br>
|
||||
</td>
|
||||
<td valign="top">Open...<br>
|
||||
</td>
|
||||
<td valign="top">Load a PIE script file. This will not start it
|
||||
running until you choose "Run" from the "Run!" menu. <br>
|
||||
You will lose your work if you haven't saved it.<br>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top">File<br>
|
||||
</td>
|
||||
<td valign="top">Save As...<br>
|
||||
</td>
|
||||
<td valign="top">The only way to save a file. If you don't use this
|
||||
you will lose your work! <br>
|
||||
You need to choose the filename every time. Sorry.<br>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top">File<br>
|
||||
</td>
|
||||
<td valign="top">Exit<br>
|
||||
</td>
|
||||
<td valign="top">Quit PIE and stop emulating anything. Please save
|
||||
your work before you choose this. <br>
|
||||
It will NOT ask you whether you want to save.<br>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top">Edit<br>
|
||||
</td>
|
||||
<td valign="top"><br>
|
||||
</td>
|
||||
<td valign="top">Standard edit commands<br>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top">Run!<br>
|
||||
</td>
|
||||
<td valign="top"><br>
|
||||
</td>
|
||||
<td valign="top">The Run menu is for running and checking your script.
|
||||
It won't emulate anything unless it is running.<br>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top">Run!<br>
|
||||
</td>
|
||||
<td valign="top">Check for errors<br>
|
||||
</td>
|
||||
<td valign="top">Check the script for errors. This was called "Compile"
|
||||
in the previous version. <br>
|
||||
Only use this while your program is not running.<br>
|
||||
A box will pop up at the bottom of the window if there are any errors.
|
||||
Errors will also be highlighted in red.<br>
|
||||
You can single-click on an error in the box to go to that line.<br>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top">Run!<br>
|
||||
</td>
|
||||
<td valign="top">Run<br>
|
||||
</td>
|
||||
<td valign="top">Start your script going. This starts the actual
|
||||
emulation process. <br>
|
||||
Basically it will just loop through your script about 40 times per second.<br>
|
||||
If there are any errors they will be highlighted and included in the error
|
||||
box, but the script will still run and just ignore those lines.<br>
|
||||
The script will keep running until you chose "Stop" from the "Run!" menu,
|
||||
or try to close the PIE window.<br>
|
||||
While running, your script may move the cursor around or press keys which
|
||||
may do bad things to the PIE window if it is in the foreground.<br>
|
||||
I recommend starting notepad and placing it in the foreground while you
|
||||
are running a script that presses keys.<br>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top">Run!<br>
|
||||
</td>
|
||||
<td valign="top">Stop<br>
|
||||
</td>
|
||||
<td valign="top">Stops your script running. You should do this before
|
||||
you check for errors or run your program again. <br>
|
||||
You don't need to do this before closing the window, that will stop it
|
||||
automatically.<br>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top">Settings<br>
|
||||
</td>
|
||||
<td valign="top"><br>
|
||||
</td>
|
||||
<td valign="top">Turns the P5 gloves' mouse mode off, or brings
|
||||
up Control Panel applets for the various input devices PIE uses.<br>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top">Settings<br>
|
||||
</td>
|
||||
<td valign="top">Turn P5 Mouse Mode Off<br>
|
||||
</td>
|
||||
<td valign="top">If you have any P5 virtual reality gloves connected,
|
||||
this will switch off mouse mode for all of them. <br>
|
||||
Don't do this while your script is running or the P5 will no longer work
|
||||
with it.<br>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top">Settings<br>
|
||||
</td>
|
||||
<td valign="top">Control Panel<br>
|
||||
</td>
|
||||
<td valign="top">Starts control panel<br>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top">Settings<br>
|
||||
</td>
|
||||
<td valign="top">P5<br>
|
||||
</td>
|
||||
<td valign="top">This will bring up the P5 control panel (for your
|
||||
virtual reality glove) if it is installed.<br>
|
||||
You can calibrate or test your bend sensors, change the mouse mode settings,
|
||||
or test the buttons.<br>
|
||||
This is the original Essential Reality version that only supports a single
|
||||
glove. If you want to calibrate or change the settings for multiple gloves,
|
||||
you should download the Dual Mode Driver and use its VBControlPanel instead.<br>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top">Settings<br>
|
||||
</td>
|
||||
<td valign="top">PPJoy<br>
|
||||
</td>
|
||||
<td valign="top">Brings up the PPJoy control panel, if PPJoy is
|
||||
installed. This allows you to add virtual joysticks or set the number of
|
||||
buttons, axes and hats the virtual joystick has. You can also chose which
|
||||
axes or hats correspond to analog0 to analog15, and what buttons or hats
|
||||
correspond to digital0 to digital31.<br>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top">Settings<br>
|
||||
</td>
|
||||
<td valign="top">Joystick<br>
|
||||
</td>
|
||||
<td valign="top">Brings up the Game Controllers or Joystick control
|
||||
panel. It allows you to test your virtual joystick. I don't recommend calibrating
|
||||
virtual joysticks.<br>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top">Settings<br>
|
||||
</td>
|
||||
<td valign="top">Mouse<br>
|
||||
</td>
|
||||
<td valign="top">Brings up the mouse control panel.<br>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top">Settings<br>
|
||||
</td>
|
||||
<td valign="top">Keyboard<br>
|
||||
</td>
|
||||
<td valign="top">Brings up the keyboard control panel.<br>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top">Settings<br>
|
||||
</td>
|
||||
<td valign="top">MIDI<br>
|
||||
</td>
|
||||
<td valign="top">Brings up the closest thing to a MIDI control panel.
|
||||
This should allow you to chose which MIDI device you want to use as the default
|
||||
output.<br>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top">Settings<br>
|
||||
</td>
|
||||
<td valign="top">Speech<br>
|
||||
</td>
|
||||
<td valign="top">Tries to bring up the Speech control panel to change
|
||||
the default text to speech voice. This may not work if the SAPI is not installed
|
||||
in the default directory.<br>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top">TroubleShooter<br>
|
||||
</td>
|
||||
<td valign="top"><br>
|
||||
</td>
|
||||
<td valign="top">This menu allows you to disable features that you
|
||||
don't think are working or are giving you errors. The settings are not saved
|
||||
between sessions. <br>
|
||||
It was designed for an error some people got with the joystick, but those
|
||||
error messages no longer appear so it is unnecessary.<br>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top">Help<br>
|
||||
</td>
|
||||
<td valign="top"><br>
|
||||
</td>
|
||||
<td valign="top">Get help on PIE.<br>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
<br>
|
||||
<br>
|
||||
|
||||
<h2>Scripting Tutorial:</h2>
|
||||
|
||||
<h3>Tutorial 1 - easy stuff</h3>
|
||||
Lets make a pie script to simulate pressing the W, A, S and D keys when
|
||||
you press the arrow keys.<br>
|
||||
This will not work on Windows 98.<br>
|
||||
<br>
|
||||
Start up PIE.<br>
|
||||
Choose the "File" Menu, then click "New". This will clear whatever was
|
||||
in the big white box so you can type your own script.<br>
|
||||
We want the W key to be controlled by the up key so type this on one line
|
||||
then press Enter:<br>
|
||||
<br>
|
||||
W = Up<br>
|
||||
<br>
|
||||
This is a working PIE Script so you can test it by choosing the "Run!"
|
||||
menu and clicking "Run". <br>
|
||||
<br>
|
||||
Whenever you press the up arrow key (on the cursor pad, not the numeric
|
||||
keypad) it will type a "w". Try it out! This will work in any program.<br>
|
||||
Note that it will still move the cursor up. The Up arrow key still has
|
||||
its original function, but it emulates a w at the same time. Try holding
|
||||
down shift and pressing Up. It will type a capital W, unless capslock is
|
||||
on. Unlike the real "W" key, holding down the Up arrow will only type a single
|
||||
"w".<br>
|
||||
<br>
|
||||
Now chose the "Run!" menu and click "Stop". This will return our keyboard
|
||||
to normal.<br>
|
||||
<br>
|
||||
Now do the other keys like this:<br>
|
||||
<br>
|
||||
A = Left<br>
|
||||
S = Down<br>
|
||||
D = Right<br>
|
||||
<br>
|
||||
(Don't worry if the S is orange, that is because S is also an abbreviation
|
||||
for seconds).<br>
|
||||
<br>
|
||||
Save your script as Tutorial1.PIE by chosing the "File" menu then "Save
|
||||
As...".<br>
|
||||
And run it again. Stop it when you have finished playing.<br>
|
||||
<br>
|
||||
You can change it to use any keys you want. You can even use keys that
|
||||
don't exist on your keyboard, like the MediaPlay key which is on some multimedia
|
||||
keyboards. If you don't know what a key is called, just guess. It is not
|
||||
fussy about the key names. You could have written this and it would still
|
||||
work:<br>
|
||||
<br>
|
||||
W = UpArrow<br>
|
||||
A = CursorLeft<br>
|
||||
<br>
|
||||
If you want to make it clear that it is a key on the keyboard, you can
|
||||
type this:<br>
|
||||
<br>
|
||||
key.W = key.Up<br>
|
||||
<br>
|
||||
(When you type the dot it will pop up with a list of keys. If you can't
|
||||
get out of this, click somewhere in the PIE window. Then press Control +
|
||||
Space and the list will pop up again, but this time it should work. If not,
|
||||
choose the "Troubleshooter" menu and click "Disable Code Completion")<br>
|
||||
<br>
|
||||
or this:<br>
|
||||
<br>
|
||||
keyboard.W = keyboard.Up<br>
|
||||
<br>
|
||||
or even this:<br>
|
||||
<br>
|
||||
keyboard's W = UpArrow of Keyboard<br>
|
||||
<br>
|
||||
<br>
|
||||
|
||||
<h3>Tutorial 2 - emulating a joystick</h3>
|
||||
This time we will control a virtual joystick using the keyboard.<br>
|
||||
This will only work if you have downloaded and installed PPJoy.<br>
|
||||
<br>
|
||||
This is not really much harder to do in PIE than the keyboard, but we
|
||||
have know how to use PPJoy and the joystick control panel first. So please
|
||||
be patient.<br>
|
||||
<br>
|
||||
Start PIE.<br>
|
||||
Click File/New.<br>
|
||||
<br>
|
||||
But before we write our script, we need to make sure PPJoy is set up correctly.<br>
|
||||
Chose the "Settings" menu and click "PPJoy".<br>
|
||||
If PPJoy is installed it should pop up with a window titled "PPJoy
|
||||
Joystick and Gamepad Configuration Utility".<br>
|
||||
There is a big white list box in the middle of the window with the heading
|
||||
"Configured joysticks". One of the items in the list needs to be "Virtual
|
||||
Joystick 1".<br>
|
||||
<br>
|
||||
If Virtual Joystick 1 is not there, or the box is empty then you need
|
||||
to do the following:<br>
|
||||
|
||||
<ul>
|
||||
<li>click the "Add..." button.</li>
|
||||
<li>Where it says "Parallel port" choose "Virtual port"</li>
|
||||
<li>Where it says "Controller number" choose "Controller 1"</li>
|
||||
<li>Click the "Add" button</li>
|
||||
<li>Now wait and go through the hardware setup dialog boxes that pop
|
||||
up</li>
|
||||
<li>Choose the default options in any dialog boxes</li>
|
||||
<li>Be patient, it needs to find and install several drivers</li>
|
||||
|
||||
</ul>
|
||||
Regardless of whether it was there before, or you just added it, you should
|
||||
have a "Virtual Joystick 1" in the list box. Select it and choose "Mapping".
|
||||
It will pop up with the dialog box saying "Welcome to the Joystick/Pad mapping
|
||||
wizard". If it doesn't work then you probably weren't patient enough in the
|
||||
previous step. Choose "Set a custom mapping for this controller" (which should
|
||||
already be selected) and click "Next >". Now you can choose how
|
||||
many axes, buttons and hats the virtual joystick should have, and which axes
|
||||
they are. Leave the default settings and click "Next >". Now you can choose
|
||||
which analog inputs control which axes. You will notice that analog0 controls
|
||||
the x axis (horizontal), and analog1 controls the y axis (vertical). These
|
||||
are good defaults so click "Next >". Now you can choose which digital
|
||||
inputs should control which buttons. Notice digital 0 controls joystick button
|
||||
1, and digital 1 controls joystick button 2. These are also good defaults
|
||||
so choose next. Now you can choose which analog or digital inputs control
|
||||
the imaginary hats on the top of the joystick. One will be controlled by
|
||||
digitals 16-19 and the other will be controlled by analog 8. These are good
|
||||
defaults too, so click Next and then Finish.<br>
|
||||
<br>
|
||||
Click "Done" in the PPJoy control panel and go back to PIE.<br>
|
||||
<br>
|
||||
We can test the virtual joystick we just made by choosing the "Settings"
|
||||
menu and chosing "Joystick". This will open up the joystick control panel.
|
||||
Choose PPJoy Virtual Joystick 1 and click "Properties". Now it will pop up
|
||||
with another dialog box, choose the "Test" tab. This displays all the axes
|
||||
and buttons on the virtual joystick. They should all be in the middle.<br>
|
||||
<br>
|
||||
Now lets make a PIE script to control the virtual joystick. Assuming your
|
||||
screen resolution is 1024 by 768, Type the following:<br>
|
||||
<br>
|
||||
ppjoy.analog0 = (mouse.cursorposx - 512) / 512<br>
|
||||
<br>
|
||||
Remember how analog 0 was the x axis in the mapping before? Well it was.
|
||||
<br>
|
||||
<br>
|
||||
The above line sets the analog 0 value for virtual joystick 1 to a number
|
||||
between -1 and 1 depending on the location of the mouse cursor on the screen.<br>
|
||||
<br>
|
||||
Now run your script by choosing Run/Run on the menu. Go back to the Joystick
|
||||
control panel's test tab and see how the horizontal position of the cross
|
||||
in the box is controlled by the mouse.<br>
|
||||
<br>
|
||||
Now let's do the same for the y axis (384 is half the screen height):<br>
|
||||
<br>
|
||||
ppjoy.analog1 = (mouse.cursorposy - 384) / 384<br>
|
||||
<br>
|
||||
This works because PIE uses joystick values between -1 and 1. The cursor
|
||||
position is in pixels from 0 to 767. Subtracting 384 gives a value between
|
||||
-384 and 383. Dividing by 384 gives a value between -1 and (almost) 1.<br>
|
||||
<br>
|
||||
There is an easier way to do the exact same above calculations in PIE:<br>
|
||||
<br>
|
||||
ppjoy.analog0 = MapRange(mouse.cursorposx, 0,1023, -1,1)<br>
|
||||
ppjoy.analog1 = MapRange(mouse.cursorposy, 0,767, -1,1)<br>
|
||||
<br>
|
||||
Now let's do the buttons:<br>
|
||||
<br>
|
||||
ppjoy.digital0 = mouse.LeftButton<br>
|
||||
ppjoy.digital1 = mouse.RightButton<br>
|
||||
ppjoy.digital2 = mouse.MiddleButton<br>
|
||||
ppjoy.digital3 = mouse.XButton1<br>
|
||||
ppjoy.digital4 = mouse.XButton2<br>
|
||||
<br>
|
||||
Now run your script and test it in the joystick control panel or a game.
|
||||
You should be able to control the joystick with the mouse.<br>
|
||||
<br>
|
||||
If you wanted to control virtual joystick 2, you would just change ppjoy
|
||||
to ppjoy2.<br>
|
||||
eg. ppjoy2.digital0 = mouse.LeftButton<br>
|
||||
<br>
|
||||
<br>
|
||||
|
||||
</body>
|
||||
</html>
|
BIN
bin/External_Software/Glovepie/PPT.dll
Normal file
BIN
bin/External_Software/Glovepie/RPPM3Csafe.dll
Normal file
BIN
bin/External_Software/Glovepie/RPPM3DDI.dll
Normal file
BIN
bin/External_Software/Glovepie/RPPM3USB.dll
Normal file
|
@ -0,0 +1,21 @@
|
|||
// Lego Indiana Jones, SIXAXIS, by Carl Kenner
|
||||
WASD = sixaxis1.LeftStick + sixaxis1.DPad
|
||||
Enter = sixaxis1.Start
|
||||
Esc = sixaxis1.Select
|
||||
U = sixaxis1.cross
|
||||
H = sixaxis1.square or sixaxis1.Stabbing
|
||||
J = sixaxis1.circle or sixaxis1.SwingVertical
|
||||
K = sixaxis1.triangle
|
||||
Space = sixaxis1.R1
|
||||
LCtrl = sixaxis1.L1
|
||||
|
||||
ArrowKeys = sixaxis2.LeftStick + sixaxis2.DPad
|
||||
NumpadEnter = sixaxis2.Start
|
||||
F2 = sixaxis2.Select
|
||||
Numpad5 = sixaxis2.cross
|
||||
Numpad1 = sixaxis2.square or sixaxis2.Stabbing
|
||||
Numpad2 = sixaxis2.circle or sixaxis2.SwingVertical
|
||||
Numpad3 = sixaxis2.triangle
|
||||
NumPad0 = sixaxis2.R1
|
||||
RCtrl = sixaxis2.L1
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
if said("stop") then
|
||||
var.speed = [0, 0]
|
||||
end if
|
||||
|
||||
if said("slow") then
|
||||
var.speed = var.speed / 2
|
||||
end if
|
||||
|
||||
if said("fast") then
|
||||
var.speed = var.speed * 2
|
||||
end if
|
||||
|
||||
if said("left") then
|
||||
var.speed = [-3, 0]
|
||||
end if
|
||||
|
||||
if said("right") then
|
||||
var.speed = [3, 0]
|
||||
end if
|
||||
|
||||
if said("up") then
|
||||
var.speed = [0, -2]
|
||||
end if
|
||||
|
||||
if said("down") then
|
||||
var.speed = [0, 2]
|
||||
end if
|
||||
|
||||
mouse.DirectInput2D += var.speed
|
|
@ -0,0 +1,25 @@
|
|||
// Lego Indiana Jones, Wiimote+Nunchuk, by Carl Kenner
|
||||
WASD = nunchuk1.Joy + Wiimote1.DPad
|
||||
Enter = Wiimote1.Plus
|
||||
Esc = Wiimote1.Minus
|
||||
U = Wiimote1.A
|
||||
H = Wiimote1.B or Wiimote1.Stabbing or Nunchuk1.Stabbing
|
||||
J = Nunchuk1.Z or Wiimote1.SwingVertical
|
||||
K = nunchuk1.C
|
||||
Space = Wiimote1.One
|
||||
LCtrl = Wiimote1.Two
|
||||
|
||||
H = (Nunchuk1.Shake) and (not Nunchuk1.Z)
|
||||
|
||||
ArrowKeys = nunchuk2.Joy + Wiimote2.DPad
|
||||
NumpadEnter = Wiimote2.Plus
|
||||
F2 = Wiimote2.Minus
|
||||
Numpad5 = Wiimote2.A
|
||||
Numpad1 = Wiimote2.B or Wiimote2.Stabbing or Nunchuk2.Stabbing
|
||||
Numpad2 = nunchuk2.Z or Wiimote2.SwingVertical
|
||||
Numpad3 = nunchuk2.C
|
||||
NumPad0 = Wiimote2.One
|
||||
RCtrl = Wiimote2.Two
|
||||
|
||||
Numpad1 = (Nunchuk2.Shake) and (not Nunchuk2.Z)
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
var.ButtonFreezeTime = 250ms
|
||||
var.PointerBump = KeepDown(Pressed(wiimote.A),var.ButtonFreezeTime) or KeepDown(Pressed(wiimote.B),var.ButtonFreezeTime)
|
||||
Wiimote.Led1 = true
|
||||
|
||||
var.MoveButton = wiimote.B
|
||||
mouse.LeftButton = wiimote.A
|
||||
mouse.RightButton = wiimote.Plus
|
||||
mouse.MiddleButton = wiimote.Down
|
||||
|
||||
if wiimote.PointerVisible but not var.PointerBump then
|
||||
mouse.x = wiimote.PointerX
|
||||
mouse.y = wiimote.PointerY
|
||||
end if
|
|
@ -0,0 +1,66 @@
|
|||
/*
|
||||
WiiMotion Plus Mouse v 2010.01.14
|
||||
by lednerg
|
||||
|
||||
Emulates the basic functionality of a Gyration Air Mouse.
|
||||
Requires GlovePIE version .42 or higher.
|
||||
|
||||
Leave the Wiimote on your desk when starting so it can calibrate.
|
||||
Hold B to move, A = Left-Click, + = Right-Click, Down = Middle-Click.
|
||||
*/
|
||||
|
||||
var.MoveButton = wiimote.B
|
||||
mouse.LeftButton = wiimote.A
|
||||
mouse.RightButton = wiimote.Plus
|
||||
mouse.MiddleButton = wiimote.Down
|
||||
|
||||
var.Speed = 75 // 0 to 100
|
||||
|
||||
PIE.FrameRate = 120hz
|
||||
if wiimote.HasMotionPlus = false then debug = "WiiMotion Plus NOT DETECTED!"
|
||||
if wiimote.HasMotionPlus = true and var.MoveButton = true {
|
||||
var.YawSpeed = wiimote.MotionPlus.YawSpeed
|
||||
var.PitchSpeed = wiimote.MotionPlus.PitchSpeed
|
||||
if SameValue( Smooth(wiimote.SmoothRoll, 10), wiimote.SmoothRoll, 10) then var.Roll = Smooth(wiimote.SmoothRoll, 10) else var.Roll = wiimote.SmoothRoll
|
||||
if var.Roll < 0 and var.Roll >= -90 {
|
||||
var.XYswap = 1 - EnsureMapRange(var.Roll, -90, 0, 0, 1)
|
||||
var.RightDown = -1
|
||||
var.TopUp = 1
|
||||
}
|
||||
if var.Roll <= 90 and var.Roll >= 0 {
|
||||
var.XYswap = 1 - EnsureMapRange(var.Roll, 90, 0, 0, 1)
|
||||
var.RightDown = 1
|
||||
var.TopUp = 1
|
||||
}
|
||||
if var.Roll > 90 and var.Roll <= 180 {
|
||||
var.XYswap = 1 - EnsureMapRange(var.Roll, 90, 180, 0, 1)
|
||||
var.RightDown = 1
|
||||
var.TopUp = -1
|
||||
}
|
||||
if var.Roll < -90 and var.Roll >= -180 {
|
||||
var.XYswap = 1 - EnsureMapRange(var.Roll, -90, -180, 0, 1)
|
||||
var.RightDown = -1
|
||||
var.TopUp = -1
|
||||
}
|
||||
var.SpeedX = var.TopUp * var.YawSpeed - ( var.TopUp * var.YawSpeed * var.XYswap ) + ( var.RightDown * var.PitchSpeed * var.XYswap )
|
||||
var.SpeedY = var.TopUp * var.PitchSpeed - ( var.TopUp * var.PitchSpeed * var.XYswap) + ( -var.RightDown * var.YawSpeed * var.XYswap )
|
||||
mouse.DirectInputX = int(var.MouseX)
|
||||
mouse.DirectInputY = int(var.MouseY)
|
||||
var.MouseX = var.MouseX + ( var.SpeedX / (10500000 - EnsureMapRange(var.Speed, 0, 100, 0, 10000000) ) )
|
||||
var.MouseY = var.MouseY - ( var.SpeedY / (10500000 - EnsureMapRange(var.Speed, 0, 100, 0, 10000000) ) )
|
||||
/* // for mouse.x and mouse.y instead
|
||||
mouse.x = var.MouseX
|
||||
mouse.y = var.MouseY
|
||||
var.MouseX = var.MouseX + ( var.SpeedX / (20500 - EnsureMapRange(var.Speed, 0, 100, 0, 20000) ) )
|
||||
var.MouseY = var.MouseY - ( var.SpeedY / (20500 - EnsureMapRange(var.Speed, 0, 100, 0, 20000) ) )
|
||||
*/
|
||||
}
|
||||
if var.MoveButton = false {
|
||||
var.MouseX = mouse.DirectInputX
|
||||
var.MouseY = mouse.DirectInputY
|
||||
/* // for mouse.x and mouse.y instead
|
||||
var.MouseX = mouse.x
|
||||
var.MouseY = mouse.y
|
||||
*/
|
||||
}
|
||||
|
8267
bin/External_Software/Glovepie/documentation.rtf
Normal file
BIN
bin/External_Software/Glovepie/edk.dll
Normal file
BIN
bin/External_Software/Glovepie/edk_utils.dll
Normal file
BIN
bin/External_Software/Glovepie/fglove.dll
Normal file
BIN
bin/External_Software/Glovepie/p5dll.dll
Normal file
67
bin/External_Software/Glovepie/pielog.txt
Normal file
|
@ -0,0 +1,67 @@
|
|||
(0, 07-mai-2020 11:32:54) Initializing PieLog
|
||||
(0, 07-mai-2020 11:32:54) Initializing filemode variable
|
||||
(0, 07-mai-2020 11:32:54) Initializing PieSpeech
|
||||
(0, 07-mai-2020 11:32:54) Initializing PieVariables
|
||||
(0, 07-mai-2020 11:32:54) Initializing PieCursorUnit
|
||||
(0, 07-mai-2020 11:32:54) Initializing PieMouse
|
||||
(0, 07-mai-2020 11:32:54) Initializing PieKeyboard
|
||||
(0, 07-mai-2020 11:32:54) Initializing PieInput
|
||||
(0, 07-mai-2020 11:32:54) Initializing PieOSC
|
||||
(0, 07-mai-2020 11:32:54) Initializing PiePie
|
||||
(0, 07-mai-2020 11:32:54) Initializing PieFunction
|
||||
(0, 07-mai-2020 11:32:54) Initializing PieStatement
|
||||
(0, 07-mai-2020 11:32:54) Initializing PieExpression
|
||||
(0, 07-mai-2020 11:32:54) Initializing PieJoystick
|
||||
(0, 07-mai-2020 11:32:54) Initializing PieP5
|
||||
(0, 07-mai-2020 11:32:54) Initializing PieMidi
|
||||
(0, 07-mai-2020 11:32:54) Initializing PiePPJoy
|
||||
(0, 07-mai-2020 11:32:54) Initializing PieRemote
|
||||
(0, 07-mai-2020 11:32:54) Initializing Pie Speech Recognition
|
||||
(0, 07-mai-2020 11:32:54) Initializing PieScreen
|
||||
(0, 07-mai-2020 11:32:54) GetMonitorEDID
|
||||
(0, 07-mai-2020 11:32:54) Initializing PieWIndow
|
||||
(0, 07-mai-2020 11:32:54) Initializing PieCursors
|
||||
(0, 07-mai-2020 11:32:54) Initializing PieZ800
|
||||
(0, 07-mai-2020 11:32:54) Initializing PieIntersense
|
||||
(0, 07-mai-2020 11:32:54) Initializing PieFastrak
|
||||
(0, 07-mai-2020 11:32:54) Initializing PiePPT
|
||||
(0, 07-mai-2020 11:32:54) Initializing PieTrackIR
|
||||
(0, 07-mai-2020 11:32:54) Initializing PiePinch
|
||||
(0, 07-mai-2020 11:32:54) Starting main
|
||||
(0, 07-mai-2020 11:32:54) Application object initialized
|
||||
(0, 07-mai-2020 11:32:54) Creating main window
|
||||
(0, 07-mai-2020 11:32:54) EditorForm.Create
|
||||
(0, 07-mai-2020 11:32:54) Checking command line parameters:
|
||||
(0, 07-mai-2020 11:32:54) Creating debug window
|
||||
(0, 07-mai-2020 11:32:54) Assigning exception handler
|
||||
(0, 07-mai-2020 11:32:54) Creating debug remote control window
|
||||
(0, 07-mai-2020 11:32:54) Running application
|
||||
(0, 07-mai-2020 11:32:57) FormCloseQuery
|
||||
(0, 07-mai-2020 11:32:57) Compile>Stop
|
||||
(0, 07-mai-2020 11:32:57) Application finished
|
||||
(0, 07-mai-2020 11:32:57) Destroying EditorForm
|
||||
(0, 07-mai-2020 11:32:57) Finalizing PiePinch
|
||||
(0, 07-mai-2020 11:32:57) Finalizing PieTrackIR
|
||||
(0, 07-mai-2020 11:32:57) Finalizing PiePPT
|
||||
(0, 07-mai-2020 11:32:57) Finalizing PieFastrak
|
||||
(0, 07-mai-2020 11:32:57) Finalizing PieIntersense
|
||||
(0, 07-mai-2020 11:32:57) Finalizing PieZ800
|
||||
(0, 07-mai-2020 11:32:57) Finalizing PieCursors
|
||||
(0, 07-mai-2020 11:32:57) Finalizing PieWindow
|
||||
(0, 07-mai-2020 11:32:57) Finalizing PieScreen
|
||||
(0, 07-mai-2020 11:32:57) Finalizing Pie Speech Recognition
|
||||
(0, 07-mai-2020 11:32:57) Finalizing PieRemote
|
||||
(0, 07-mai-2020 11:32:57) Finalizing PiePPJoy
|
||||
(0, 07-mai-2020 11:32:57) Finalizing PieMidi
|
||||
(0, 07-mai-2020 11:32:57) Finalizing PieP5
|
||||
(0, 07-mai-2020 11:32:57) Finalizing PieJoystick
|
||||
(0, 07-mai-2020 11:32:57) Finalizing PieStatement
|
||||
(0, 07-mai-2020 11:32:57) Finalizing PieFunction
|
||||
(0, 07-mai-2020 11:32:57) Finalizing PiePie
|
||||
(0, 07-mai-2020 11:32:57) Finalizing PieOSC
|
||||
(0, 07-mai-2020 11:32:57) Finalizing PieKeyboard
|
||||
(0, 07-mai-2020 11:32:57) Finalizing PieMouse
|
||||
(0, 07-mai-2020 11:32:57) Finalizing PieVariables
|
||||
(0, 07-mai-2020 11:32:57) Finalizing PieSpeech
|
||||
(0, 07-mai-2020 11:32:57) Finalizing PieLog
|
||||
(0, 07-mai-2020 11:32:57) Closing log file
|
1933
bin/External_Software/Glovepie/readme.txt
Normal file
BIN
bin/External_Software/Glovepie/thinkgear.dll
Normal file
BIN
bin/External_Software/TGsetup.exe
Normal file
Before Width: | Height: | Size: 56 KiB After Width: | Height: | Size: 61 KiB |
Before Width: | Height: | Size: 64 KiB |
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 63 KiB |
|
@ -40,7 +40,7 @@ public class Fenetre extends JFrame implements ActionListener{
|
|||
private JButton boutonfininstall;
|
||||
private CardLayout cl;
|
||||
private FlowLayout fl;
|
||||
String[] listContent = {"CARD_1","CARD_2","CARD_3","CARD_4","CARD_5","CARD_6","CARD_7"};
|
||||
String[] listContent = {"CARD_1","CARD_2","CARD_3","CARD_4","CARD_5","CARD_6","CARD_7","CARD_8"};
|
||||
|
||||
public int Indice = 0;
|
||||
public Graphics g ;
|
||||
|
@ -84,6 +84,7 @@ public class Fenetre extends JFrame implements ActionListener{
|
|||
carte card5 = new carte (5,1);
|
||||
carte card6 = new carte (6,1);
|
||||
carte card7 = new carte (7,1);
|
||||
carte card8 = new carte(8,1);
|
||||
|
||||
|
||||
|
||||
|
@ -110,6 +111,7 @@ public class Fenetre extends JFrame implements ActionListener{
|
|||
conteneur.add(card5,listContent[4]);
|
||||
conteneur.add(card6,listContent[5]);
|
||||
conteneur.add(card7,listContent[6]);
|
||||
conteneur.add(card8,listContent[7]);
|
||||
|
||||
|
||||
|
||||
|
@ -139,7 +141,7 @@ public class Fenetre extends JFrame implements ActionListener{
|
|||
|
||||
boutonfininstall.addActionListener(new ActionListener() {
|
||||
public void actionPerformed(ActionEvent event) {
|
||||
cl.show(conteneur,"CARD_7");
|
||||
cl.show(conteneur,"CARD_8");
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -1,12 +1,16 @@
|
|||
package Application1;
|
||||
|
||||
import java.awt.AWTException;
|
||||
import java.awt.Color;
|
||||
import java.awt.Desktop;
|
||||
import java.awt.FlowLayout;
|
||||
import java.awt.Graphics;
|
||||
import java.awt.GridLayout;
|
||||
import java.awt.Image;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
import java.awt.event.InputEvent;
|
||||
import java.awt.event.KeyEvent;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
@ -14,24 +18,45 @@ import java.util.concurrent.TimeUnit;
|
|||
import javax.imageio.ImageIO;
|
||||
import javax.swing.BorderFactory;
|
||||
import javax.swing.JButton;
|
||||
import javax.swing.JFileChooser;
|
||||
import javax.swing.JLabel;
|
||||
import javax.swing.JPanel;
|
||||
import javax.swing.JTextArea;
|
||||
import javax.swing.border.Border;
|
||||
import javax.swing.border.EtchedBorder;
|
||||
|
||||
import java.awt.Robot;
|
||||
|
||||
public class carte extends JPanel{
|
||||
private int numero;
|
||||
private Color couleur; // Background Color
|
||||
|
||||
private int type;
|
||||
private int type;
|
||||
protected static String pathTrinus;
|
||||
protected static String pathRevit;
|
||||
|
||||
|
||||
private String getPath () {
|
||||
String path = ".";
|
||||
int result = -99;
|
||||
JFileChooser fileChooser = new JFileChooser();
|
||||
|
||||
result = fileChooser.showOpenDialog(this);
|
||||
if(result == JFileChooser.APPROVE_OPTION)
|
||||
{
|
||||
path = fileChooser.getSelectedFile().getAbsolutePath();
|
||||
}
|
||||
|
||||
|
||||
|
||||
System.out.println(path);
|
||||
return path;
|
||||
|
||||
}
|
||||
|
||||
|
||||
// type:= 1 => Installation
|
||||
// type:= 2 => Fonctionnement
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public carte (int i, int t) {
|
||||
|
||||
numero = i;
|
||||
|
@ -39,12 +64,14 @@ public class carte extends JPanel{
|
|||
type = t;
|
||||
int taille = 15; //taille police
|
||||
|
||||
|
||||
Border border = BorderFactory.createEtchedBorder(EtchedBorder.RAISED);
|
||||
Border blackline = BorderFactory.createLineBorder(Color.black);
|
||||
Border compound;
|
||||
compound = BorderFactory.createCompoundBorder(border, blackline);
|
||||
JButton boutontest = new JButton("Test");
|
||||
|
||||
|
||||
if (i==2) {
|
||||
|
||||
|
||||
|
@ -316,9 +343,10 @@ public class carte extends JPanel{
|
|||
//Cadran 1
|
||||
|
||||
cadran1.setLayout(cad1);
|
||||
cadran1.setBorder(compound);
|
||||
|
||||
cadran1_1 = new TextPanel(taille);
|
||||
cadran1_1.setBorder(compound);
|
||||
|
||||
cadran1_1.AjouterParagraph(" \n");
|
||||
cadran1_1.AjouterParagraph(" Maintenant nous devons installer la manette Wiimote.");;
|
||||
cadran1_1.AjouterParagraph("Pour ça nous allons l'ajouter en tant que périphérique bluetooth."
|
||||
|
@ -350,12 +378,95 @@ public class carte extends JPanel{
|
|||
add(cadran3);
|
||||
add(cadran4);
|
||||
|
||||
|
||||
BoutonInstallation.addActionListener(new ActionListener() {
|
||||
public void actionPerformed(ActionEvent event) {
|
||||
//Lancement du panneau de configuration
|
||||
|
||||
Runtime rt = Runtime.getRuntime();
|
||||
try {
|
||||
rt.exec(new String[] {"cmd.exe","/c","start","control"});
|
||||
|
||||
}catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
else if (i==7) {
|
||||
//Installation
|
||||
TextPanel cadran1;
|
||||
TextPanel cadran2;
|
||||
JPanel cadran3;
|
||||
JPanel cadran4;
|
||||
JButton BoutonVarEnvTrinus;
|
||||
JButton BoutonVarEnvRevit;
|
||||
|
||||
GridLayout grid = new GridLayout(2,2);
|
||||
grid.setHgap(10);
|
||||
grid.setVgap(10);
|
||||
setLayout(grid);
|
||||
|
||||
|
||||
//Cadran 1
|
||||
cadran1 = new TextPanel(taille);
|
||||
cadran1.AjouterParagraph("Veuillez indiquer ou vous avez installé le logiciel Trinus. ");
|
||||
cadran1.AjouterParagraph("Vous pouvez selectionner directement le fichier de lancement présent sur votre bureau.");
|
||||
cadran1.AjouterParagraph("Ou alors donner le chemin du logiciel dans la racine. Typiquement le logiciel s'installe dans le dossier \"Program Files\"");
|
||||
cadran1.setEditable(false);
|
||||
cadran1.setBorder(compound);
|
||||
// Cadran 2
|
||||
cadran2 = new TextPanel(taille);
|
||||
cadran2.AjouterParagraph("Veuillez indiquer ou vous avez installé le logiciel de CAD. De préferance Revit, puisque notre système est optimisé pour l'utilisation de Revit. ");
|
||||
cadran2.AjouterParagraph("Vous pouvez selectionner directement le fichier de lancement présent sur votre bureau.");
|
||||
cadran2.AjouterParagraph("Ou alors donner le chemin du logiciel dans la racine. Typiquement le logiciel s'installe dans le dossier \"Program Files\"");
|
||||
cadran2.setEditable(false);
|
||||
cadran2.setBorder(compound);
|
||||
|
||||
//Cadran 3
|
||||
cadran3 = new JPanel();
|
||||
BoutonVarEnvTrinus = new JButton("Indiquer où se trouve le logiciel Trinus");
|
||||
cadran3.add(BoutonVarEnvTrinus);
|
||||
|
||||
//Cadran 4
|
||||
cadran4 = new JPanel();
|
||||
BoutonVarEnvRevit = new JButton("Indiquer où se trouve le logiciel de CAD");
|
||||
cadran4.add(BoutonVarEnvRevit);
|
||||
|
||||
|
||||
|
||||
//Ajout des cadran
|
||||
add(cadran1);
|
||||
add(cadran2);
|
||||
add(cadran3);
|
||||
add(cadran4);
|
||||
|
||||
BoutonVarEnvTrinus.addActionListener(new ActionListener() {
|
||||
public void actionPerformed(ActionEvent event) {
|
||||
carte.pathTrinus = getPath();
|
||||
System.out.println(pathTrinus);
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
BoutonVarEnvRevit.addActionListener(new ActionListener() {
|
||||
public void actionPerformed(ActionEvent event) {
|
||||
carte.pathRevit = getPath();
|
||||
System.out.println(pathRevit);
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
}
|
||||
else if (i==8) {
|
||||
//Initialitsation
|
||||
TextPanel cadran1;
|
||||
JPanel cadran2;
|
||||
|
@ -397,14 +508,20 @@ public class carte extends JPanel{
|
|||
BoutonGlovePie.addActionListener(new ActionListener() {
|
||||
public void actionPerformed(ActionEvent event) {
|
||||
//Lancement du panneau de configuration
|
||||
|
||||
Runtime rt = Runtime.getRuntime();
|
||||
try {
|
||||
rt.exec(new String[] {"cmd.exe","/c","start","control"});
|
||||
File file = new File("External_Software/Glovepie/WiimoteScripts/WiimoteScript.PIE");
|
||||
java.awt.Desktop desktop = Desktop.getDesktop();
|
||||
|
||||
try {
|
||||
|
||||
desktop.open(file);
|
||||
|
||||
}catch (IOException e) {
|
||||
|
||||
|
||||
|
||||
} catch (IOException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -414,18 +531,20 @@ public class carte extends JPanel{
|
|||
BoutonTrinus.addActionListener(new ActionListener() {
|
||||
public void actionPerformed(ActionEvent event) {
|
||||
//Lancement du panneau de configuration
|
||||
System.out.println(pathTrinus);
|
||||
|
||||
Runtime rt = Runtime.getRuntime();
|
||||
try {
|
||||
rt.exec(new String[] {"cmd.exe","/c","start","control"});
|
||||
|
||||
}catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
File file = new File(pathTrinus);
|
||||
java.awt.Desktop desktop = Desktop.getDesktop();
|
||||
|
||||
try {
|
||||
|
||||
desktop.open(file);
|
||||
|
||||
} catch (IOException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -433,17 +552,20 @@ public class carte extends JPanel{
|
|||
public void actionPerformed(ActionEvent event) {
|
||||
//Lancement du panneau de configuration
|
||||
|
||||
Runtime rt = Runtime.getRuntime();
|
||||
try {
|
||||
rt.exec(new String[] {"cmd.exe","/c","start","control"});
|
||||
|
||||
File file = new File(pathRevit);
|
||||
java.awt.Desktop desktop = Desktop.getDesktop();
|
||||
|
||||
try {
|
||||
|
||||
desktop.open(file);
|
||||
|
||||
}catch (IOException e) {
|
||||
} catch (IOException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
});
|
||||
BoutonInternet.addActionListener(new ActionListener() {
|
||||
|
@ -495,6 +617,7 @@ public class carte extends JPanel{
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|