mirror of
https://github.com/DrBeef/ioq3quest.git
synced 2024-11-10 06:41:58 +00:00
Merge pull request #19 from lvonasek/master
Soft keyboard support added
This commit is contained in:
commit
0e0e9db07b
7 changed files with 26 additions and 6 deletions
2
Makefile
2
Makefile
|
@ -2668,7 +2668,7 @@ Q3UIVMOBJ = $(Q3UIOBJ_:%.o=%.asm)
|
||||||
|
|
||||||
$(B)/$(BASEGAME)/ui$(SHLIBNAME): $(Q3UIOBJ)
|
$(B)/$(BASEGAME)/ui$(SHLIBNAME): $(Q3UIOBJ)
|
||||||
$(echo_cmd) "LD $@"
|
$(echo_cmd) "LD $@"
|
||||||
$(Q)$(CC) $(CFLAGS) $(SHLIBLDFLAGS) -o $@ $(Q3UIOBJ)
|
$(Q)$(CC) $(CFLAGS) $(SHLIBLDFLAGS) -o $@ $(Q3UIOBJ) $(CLIENT_LIBS)
|
||||||
|
|
||||||
$(B)/$(BASEGAME)/vm/ui.qvm: $(Q3UIVMOBJ) $(UIDIR)/ui_syscalls.asm $(Q3ASM)
|
$(B)/$(BASEGAME)/vm/ui.qvm: $(Q3UIVMOBJ) $(UIDIR)/ui_syscalls.asm $(Q3ASM)
|
||||||
$(echo_cmd) "Q3ASM $@"
|
$(echo_cmd) "Q3ASM $@"
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
android:versionCode="34"
|
android:versionCode="34"
|
||||||
android:versionName="0.23.0">
|
android:versionName="0.23.0">
|
||||||
<uses-feature android:name="android.hardware.vr.headtracking" android:version="1" android:required="true" />
|
<uses-feature android:name="android.hardware.vr.headtracking" android:version="1" android:required="true" />
|
||||||
|
<uses-feature android:name="oculus.software.overlay_keyboard" android:required="false"/>
|
||||||
<uses-feature android:glEsVersion="0x00030001" />
|
<uses-feature android:glEsVersion="0x00030001" />
|
||||||
<!-- <uses-feature android:name="oculus.software.overlay_keyboard" android:required="false"/>-->
|
<!-- <uses-feature android:name="oculus.software.overlay_keyboard" android:required="false"/>-->
|
||||||
|
|
||||||
|
|
|
@ -26,6 +26,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
Quake's menu framework system.
|
Quake's menu framework system.
|
||||||
**********************************************************************/
|
**********************************************************************/
|
||||||
#include "ui_local.h"
|
#include "ui_local.h"
|
||||||
|
#include "SDL.h"
|
||||||
|
|
||||||
sfxHandle_t menu_in_sound;
|
sfxHandle_t menu_in_sound;
|
||||||
sfxHandle_t menu_move_sound;
|
sfxHandle_t menu_move_sound;
|
||||||
|
@ -1653,6 +1654,18 @@ sfxHandle_t Menu_DefaultKey( menuframework_s *m, int key )
|
||||||
|
|
||||||
case MTYPE_FIELD:
|
case MTYPE_FIELD:
|
||||||
sound = MenuField_Key( (menufield_s*)item, &key );
|
sound = MenuField_Key( (menufield_s*)item, &key );
|
||||||
|
|
||||||
|
#if __ANDROID__
|
||||||
|
//show virtual keyboard
|
||||||
|
menufield_s* m = (menufield_s*)item;
|
||||||
|
if ( key == 178 )
|
||||||
|
{
|
||||||
|
//delete value on click
|
||||||
|
sprintf( m->field.buffer, "" );
|
||||||
|
}
|
||||||
|
m->field.cursor = strlen( m->field.buffer );
|
||||||
|
SDL_StartTextInput();
|
||||||
|
#endif
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1246,8 +1246,6 @@ void IN_Init( void *windowData )
|
||||||
in_joystick = Cvar_Get( "in_joystick", "0", CVAR_ARCHIVE|CVAR_LATCH );
|
in_joystick = Cvar_Get( "in_joystick", "0", CVAR_ARCHIVE|CVAR_LATCH );
|
||||||
in_joystickThreshold = Cvar_Get( "joy_threshold", "0.15", CVAR_ARCHIVE );
|
in_joystickThreshold = Cvar_Get( "joy_threshold", "0.15", CVAR_ARCHIVE );
|
||||||
|
|
||||||
SDL_StartTextInput( );
|
|
||||||
|
|
||||||
mouseAvailable = ( in_mouse->value != 0 );
|
mouseAvailable = ( in_mouse->value != 0 );
|
||||||
IN_DeactivateMouse( Cvar_VariableIntegerValue( "r_fullscreen" ) != 0 );
|
IN_DeactivateMouse( Cvar_VariableIntegerValue( "r_fullscreen" ) != 0 );
|
||||||
|
|
||||||
|
|
|
@ -452,7 +452,11 @@ static void IN_VRController( qboolean isRightController, ovrTracking remoteTrack
|
||||||
cl.snap.ps.pm_type == PM_INTERMISSION)
|
cl.snap.ps.pm_type == PM_INTERMISSION)
|
||||||
{
|
{
|
||||||
int mouse_multiplier = 10;
|
int mouse_multiplier = 10;
|
||||||
Com_QueueEvent(in_vrEventTime, SE_MOUSE, vr.weaponangles_delta[YAW] * mouse_multiplier, -vr.weaponangles_delta[PITCH] * mouse_multiplier, 0, NULL);
|
//ignore cursor jumping when e.g. showing keyboard
|
||||||
|
if ( ( fabs(vr.weaponangles_delta[ YAW ]) < 10 ) && ( fabs(vr.weaponangles_delta[ PITCH ]) < 10 ) )
|
||||||
|
{
|
||||||
|
Com_QueueEvent(in_vrEventTime, SE_MOUSE, vr.weaponangles_delta[YAW] * mouse_multiplier, -vr.weaponangles_delta[PITCH] * mouse_multiplier, 0, NULL);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
vec3_t rotation = {0};
|
vec3_t rotation = {0};
|
||||||
|
|
|
@ -84,7 +84,8 @@ int main(int argc, char* argv[]) {
|
||||||
VR_EnterVR(engine, java);
|
VR_EnterVR(engine, java);
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
SDL_Event event;
|
//Polling events here breaks sdl_input keyboard!
|
||||||
|
/*SDL_Event event;
|
||||||
while (SDL_PollEvent(&event)) {
|
while (SDL_PollEvent(&event)) {
|
||||||
LOGI("Received SDL Event: %d", event.type);
|
LOGI("Received SDL Event: %d", event.type);
|
||||||
switch (event.type)
|
switch (event.type)
|
||||||
|
@ -97,7 +98,7 @@ int main(int argc, char* argv[]) {
|
||||||
VR_LeaveVR(engine);
|
VR_LeaveVR(engine);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}*/
|
||||||
|
|
||||||
VR_DrawFrame(engine);
|
VR_DrawFrame(engine);
|
||||||
}
|
}
|
||||||
|
|
|
@ -264,6 +264,9 @@ public class SDLActivity extends Activity {
|
||||||
if (SDLActivity.mBrokenLibraries) {
|
if (SDLActivity.mBrokenLibraries) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (mScreenKeyboardShown) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
SDLActivity.mHasFocus = hasFocus;
|
SDLActivity.mHasFocus = hasFocus;
|
||||||
if (hasFocus) {
|
if (hasFocus) {
|
||||||
|
|
Loading…
Reference in a new issue