mirror of
https://github.com/overte-org/overte.git
synced 2025-04-08 05:52:38 +02:00
Enable Inspection Mode for all; change Commerce setting name
This commit is contained in:
parent
81be62b6f7
commit
57b5a23373
6 changed files with 7 additions and 20 deletions
|
@ -38,11 +38,6 @@ ContextOverlayInterface::ContextOverlayInterface() {
|
|||
_entityPropertyFlags += PROP_DIMENSIONS;
|
||||
_entityPropertyFlags += PROP_REGISTRATION_POINT;
|
||||
|
||||
// initially, set _enabled to match the switch. Later we enable/disable via the getter/setters
|
||||
// if we are in edit or pal (for instance). Note this is temporary, as we expect to enable this all
|
||||
// the time after getting edge highlighting, etc...
|
||||
_enabled = _settingSwitch.get();
|
||||
|
||||
auto entityTreeRenderer = DependencyManager::get<EntityTreeRenderer>().data();
|
||||
connect(entityTreeRenderer, SIGNAL(mousePressOnEntity(const EntityItemID&, const PointerEvent&)), this, SLOT(createOrDestroyContextOverlay(const EntityItemID&, const PointerEvent&)));
|
||||
connect(entityTreeRenderer, SIGNAL(hoverEnterEntity(const EntityItemID&, const PointerEvent&)), this, SLOT(contextOverlays_hoverEnterEntity(const EntityItemID&, const PointerEvent&)));
|
||||
|
@ -81,13 +76,7 @@ static const float CONTEXT_OVERLAY_UNHOVERED_COLORPULSE = 1.0f;
|
|||
static const float CONTEXT_OVERLAY_FAR_OFFSET = 0.1f;
|
||||
|
||||
void ContextOverlayInterface::setEnabled(bool enabled) {
|
||||
// only enable/disable if the setting in 'on'. If it is 'off',
|
||||
// make sure _enabled is always false.
|
||||
if (_settingSwitch.get()) {
|
||||
_enabled = enabled;
|
||||
} else {
|
||||
_enabled = false;
|
||||
}
|
||||
_enabled = enabled;
|
||||
}
|
||||
|
||||
bool ContextOverlayInterface::createOrDestroyContextOverlay(const EntityItemID& entityItemID, const PointerEvent& event) {
|
||||
|
|
|
@ -76,8 +76,6 @@ private:
|
|||
|
||||
bool _isInMarketplaceInspectionMode { false };
|
||||
|
||||
Setting::Handle<bool> _settingSwitch { "inspectionMode", false };
|
||||
|
||||
void openMarketplace();
|
||||
void enableEntityHighlight(const EntityItemID& entityItemID);
|
||||
void disableEntityHighlight(const EntityItemID& entityItemID);
|
||||
|
|
|
@ -61,7 +61,7 @@ void RequestFilters::interceptHFWebEngineRequest(QWebEngineUrlRequestInfo& info)
|
|||
|
||||
// During the period in which we have HFC commerce in the system, but not applied everywhere:
|
||||
const QString tokenStringCommerce{ "Chrome/48.0 (HighFidelityInterface WithHFC)" };
|
||||
static Setting::Handle<bool> _settingSwitch{ "inspectionMode", false };
|
||||
static Setting::Handle<bool> _settingSwitch{ "commerce", false };
|
||||
bool isMoney = _settingSwitch.get();
|
||||
|
||||
const QString tokenString = !isAuthable ? tokenStringMobile : (isMoney ? tokenStringCommerce : tokenStringMetaverse);
|
||||
|
|
|
@ -131,7 +131,7 @@
|
|||
var button;
|
||||
var buttonName = "WALLET";
|
||||
var tablet = null;
|
||||
var walletEnabled = Settings.getValue("inspectionMode", false);
|
||||
var walletEnabled = Settings.getValue("commerce", false);
|
||||
function startup() {
|
||||
if (walletEnabled) {
|
||||
tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
|
||||
|
|
|
@ -450,7 +450,7 @@
|
|||
var parsedJsonMessage = JSON.parse(message);
|
||||
|
||||
if (parsedJsonMessage.type === "marketplaces") {
|
||||
if (parsedJsonMessage.action === "inspectionModeSetting") {
|
||||
if (parsedJsonMessage.action === "commerceSetting") {
|
||||
confirmAllPurchases = !!parsedJsonMessage.data;
|
||||
injectCode();
|
||||
}
|
||||
|
@ -458,7 +458,7 @@
|
|||
}
|
||||
});
|
||||
|
||||
// Request inspection mode setting
|
||||
// Request commerce setting
|
||||
// Code is injected into the webpage after the setting comes back.
|
||||
EventBridge.emitWebEvent(JSON.stringify({
|
||||
type: "REQUEST_SETTING"
|
||||
|
|
|
@ -138,8 +138,8 @@
|
|||
} else if (parsedJsonMessage.type === "REQUEST_SETTING") {
|
||||
tablet.emitScriptEvent(JSON.stringify({
|
||||
type: "marketplaces",
|
||||
action: "inspectionModeSetting",
|
||||
data: Settings.getValue("inspectionMode", false)
|
||||
action: "commerceSetting",
|
||||
data: Settings.getValue("commerce", false)
|
||||
}));
|
||||
} else if (parsedJsonMessage.type === "PURCHASES") {
|
||||
tablet.pushOntoStack(MARKETPLACE_PURCHASES_QML_PATH);
|
||||
|
|
Loading…
Reference in a new issue