mirror of
https://github.com/lubosz/overte.git
synced 2025-04-07 09:22:42 +02:00
only raise the webEntity virtual keyboard in HMD mode
This commit is contained in:
parent
a54c3bf8c0
commit
9122a33fff
4 changed files with 12 additions and 2 deletions
|
@ -223,7 +223,7 @@ public:
|
|||
// the isHMDMode is true whenever we use the interface from an HMD and not a standard flat display
|
||||
// rendering of several elements depend on that
|
||||
// TODO: carry that information on the Camera as a setting
|
||||
bool isHMDMode() const;
|
||||
virtual bool isHMDMode() const override;
|
||||
glm::mat4 getHMDSensorPose() const;
|
||||
glm::mat4 getEyeOffset(int eye) const;
|
||||
glm::mat4 getEyeProjection(int eye) const;
|
||||
|
|
|
@ -396,5 +396,9 @@ void RenderableWebEntityItem::emitScriptEvent(const QVariant& message) {
|
|||
}
|
||||
|
||||
void RenderableWebEntityItem::setKeyboardRaised(bool raised) {
|
||||
_webSurface->getRootItem()->setProperty("keyboardRaised", QVariant(raised));
|
||||
|
||||
// raise the keyboard only while in HMD mode and it's being requested.
|
||||
bool value = AbstractViewStateInterface::instance()->isHMDMode() && raised;
|
||||
|
||||
_webSurface->getRootItem()->setProperty("keyboardRaised", QVariant(value));
|
||||
}
|
||||
|
|
|
@ -48,6 +48,8 @@ public:
|
|||
|
||||
virtual void pushPostUpdateLambda(void* key, std::function<void()> func) = 0;
|
||||
|
||||
virtual bool isHMDMode() const = 0;
|
||||
|
||||
// FIXME - we shouldn't assume that there's a single instance of an AbstractViewStateInterface
|
||||
static AbstractViewStateInterface* instance();
|
||||
static void setInstance(AbstractViewStateInterface* instance);
|
||||
|
|
|
@ -497,6 +497,10 @@ protected:
|
|||
_postUpdateLambdas[key] = func;
|
||||
}
|
||||
|
||||
bool isHMDMode() const override {
|
||||
return false;
|
||||
}
|
||||
|
||||
public:
|
||||
//"/-17.2049,-8.08629,-19.4153/0,0.881994,0,-0.47126"
|
||||
static void setup() {
|
||||
|
|
Loading…
Reference in a new issue