Started workign on kill mobs property

This commit is contained in:
Malcolm Roberts 2024-02-07 10:02:33 -06:00
parent fde5095f11
commit 558e3d9668
18 changed files with 1102 additions and 101 deletions

16
.vscode/settings.json vendored Normal file
View File

@ -0,0 +1,16 @@
{
"cSpell.words": [
"combobox",
"comboboxselection",
"CONTEXTITEMDATA",
"imagebox",
"itemview",
"listbox",
"listboxitem",
"scrollviewer",
"stackpanel",
"Tahoma",
"textblock",
"textbox"
]
}

View File

@ -0,0 +1,138 @@
#include "${LavishScript.HomeDirectory}/scripts/mr/common/file_helpers.iss"
objectdef KillMobsPropertiesController
{
variable jsonvalue PropertyEditorUi ="{}"
variable jsonvalue ListViewUi ="{}"
variable jsonvalue PathToRun = "[]"
variable string StepType = "kill_mobs"
variable string PropertyPath
variable int KillQuantity
variable string CurrentTarget
member:jsonvalueref GetUI()
{
return PropertyEditorUi
}
member:float GetDistanceFromLastPoint()
{
if ${PathToRun.Used} == 0
{
return 0
}
variable jsonvalueref lastPoint = PathToRun.Get[${PathToRun.Used}]
return ${Math.Distance["${Me.Loc.X}", "${Me.Loc.Y}", "${Me.Loc.Z}", "${lastPoint.Get["x"]}", "${lastPoint.Get["y"]}", "${lastPoint.Get["z"]}"]}
}
member:jsonvalueref GetDialogOptions()
{
variable jsonvalue dialogOptions
dialogOptions:SetValue[$$>"{
"type": "${This.StepType}",
"params": {
"path": ${This.PathToRun.AsJSON~}
}
}"<$$]
return dialogOptions
}
member:jsonvalueref GetDisplayForProperties(jsonvalueref step)
{
variable jsonvalue theUi
variable jsoniterator pathIterator
variable string currentPoint
theUi:SetValue["${This.ListViewUi.AsJSON~}"]
step.Get["params", "path"]:GetIterator[pathIterator]
if ${pathIterator:First(exists)}
{
do
{
currentPoint:Set["x: ${pathIterator.Value.Get["x"]} y: ${pathIterator.Value.Get["y"]} z: ${pathIterator.Value.Get["z"]}"]
theUi.Get["children", 2, "items"]:Add["${currentPoint.AsJSON~}"]
}
while ${pathIterator:Next(exists)}
}
return theUi
}
member:jsonvalueref QuestList()
{
variable jsonvalue questList
questList:SetValue[$$>"[
{
"id": 1,
"name": "Kill Mobs Test 1",
"level": 65,
"category": "Pillar of Flames",
"currentZone": "Pillar of Flames"
},
{
"id": 2,
"name": "Kill Mobs Test 2",
"level": 65,
"category": "Pillar of Flames",
"currentZone": "Pillar of Flames"
},
{
"id": 3,
"name": "Kill Mobs Test 3",
"level": 65,
"category": "Pillar of Flames",
"currentZone": "Pillar of Flames"
}
]<$$"]
return questList
}
method GetQuestItemView()
{
echo "GetQuestItemView: ${Context(type)} ${Context.Args}"
Context:SetView["$$>
{
"type": "itemview",
"content": {
"type": "textblock",
"text": "test"
}
}
<$$"]
}
method Initialize()
{
This.PropertyPath:Set["${FileHelpers.GetDirectoryFromFilePath["_FILE_"]}"]
PropertyEditorUi:ParseFile["${This.PropertyPath}/editor_ui.json"]
ListViewUi:ParseFile["${This.PropertyPath}/list_ui.json"]
}
method Shutdown()
{
}
method OnSetTargetNameButtonClick()
{
This.CurrentTarget:Set["${Me.Target.Name}"]
}
method OnAddPointClick()
{
PathToRun:Add[$$>"{
x: ${Me.Loc.X},
y: ${Me.Loc.Y},
z: ${Me.Loc.Z}
}"<$$]
}
}

View File

@ -0,0 +1,249 @@
{
"$schema": "http://www.lavishsoft.com/schema/lgui2Package.json",
"type": "stackpanel",
"name": "mr.quest_writer.run_path_properties",
"_dock": "bottom",
"borderBrush": {
"color": "#f4f3ee"
},
"templates": {
"property_header": {
"type": "panel",
"borderBrush": {
"color": "#f4f3ee"
},
"borderThickness": [0, 0, 0, 1],
"margin": [0, 0, 0, 15]
},
"property_group": {
"type": "stackpanel",
"orientation": "vertical",
"borderBrush": {
"color": "#f4f3ee"
},
"borderThickness": [1, 1, 1, 1],
"padding": [5, 5, 5, 5],
"margin": [5, 5, 5, 5]
},
"mr.quest_writer.run_path_properties.quest_item": {
"type": "itemview",
"content": {
"type": "stackpanel",
"children": [
{
"type": "textblock",
"text": "test"
}
]
}
}
},
"borderThickness": [0, 2, 0, 0],
"header": "test",
"children": [
{
"type": "panel",
"visibility": "hidden",
"name": "mr.quest_writer.run_path_properties.events.events"
},
{
"type": "panel",
"jsonTemplate": "property_header",
"children": [
{
"type": "textblock",
"text": "Kill Mobs Properties",
"font": {
"bold": true,
"heightFactor": 1.2
},
"horizontalAlignment": "center",
"widthFactor": 1
}
]
},
{
"type": "stackpanel",
"jsonTemplate": "property_group",
"children": [
{
"type": "textblock",
"text": "Target Name:",
"widthFactor": 1,
"horizontalAlignment": "left",
"margin": [0, 0, 0, 15],
"borderBrush": {
"color": "#f4f3ee"
},
"borderThickness": [0, 0, 0, 1],
"font": {
"heightFactor": 0.9
}
},
{
"type": "stackpanel",
"orientation": "horizontal",
"children": [
{
"type": "button",
"content": "◎",
"tooltip": "Set the name to the currently targeted mob.",
"horizontalAlignment": "left",
"eventHandlers": {
"onRelease": [
"method",
"MRKillMobsPropertiesController",
"OnSetTargetNameButtonClick"
]
}
},
{
"type": "textblock",
"horizontalAlignment": "left",
"widthFactor": 1,
"text": "${MRKillMobsPropertiesController.CurrentTarget}"
}
]
},
{
"type": "stackpanel",
"orientation": "horizontal",
"children": [
{
"type": "textblock",
"text": "Quantity:",
"widthFactor": 0.4,
"horizontalAlignment": "left",
"font": {
"heightFactor": 0.9
}
},
{
"type": "textblock",
"widthFactor": 0.6,
"horizontalAlignment": "left",
"textBinding": {
"pullFormat": "${MRKillMobsPropertiesController.KillQuantity}",
"pullReplaceNull": "0",
"pushFormat": [
"MRKillMobsPropertiesController.KillQuantity:Set[",
"]"
]
}
}
]
}
]
},
{
"type": "stackpanel",
"orientation": "vertical",
"jsonTemplate": "property_group",
"children": [
{
"type": "textblock",
"text": "Hunting Path",
"widthFactor": 1,
"horizontalAlignment": "left"
},
{
"type": "button",
"name": "mr.quest_writer.run_path_properties.add_point",
"content": "Add Point",
"tooltip": "Add a point.",
"horizontalAlignment": "stretch",
"eventHandlers": {
"onRelease": [
"method",
"MRRunPathPropertiesController",
"OnAddPointClick"
]
}
},
{
"type": "stackpanel",
"widthFactor": 1,
"children": [
{
"type": "textblock",
"text": "Distance From Last",
"horizontalAlignment": "left",
"widthFactor": 1
},
{
"type": "textblock",
"horizontalAlignment": "left",
"widthFactor": 1,
"textBinding": {
"pullFormat": "${MRRunPathPropertiesController.GetDistanceFromLastPoint}"
}
}
]
}
]
},
{
"type": "stackpanel",
"jsonTemplate": "property_group",
"children": [
{
"type": "textblock",
"text": "Kill Quest Step",
"tooltip": "This is the step we will check to see when this action is finished."
},
{
"type": "stackpanel",
"orientation": "horizontal",
"widthFactor": 1,
"children": [
{
"type": "combobox",
"widthFactor": 0.8,
"margin": [0, 0, 5, 0],
"itemViewGenerators": {
"default": {
"type": "template",
"template": "mr.quest_writer.run_path_properties.quest_item"
}
},
"itemsBinding": {
"pullFormat": "${MRKillMobsPropertiesController.QuestList}",
"pullReplaceNull": "",
"autoPull": "false",
"pushFormat": [
"MRKillMobsPropertiesController.SelectedQuest:Set[",
"]"
]
}
},
{
"type": "button",
"content": "⟳",
"tooltip": "Refresh the quest steps.",
"horizontalAlignment": "left",
"eventHandlers": {
"onRelease": [
"method",
"MRKillMobsPropertiesController",
"OnSetStepButtonClick"
]
}
}
]
},
{
"type": "combobox",
"itemsBinding": {
"pullFormat": "${MRKillMobsPropertiesController.QuestStepList}",
"pullReplaceNull": "",
"pushFormat": [
"MRKillMobsPropertiesController.SelectedStep:Set[",
"]"
]
}
}
]
}
]
}

View File

@ -0,0 +1,24 @@
{
"$schema": "http://www.lavishsoft.com/schema/lgui2Package.json",
"type": "stackpanel",
"orientation": "vertical",
"horizontalAlignment": "left",
"children": [
{
"type": "textblock",
"horizontalAlignment": "stretch",
"font": {
"bold": true,
"heightFactor": 1.1
},
"text": "Run Path"
},
{
"type": "listbox",
"horizontalAlignment": "stretch",
"borderThickness": 0,
"padding": [5, 0, 0, 0],
"items": []
}
]
}

View File

@ -3,10 +3,12 @@
#includeoptional "${LavishScript.HomeDirectory}/Scripts/mr/auto_quest/property_editors/npc_dialog_properties/editor.iss"
#includeoptional "${LavishScript.HomeDirectory}/Scripts/mr/auto_quest/property_editors/run_path_properties/editor.iss"
#includeoptional "${LavishScript.HomeDirectory}/Scripts/mr/auto_quest/property_editors/kill_mobs_properties/editor.iss"
variable(global) NPCDialogPropertiesController MRNPCDialogPropertiesController
variable(global) RunPathPropertiesController MRRunPathPropertiesController
variable(global) KillMobsPropertiesController MRKillMobsPropertiesController
objectdef PropertyEditors
{
@ -21,6 +23,10 @@ objectdef PropertyEditors
{
return MRRunPathPropertiesController;
}
if ${stepType.Equal["${MRKillMobsPropertiesController.StepType}"]}
{
return MRKillMobsPropertiesController;
}
return null;
}

View File

@ -44,7 +44,7 @@ objectdef QuestWriterController
listItem:SetValue[$$>"{
"type": "dockpanel",
"widthFactor": .18,
"widthFactor": .19,
"children": [
${stepItem.AsJSON~},
{

View File

@ -1,102 +1,9 @@
{
"$schema": "http://www.lavishsoft.com/schema/lgui2Package.json",
"skin": {
"name": "MRSkin",
"brushes": {
"window.titleBar.backgroundBrush": {
"color": "#211C18"
}
},
"templates": {
"window.title": {
"verticalAlignment": "center",
"margin": [2, 0, 0, 0]
},
"button": {
"jsonTemplate": "default:button",
"margin": [2, 2, 2, 2],
"color": "#f4f3ee"
},
"checkbox": {
"jsonTemplate": "default:checkbox",
"margin": [2, 2, 2, 2]
},
"window": {
"jsonTemplate": "default:window",
"backgroundBrush": {
"color": "#463f3a"
},
"color": "#f4f3ee",
"font": {
"face": "Segoe UI",
"height": 16
}
},
"listbox.contentContainer": {
"jsonTemplate": "scrollviewer",
"type": "scrollviewer",
"acceptsMouseFocus": false,
"contentContainer": {
"type": "border",
"horizontalContentAlignment": "stretch",
"verticalContentAlignment": "stretch"
}
},
"listbox.contentContainerFitWidth": {
"jsonTemplate": "listbox.contentContainer",
"horizontalScroll": "fit"
},
"listbox.content": {
"type": "stackpanel",
"uniform": true,
"backgroundBrush": "listbox.backgroundBrush"
},
"listbox": {
"defaultItemViewTemplate": "listboxitem",
"acceptsKeyboardFocus": true,
"padding": [ 1, 1, 1, 1 ],
"borderThickness": 1,
"borderBrush": "listbox.borderBrush",
"contentContainer": {
"jsonTemplate": "listbox.contentContainer"
},
"content": {
"jsonTemplate": "listbox.content"
}
},
"itemview": {
"type": "itemview",
"acceptsKeyboardFocus": false,
"contentContainer": {
"type": "border",
"horizontalContentAlignment": "stretch",
"verticalContentAlignment": "stretch"
},
"padding": [ 2, 2, 2, 2 ],
"margin": [ 1, 1, 1, 1 ],
"backgroundBrush": "itemview.backgroundBrush",
"eventHandlers": {
"onMouseButtonMove": {
"type": "forward",
"elementType": "itemlist",
"event": "onItemMouseButtonMove"
}
},
"styles": {
"onSelected": {
"backgroundBrush": "itemview.selectedBackgroundBrush"
},
"onDeselected": {
"backgroundBrush": "itemview.backgroundBrush"
}
}
}
}
},
"elements": [
{
"type": "window",
"skin": "MRSkin",
"skin": "mr.dark",
"title": "MR Quest Writer",
"name": "mr.quest_writer.window",
"borderThickness": 2,
@ -124,7 +31,7 @@
"type": "panel",
"visibility": "hidden",
"name": "MRQuestWriterController.events"
}
},
{
"type": "dockpanel",
"widthFactor": 0.2,
@ -254,9 +161,6 @@
"name": "mr.quest_writer.quest_steps",
"heightFactor": 1,
"widthFactor": 1,
"-contentContainer":{
"jsonTemplate":"listbox.contentContainerFitWidth"
},
"itemsBinding": {
"pullFormat": "${MRQuestWriterController.GetQuestStepsForDisplay}",
"autoPull": false,

View File

@ -0,0 +1,21 @@
#include "${LavishScript.HomeDirectory}/scripts/mr/common/file_helpers.iss"
objectdef AliasSettingsController
{
variable string BasePath
method Initialize()
{
BasePath = ${FileHelpers.GetDirectoryFromFilePath[_FILE_]}
LGUI2:LoadPackageFile["${BasePath}/ui.json"]
}
method Shutdown()
{
LGUI2:UnloadPackageFile["${BasePath}/ui.json"]
}
method OnClose()
{
Script:End
}
}

View File

6
mr.iss
View File

@ -6,7 +6,7 @@ function main(... params)
if ${command.Equal["init"]}
{
alias mr run mr
squelch alias mr run mr
if !${Script[Relay](exists)}
{
RunScript "${LavishScript.HomeDirectory}/Scripts/mr/common/Relay"
@ -16,6 +16,8 @@ function main(... params)
{
RunScript "${LavishScript.HomeDirectory}/Scripts/mr/common/Navigation/Movement"
}
LGUI2:LoadSkinFile["${LavishScript.HomeDirectory}/Scripts/mr/ui/mr.dark.skin.json"]
LGUI2:PushSkin["mr.dark"]
}
elseif ${command.Equal["osa"]}
{
@ -36,7 +38,7 @@ function main(... params)
}
elseif ${command.Equal["test"]}
{
run mr/test
run mr/test/test
}
}

268
test/mr.skin.json Normal file
View File

@ -0,0 +1,268 @@
{
"$schema": "http://www.lavishsoft.com/schema/lgui2Skin.json",
"type": "skin",
"name": "mr.dark",
"brushes": {
"background": {
"color": [0.15, 0.15, 0.15]
},
"controlBackground": {
"color": [0.3, 0.3, 0.3]
},
"selectedBackgroundBrush": {
"color": [0.5, 0.5, 0.5]
},
"titleBarBackground": {
"color": [0.1, 0.1, 0.1]
},
"text": {
"color": [0.9, 0.9, 0.9]
},
"border": {
"color": [0.5, 0.5, 0.5]
},
"titleBarCloseTexture": {
"color": [1.0, 1.0, 1.0],
"opacity": 0.7,
"imageFile": "${LavishScript.HomeDirectory}/Scripts/mr/ui/icons/close_button_3.png"
},
"titleBarMinimizeTexture": {
"color": [1.0, 1.0, 1.0],
"opacity": 0.7,
"imageFile": "${LavishScript.HomeDirectory}/Scripts/mr/ui/icons/minimize_button_3.png"
}
},
"templates": {
"window": {
"backgroundBrush": "background",
"titleBar": {
"jsonTemplate": "window.titleBar"
}
},
"window.titleBar": {
"backgroundBrush": "titleBarBackground",
"font": {
"face": "Tahoma",
"height": 16,
"bold": true
},
"children": [
{
"type": "button",
"jsonTemplate": "button",
"_dock": "right",
"borderThickness": 0,
"borderColor": [0],
"content": {
"type": "imagebox",
"margin": [0],
"width": 20,
"imageBrush": "titleBarCloseTexture"
},
"padding": 0,
"eventHandlers": {
"onMouse1Release": {
"type": "forward",
"elementType": "window",
"event": "onCloseButtonClick"
}
}
},
{
"type": "button",
"jsonTemplate": "button",
"_dock": "right",
"borderThickness": 0,
"borderColor": [0],
"content": {
"type": "imagebox",
"margin": [0],
"width": 20,
"imageBrush": "titleBarMinimizeTexture"
},
"padding": 0,
"eventHandlers": {
"onMouse1Release": {
"type": "forward",
"elementType": "window",
"event": "onShadeButtonClick"
}
}
}
]
},
"textblock": {
"color": "text",
"font": {
"face": "Tahoma",
"height": 14,
"bold": false
}
},
"button": {
"type": "button",
"backgroundBrush": "controlBackground",
"borderRounding": 0.3,
"color": "text",
"opacity": 0.8,
"styles": {
"gotMouseOver": {
"opacity": 1.0
},
"lostMouseOver": {
"opacity": 0.8
},
"onPress": {
"opacity": 0.8
},
"onRelease": {
"opacity": 1.0
}
}
},
"itemview": {
"type": "itemview",
"acceptsKeyboardFocus": false,
"contentContainer": {
"type": "border",
"horizontalContentAlignment": "stretch",
"verticalContentAlignment": "stretch"
},
"padding": [2, 2, 2, 2],
"margin": [1, 1, 1, 1],
"backgroundBrush": "controlBackground",
"styles": {
"onSelected": {
"backgroundBrush": "selectedBackgroundBrush"
},
"onDeselected": {
"backgroundBrush": "controlBackground"
}
}
},
"listboxitem.gotMouseOver": {
"font": {
"bold": true
},
"opacity": 1.0
},
"listboxitem.lostMouseOver": {
"font": {
"bold": false
},
"opacity": 0.8
},
"listboxitem": {
"jsonTemplate": "itemview",
"padding": [1, 125, 1, 125],
"styles": {
"gotMouseOver": {
"jsonTemplate": "listboxitem.gotMouseOver"
},
"lostMouseOver": {
"jsonTemplate": "listboxitem.lostMouseOver"
}
}
},
"listbox.contentContainer": {
"jsonTemplate": "scrollviewer",
"type": "scrollviewer",
"acceptsMouseFocus": false,
"contentContainer": {
"type": "border",
"horizontalContentAlignment": "stretch",
"verticalContentAlignment": "stretch"
}
},
"listbox.contentContainerFitWidth": {
"jsonTemplate": "listbox.contentContainer",
"horizontalScroll": "fit"
},
"listbox.content": {
"type": "stackpanel",
"uniform": true,
"backgroundBrush": "background"
},
"listbox": {
"defaultItemViewTemplate": "listboxitem",
"acceptsKeyboardFocus": true,
"borderThickness": 1,
"borderBrush": "border",
"contentContainer": {
"jsonTemplate": "listbox.contentContainer"
},
"content": {
"jsonTemplate": "listbox.content"
}
},
"comboboxselection": {
"jsonTemplate": "itemview",
"padding": [2, 2, 2, 2],
"margin": [1, 1, 1, 1],
"horizontalAlignment": "left",
"verticalAlignment": "center",
"eventHandlers": {}
},
"popup.panel": {
"type": "panel",
"borderBrush": "border",
"backgroundBrush": "controlBackground"
},
"popup": {
"type": "popup",
"strata": 1.1,
"acceptsMouseFocus": false,
"backgroundBrush": "controlBackground",
"contentContainer": {
"jsonTemplate": "popup.panel"
}
},
"combobox.popup.content": {
"jsonTemplate": "listbox",
"type": "listbox",
"borderThickness": 0
},
"combobox.popup": {
"type": "popup",
"jsonTemplate": "popup",
"backgroundBrush": "controlBackground",
"contentContainer": {
"jsonTemplate": "popup.panel",
"type": "anchor",
"anchorToElement": {
"elementType": "combobox",
"elementTree": "logical",
"flags": "ancestor"
},
"clipToParent": false,
"anchorLocationFactor": [0.0, 1.0]
},
"content": {
"jsonTemplate": "combobox.popup.content"
}
},
"combobox": {
"type": "combobox",
"backgroundBrush": "controlBackground",
"borderBrush": "border",
"borderRounding": 0.3,
"padding": [5, 3, 5, 3],
"acceptsKeyboardFocus": true,
"minSize": [40, 0],
"fitContentContainer": false,
"headerContainer": {
"type": "border",
"verticalAlignment": "center"
},
"selectedItemViewTemplate": "comboboxselection",
"popup": {
"jsonTemplate": "combobox.popup"
},
"contentContainer": {
"type": "panel"
}
}
}
}

33
test/test.iss Normal file
View File

@ -0,0 +1,33 @@
objectdef MRTestController
{
method Initialize()
{
LGUI2:LoadPackageFile["window.json"]
}
method Shutdown()
{
LGUI2:UnloadPackageFile["window.json"]
}
method OnClose()
{
Script:End
}
}
variable(global) MRTestController TestController
function main()
{
LGUI2:LoadSkinFile["${LavishScript.HomeDirectory}/Scripts/mr/ui/mr.dark.skin.json"]
LGUI2:PushSkin["mr.dark"]
while 1
{
wait 5
}
LGUI2:PopSkin
}

72
test/window.json Normal file
View File

@ -0,0 +1,72 @@
{
"$schema": "http://www.lavishsoft.com/schema/lgui2Package.json",
"elements": [
{
"type": "window",
"title": "Test",
"name": "mr.test.window",
"hideOnClose": false,
"minSize": {
"width": 650,
"height": 350
},
"maxSize": {
"width": 950,
"height": 650
},
"eventHandlers": {
"onCloseButtonClick": ["method", "TestController", "OnClose"]
},
"content": {
"type": "stackpanel",
"orientation": "horizontal",
"children": [
{
"type": "stackpanel",
"orientation": "vertical",
"margin": [0, 0, 15, 0],
"children": [
{
"type": "textblock",
"text": "Test Window",
"margin": [0, 0, 0, 15]
},
{
"type": "button",
"content": "Click me",
"margin": [0, 0, 0, 15]
},
{
"type": "combobox",
"minSize": {
"width": 100
},
"items": ["Item 1", "Item 2", "Item 3"],
"margin": [0, 0, 0, 15]
}
]
},
{
"type": "stackpanel",
"orientation": "vertical",
"children": [
{
"type": "listbox",
"minSize": {
"width": 100
},
"items": [
"Item 1111111111111111111111111111111111111111111111111111111111111111111111111111111",
"Item 2",
"Item 3"
]
}
]
}
]
}
}
]
}

BIN
ui/icons/close_button.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 506 KiB

BIN
ui/icons/close_button_2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 466 KiB

BIN
ui/icons/close_button_3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

268
ui/mr.dark.skin.json Normal file
View File

@ -0,0 +1,268 @@
{
"$schema": "http://www.lavishsoft.com/schema/lgui2Skin.json",
"type": "skin",
"name": "mr.dark",
"brushes": {
"background": {
"color": [0.15, 0.15, 0.15]
},
"controlBackground": {
"color": [0.3, 0.3, 0.3]
},
"selectedBackgroundBrush": {
"color": [0.5, 0.5, 0.5]
},
"titleBarBackground": {
"color": [0.1, 0.1, 0.1]
},
"text": {
"color": [0.9, 0.9, 0.9]
},
"border": {
"color": [0.5, 0.5, 0.5]
},
"titleBarCloseTexture": {
"color": [1.0, 1.0, 1.0],
"opacity": 0.7,
"imageFile": "${LavishScript.HomeDirectory}/Scripts/mr/ui/icons/close_button_3.png"
},
"titleBarMinimizeTexture": {
"color": [1.0, 1.0, 1.0],
"opacity": 0.7,
"imageFile": "${LavishScript.HomeDirectory}/Scripts/mr/ui/icons/minimize_button_3.png"
}
},
"templates": {
"window": {
"backgroundBrush": "background",
"titleBar": {
"jsonTemplate": "window.titleBar"
}
},
"window.titleBar": {
"backgroundBrush": "titleBarBackground",
"font": {
"face": "Tahoma",
"height": 16,
"bold": true
},
"children": [
{
"type": "button",
"jsonTemplate": "button",
"_dock": "right",
"borderThickness": 0,
"borderColor": [0],
"content": {
"type": "imagebox",
"margin": [0],
"width": 20,
"imageBrush": "titleBarCloseTexture"
},
"padding": 0,
"eventHandlers": {
"onMouse1Release": {
"type": "forward",
"elementType": "window",
"event": "onCloseButtonClick"
}
}
},
{
"type": "button",
"jsonTemplate": "button",
"_dock": "right",
"borderThickness": 0,
"borderColor": [0],
"content": {
"type": "imagebox",
"margin": [0],
"width": 20,
"imageBrush": "titleBarMinimizeTexture"
},
"padding": 0,
"eventHandlers": {
"onMouse1Release": {
"type": "forward",
"elementType": "window",
"event": "onShadeButtonClick"
}
}
}
]
},
"textblock": {
"color": "text",
"font": {
"face": "Tahoma",
"height": 14,
"bold": false
}
},
"button": {
"type": "button",
"backgroundBrush": "controlBackground",
"borderRounding": 0.3,
"color": "text",
"opacity": 0.8,
"styles": {
"gotMouseOver": {
"opacity": 1.0
},
"lostMouseOver": {
"opacity": 0.8
},
"onPress": {
"opacity": 0.8
},
"onRelease": {
"opacity": 1.0
}
}
},
"itemview": {
"type": "itemview",
"acceptsKeyboardFocus": false,
"contentContainer": {
"type": "border",
"horizontalContentAlignment": "stretch",
"verticalContentAlignment": "stretch"
},
"padding": [2, 2, 2, 2],
"margin": [1, 1, 1, 1],
"backgroundBrush": "controlBackground",
"styles": {
"onSelected": {
"backgroundBrush": "selectedBackgroundBrush"
},
"onDeselected": {
"backgroundBrush": "controlBackground"
}
}
},
"listboxitem.gotMouseOver": {
"font": {
"bold": true
},
"opacity": 1.0
},
"listboxitem.lostMouseOver": {
"font": {
"bold": false
},
"opacity": 0.8
},
"listboxitem": {
"jsonTemplate": "itemview",
"padding": [1, 5, 1, 5],
"styles": {
"gotMouseOver": {
"jsonTemplate": "listboxitem.gotMouseOver"
},
"lostMouseOver": {
"jsonTemplate": "listboxitem.lostMouseOver"
}
}
},
"listbox.contentContainer": {
"jsonTemplate": "scrollviewer",
"type": "scrollviewer",
"acceptsMouseFocus": false,
"contentContainer": {
"type": "border",
"horizontalContentAlignment": "stretch",
"verticalContentAlignment": "stretch"
}
},
"listbox.contentContainerFitWidth": {
"jsonTemplate": "listbox.contentContainer",
"horizontalScroll": "fit"
},
"listbox.content": {
"type": "stackpanel",
"uniform": true,
"backgroundBrush": "background"
},
"listbox": {
"defaultItemViewTemplate": "listboxitem",
"acceptsKeyboardFocus": true,
"borderThickness": 1,
"borderBrush": "border",
"contentContainer": {
"jsonTemplate": "listbox.contentContainer"
},
"content": {
"jsonTemplate": "listbox.content"
}
},
"comboboxselection": {
"jsonTemplate": "itemview",
"padding": [2, 2, 2, 2],
"margin": [1, 1, 1, 1],
"horizontalAlignment": "left",
"verticalAlignment": "center",
"eventHandlers": {}
},
"popup.panel": {
"type": "panel",
"borderBrush": "border",
"backgroundBrush": "controlBackground"
},
"popup": {
"type": "popup",
"strata": 1.1,
"acceptsMouseFocus": false,
"backgroundBrush": "controlBackground",
"contentContainer": {
"jsonTemplate": "popup.panel"
}
},
"combobox.popup.content": {
"jsonTemplate": "listbox",
"type": "listbox",
"borderThickness": 0
},
"combobox.popup": {
"type": "popup",
"jsonTemplate": "popup",
"backgroundBrush": "controlBackground",
"contentContainer": {
"jsonTemplate": "popup.panel",
"type": "anchor",
"anchorToElement": {
"elementType": "combobox",
"elementTree": "logical",
"flags": "ancestor"
},
"clipToParent": false,
"anchorLocationFactor": [0.0, 1.0]
},
"content": {
"jsonTemplate": "combobox.popup.content"
}
},
"combobox": {
"type": "combobox",
"backgroundBrush": "controlBackground",
"borderBrush": "border",
"borderRounding": 0.3,
"padding": [5, 3, 5, 3],
"acceptsKeyboardFocus": true,
"minSize": [40, 0],
"fitContentContainer": false,
"headerContainer": {
"type": "border",
"verticalAlignment": "center"
},
"selectedItemViewTemplate": "comboboxselection",
"popup": {
"jsonTemplate": "combobox.popup"
},
"contentContainer": {
"type": "panel"
}
}
}
}