overte/scripts/system/create/qml/EditTabView.qml
pull[bot] 2f359cc15f
[pull] master from overte-org:master (#93)
* mirrors wip

* fix view + projection, texture flipping, billboarding

* wip portals

* wip

* fix cpu frustum culling (hacky?)

* fix mirrors in deferred

* mirrors on models + text

* portals use exit as ignoreItem

* cleanup

* entity tags

* wild guess to handle view correction, hide portalExitID in create when mirrorMode != portal

* let's try this??

* plz

* promising

* fix paramsOffset and view flipping

* portals shouldn't flip

* break when tag found

* fix portal view calculation

* Revert "Mirrors + Portals"

* Revert "Revert "Mirrors + Portals""

* web entity wantsKeyboardFocus property

* fix typo

* move audio zones to zone entity properties

* fix audio zones in create

* set dynamic factory

* new procecural particle entity type

* fix particle intersection

* shorten create labels

* fix 0 update props case

* Ability to smooth model animations

* sound entities

* fix layered simulate items

* fix stereo sound speed

* support non-localOnly sound avatar entities

* add sound url prompt

* support registration point, improve locking

* remove keyboardRasied

* locking attempt #2

* fix keyboardRasied typo

* add default particle props

* add unlit property for shapes

* Merge branch master into protocol_changes

* add ambient light color

* fix create issue

* fix create issue

* add tonemapping props to zones, wip ambient occlusion

* wip ambient occlusion

* it's working!

* remove attachments

* fix non-localOnly positional sounds not updating

* change AO default to HBAO, remove from create

* more graphics options

* fix AO setting + effects in mirrors

* fix AA in mirrors

* alezia's fixes

* fix haze in mirrors

* add comment for SKYBOX_DISTANCE

* new line

* model loading priority updates over time, takes into account out of bounds, avatar entities have higher priority, and fsts can specify to wait for wearables to load before rendering

* add loadPriority to model entities, working on other avatars waitForWearables

* fix build error

* try to fix isServer assert

* fix stats + waitForWearables

* Listen for click instead of release.

* Reverted initial commit. Implemented hack to listen for menu click events.

* Missed some reverts.

* Missed another one.

* Prevent duplicate actions.

* Added extra needed checks.

* Fix without formatting? (#91)

* Hopefully fixed formatting.

* Things can't be too easy.

* Remove google poly

* automated entity property serialization

* cleanup + automate EntityPropertyFlags

* text vertical alignment, use uint8_t for entity property enums, fix text recalculating too often

* fix text size

* Update interface/resources/controllers/keyboardMouse.json

Co-authored-by: HifiExperiments <53453710+HifiExperiments@users.noreply.github.com>

* fix component mode serialization

* Fixed mouse look in selfie mode.

* fix text debug assert on invalid or unloaded font

* missed some enums

* fix ADD_GROUP_PROPERTY_TO_MAP

* fix PROP_GRAB_EQUIPPABLE_INDICATOR_URL missing urlPermission

* fix KeyLightPropertyGroup legacy properties

* fix PolyLineEntityItem::getEntityProperties

* comment cmake script

* fix copyright

* Replaced key value with key text.
Added additional comment about the specific delete key used.

* weekly promoted place

Highlight the first place in the list as the weekly promoted place

* Fixed lingering references to `avatarIcon`.

Signed-off-by: armored-dragon <publicmail@armoreddragon.com>

* Adding icon for "Grab And Equip" section

Adding icon for "Grab And Equip" section

* Add "Grab And Equip" section

Add "Grab And Equip" section for the grabbale and Equipable groups of properties.

* Add files via upload

* Add tooltips for the "Grab and Equip" properties

Add the tooltips for the "Grab and Equip" properties

* Text adjustments for grab.equippable

Text adjustments for grab.equippable

* Make Maturity Filter persisted

Make Maturity Filter persisted and with a default value (Teen & Everyone)

* Adjust the default value for maturity

Adjust the default value for maturity

* move "triggerable" under GRAB & EQUIP

move "triggerable" under GRAB & EQUIP

* Remove hifi-screenshare
Cherry picked and updated from Tivoli dd5b6ea6ee5597a06603e16509640e7ed18106bb

Co-authored-by: Julian Groß <julian.g@posteo.de>

* Insert placeholder to not break protocol yet.

* Fix incorrectly resolved merge conflict, left too much code.

* Fixes based on review comments on previous PR

* Remove code accidentally re-added during a conflict fix

* bump protocol

* rebuild fonts with full charset (NOT -allglyphs)

* Attempt at fixing Windows master branch builds

* Change minimum angular velocity to a lower one

* Fix Uuid.NULL behavior

---------

Signed-off-by: armored-dragon <publicmail@armoreddragon.com>
Co-authored-by: HifiExperiments <thingsandstuffblog@gmail.com>
Co-authored-by: ksuprynowicz <ksuprynowicz@post.pl>
Co-authored-by: Dale Glass <51060919+daleglass@users.noreply.github.com>
Co-authored-by: HifiExperiments <53453710+HifiExperiments@users.noreply.github.com>
Co-authored-by: Julian Groß <julian.g@posteo.de>
Co-authored-by: armored-dragon <publicmail@armoreddragon.com>
Co-authored-by: Armored-Dragon <github56254@armoreddragon.com>
Co-authored-by: Alezia Kurdis <60075796+AleziaKurdis@users.noreply.github.com>
Co-authored-by: Maki <mxmcube@gmail.com>
Co-authored-by: Dale Glass <dale@daleglass.net>
2024-10-24 06:32:53 +00:00

374 lines
14 KiB
QML

import QtQuick 2.7
import QtQuick.Controls 2.2
import QtWebChannel 1.0
import controls 1.0
import hifi.toolbars 1.0
import QtGraphicalEffects 1.0
import controlsUit 1.0 as HifiControls
import stylesUit 1.0
TabBar {
id: editTabView
width: parent.width
contentWidth: parent.width
padding: 0
spacing: 0
readonly property HifiConstants hifi: HifiConstants {}
EditTabButton {
title: "CREATE"
active: true
enabled: true
property string originalUrl: ""
property Component visualItem: Component {
Rectangle {
color: "#404040"
id: container
Flickable {
height: parent.height
width: parent.width
clip: true
contentHeight: createEntitiesFlow.height + importButton.height + assetServerButton.height +
header.anchors.topMargin + createEntitiesFlow.anchors.topMargin +
assetServerButton.anchors.topMargin + importButton.anchors.topMargin +
header.paintedHeight
contentWidth: width
ScrollBar.vertical : ScrollBar {
visible: parent.contentHeight > parent.height
width: 20
background: Rectangle {
color: hifi.colors.tableScrollBackgroundDark
}
}
Text {
id: header
color: "#ffffff"
text: "Choose an Entity Type to Create:"
font.pixelSize: 14
font.bold: true
anchors.top: parent.top
anchors.topMargin: 30
anchors.left: parent.left
anchors.leftMargin: 30
}
Flow {
id: createEntitiesFlow
spacing: 20
anchors.right: parent.right
anchors.rightMargin: 30
anchors.left: parent.left
anchors.leftMargin: 30
anchors.top: parent.top
anchors.topMargin: 70
NewEntityButton {
icon: "icons/94-model-01.svg"
text: "MODEL"
onClicked: {
editRoot.sendToScript({
method: "newEntityButtonClicked",
params: { buttonName: "newModelButton" }
});
editTabView.currentIndex = 2
}
}
NewEntityButton {
icon: "icons/21-cube-01.svg"
text: "SHAPE"
onClicked: {
editRoot.sendToScript({
method: "newEntityButtonClicked",
params: { buttonName: "newShapeButton" }
});
editTabView.currentIndex = 2
}
}
NewEntityButton {
icon: "icons/24-light-01.svg"
text: "LIGHT"
onClicked: {
editRoot.sendToScript({
method: "newEntityButtonClicked",
params: { buttonName: "newLightButton" }
});
editTabView.currentIndex = 2
}
}
NewEntityButton {
icon: "icons/20-text-01.svg"
text: "TEXT"
onClicked: {
editRoot.sendToScript({
method: "newEntityButtonClicked",
params: { buttonName: "newTextButton" }
});
editTabView.currentIndex = 2
}
}
NewEntityButton {
icon: "icons/image.svg"
text: "IMAGE"
onClicked: {
editRoot.sendToScript({
method: "newEntityButtonClicked",
params: { buttonName: "newImageButton" }
});
editTabView.currentIndex = 2
}
}
NewEntityButton {
icon: "icons/25-web-1-01.svg"
text: "WEB"
onClicked: {
editRoot.sendToScript({
method: "newEntityButtonClicked",
params: { buttonName: "newWebButton" }
});
editTabView.currentIndex = 2
}
}
NewEntityButton {
icon: "icons/23-zone-01.svg"
text: "ZONE"
onClicked: {
editRoot.sendToScript({
method: "newEntityButtonClicked",
params: { buttonName: "newZoneButton" }
});
editTabView.currentIndex = 2
}
}
NewEntityButton {
icon: "icons/90-particles-01.svg"
text: "PARTICLE"
onClicked: {
editRoot.sendToScript({
method: "newEntityButtonClicked",
params: { buttonName: "newParticleButton" }
});
editTabView.currentIndex = 2
}
}
NewEntityButton {
icon: "icons/126-material-01.svg"
text: "MATERIAL"
onClicked: {
editRoot.sendToScript({
method: "newEntityButtonClicked",
params: { buttonName: "newMaterialButton" }
});
editTabView.currentIndex = 2
}
}
NewEntityButton {
icon: "icons/voxels.svg"
text: "VOXELS"
onClicked: {
editRoot.sendToScript({
method: "newEntityButtonClicked",
params: { buttonName: "newPolyVoxButton" }
});
editTabView.currentIndex = 2
}
}
NewEntityButton {
icon: "icons/sound.svg"
text: "SOUND"
onClicked: {
editRoot.sendToScript({
method: "newEntityButtonClicked",
params: { buttonName: "newSoundButton" }
});
editTabView.currentIndex = 2
}
}
}
HifiControls.Button {
id: assetServerButton
text: "Open This Domain's Asset Server"
color: hifi.buttons.black
colorScheme: hifi.colorSchemes.dark
anchors.right: parent.right
anchors.rightMargin: 30
anchors.left: parent.left
anchors.leftMargin: 30
anchors.top: createEntitiesFlow.bottom
anchors.topMargin: 35
onClicked: {
editRoot.sendToScript({
method: "newEntityButtonClicked",
params: { buttonName: "openAssetBrowserButton" }
});
}
}
HifiControls.Button {
id: importButton
text: "Import Entities (.json) from a File"
color: hifi.buttons.black
colorScheme: hifi.colorSchemes.dark
anchors.right: parent.horizontalCenter
anchors.rightMargin: 10
anchors.left: parent.left
anchors.leftMargin: 30
anchors.top: assetServerButton.bottom
anchors.topMargin: 20
onClicked: {
editRoot.sendToScript({
method: "newEntityButtonClicked",
params: { buttonName: "importEntitiesButton" }
});
}
}
HifiControls.Button {
id: importButtonFromUrl
text: "Import Entities (.json) from a URL"
color: hifi.buttons.black
colorScheme: hifi.colorSchemes.dark
anchors.right: parent.right
anchors.rightMargin: 30
anchors.left: parent.horizontalCenter
anchors.leftMargin: 10
anchors.top: assetServerButton.bottom
anchors.topMargin: 20
onClicked: {
editRoot.sendToScript({
method: "newEntityButtonClicked",
params: { buttonName: "importEntitiesFromUrlButton" }
});
}
}
}
} // Flickable
}
}
EditTabButton {
title: "LIST"
active: true
enabled: true
property string originalUrl: ""
property Component visualItem: Component {
WebView {
id: entityListToolWebView
url: Qt.resolvedUrl("../entityList/html/entityList.html")
enabled: true
blurOnCtrlShift: false
}
}
}
EditTabButton {
title: "PROPERTIES"
active: true
enabled: true
property string originalUrl: ""
property Component visualItem: Component {
WebView {
id: entityPropertiesWebView
url: Qt.resolvedUrl("../entityProperties/html/entityProperties.html")
enabled: true
blurOnCtrlShift: false
}
}
}
EditTabButton {
title: "TOOLS"
active: true
enabled: true
property string originalUrl: ""
property Component visualItem: Component {
WebView {
id: gridControlsWebView
url: Qt.resolvedUrl("../../html/gridControls.html")
enabled: true
blurOnCtrlShift: false
}
}
}
EditTabButton {
title: "IMPORT"
active: true
enabled: true
property string originalUrl: ""
property Component visualItem: Component {
WebView {
id: advancedImportWebView
url: Qt.resolvedUrl("../importEntities/html/importEntities.html")
enabled: true
blurOnCtrlShift: false
}
}
}
function fromScript(message) {
switch (message.method) {
case 'selectTab':
selectTab(message.params.id);
break;
default:
console.warn('EditTabView.qml: Unrecognized message');
}
}
// Changes the current tab based on tab index or title as input
function selectTab(id) {
if (typeof id === 'number') {
if (id >= 0 && id <= 4) {
editTabView.currentIndex = id;
} else {
console.warn('Attempt to switch to invalid tab:', id);
}
} else if (typeof id === 'string'){
switch (id.toLowerCase()) {
case 'create':
editTabView.currentIndex = 0;
break;
case 'list':
editTabView.currentIndex = 1;
break;
case 'properties':
editTabView.currentIndex = 2;
break;
case 'grid':
editTabView.currentIndex = 3;
break;
case 'import':
editTabView.currentIndex = 4;
break;
default:
console.warn('Attempt to switch to invalid tab:', id);
}
} else {
console.warn('Attempt to switch tabs with invalid input:', JSON.stringify(id));
}
}
}