Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add controls.json to hold the widget information #106

Merged
merged 1 commit into from
May 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Add controls.json to hold the widget information
for the base computer widgets instead of hard coding it in the code.
  • Loading branch information
royfalk committed Jan 14, 2024
commit 0e384160c3d90ecd1af36c2be7464ff0e904e17c
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -130,6 +130,7 @@ INSTALL(FILES master_part_list.json DESTINATION share/vegastrike)
INSTALL(FILES master_asteroid_list.json DESTINATION share/vegastrike)
INSTALL(FILES master_component_list.json DESTINATION share/vegastrike)
INSTALL(FILES master_ship_list.json DESTINATION share/vegastrike)
INSTALL(FILES controls.json DESTINATION share/vegastrike)


INSTALL(FILES py27_modules.7z DESTINATION share/vegastrike)
234 changes: 234 additions & 0 deletions controls.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,234 @@
[
{
"type": "staticDisplay",
"name": "baseTitle",
"text": "ERROR",
"textColor": "0.1,0.8,0.1,1.0",
"rect": "-.96, .76, 1.9, .08",
"color": "0.0,0.0,0.0,0.0",
"font": "0.07,1.75",
"id": "BaseInfoTitle"
},
{
"type": "staticDisplay",
"name": "playerTitle",
"text": "ERROR",
"textColor": "0.7,0.7,0.9,1.0",
"rect": "-.96, .69, 1.9, .07",
"color": "0.0,0.0,0.0,0.0",
"font": "0.06,1.5",
"id": "PlayerInfoTitle"
},
{
"type": "button",
"name": "saveLoad",
"label": "Save/Load",
"command": "ShowOptionsMenu",
"rect": ".64, .85, .32, .1",
"textColor": "1,1,1,1",
"color": "0.75,0,0,0.25",
"downTextColor": "0,0,0,0",
"downColor": "0.75,0,0,0.6",
"highlightColor": "0,0,1,0.4",
"font": "0.08,1.0"
},
{
"type": "button",
"name": "done",
"label": "Done",
"command": "DoneComputer",
"rect": ".74, .71, .22, .1",
"textColor": "1,1,1,1",
"color": "0.75,0,0,0.25",
"downTextColor": "0,0,0,0",
"downColor": "0.75,0,0,0.6",
"highlightColor": "0,0,1,0.4",
"font": "0.08,1.5"
},
{
"type": "button",
"name": "mode",
"label": "ERROR",
"rect": "-.96, .86, .24, .09",
"textColor": "1,1,1,1",
"color": "0,0.5,0,0.25",
"downTextColor": "0,0,0,0",
"downColor": "0,0.5,0,0.5",
"highlightColor": "0,0.5,0,0.4",
"font": "0.07,1.5",
"id": "ModeButton"
},
{
"type": "staticDisplay",
"name": "seller",
"text": "Seller",
"textColor": "1,1,1,1",
"rect": "-.96, .56, .81, .1",
"color": "0.0,0.0,0.0,0.0",
"font": "0.08,1.5",
"justification": "center",
"id": "PlayerInfoTitle"
},
{
"type": "staticDisplay",
"name": "totalPrice",
"textColor": "1,1,1,1",
"rect": "-.2, .56, .4, .07",
"color": "0.0,0.0,0.0,0.0",
"font": "0.06",
"justification": "center",
"id": "TotalPrice"
},
{
"type": "staticDisplay",
"name": "maxQuantity",
"textColor": "1,1,1,1",
"rect": "-.14, .49, .28, .07",
"color": "0.0,0.0,0.0,0.0",
"font": "0.06",
"justification": "center",
"id": "MaxQuantity"
},
{
"type": "scroller",
"name": "sellerScroller",
"textColor": "1,1,1,1",
"rect": "-.20, -.4, .05, .95",
"color": "0.375,0.375,0.75,.1",
"thumbColor": "0.375,0.375,0.75,.4",
"buttonColor": "0.375,0.375,0.75,.4",
"outlineColor": "0.5,0.5,0.5,1"
},
{
"type": "picker",
"name": "sellerPicker",
"textColor": "1,1,1,1",
"rect": "-.96, -.4, .76, .95",
"color": "0.375,0.375,0.75,.1",
"selectionColor": "0, .6, 0, .8",
"highlightColor": "0, .6, 0, .35",
"highlightTextColor": "1,1,1,1",
"outlineColor": "0.5,0.5,0.5,1",
"font": ".07",
"textMargins": "0.02, 0.01",
"id": "BaseCargo"
},
{
"type": "scroller",
"name": "inventoryScroller",
"textColor": "1,1,1,1",
"rect": ".91, -.4, .05, .95",
"color": "0.375,0.375,0.75,.1",
"thumbColor": "0.375,0.375,0.75,.4",
"buttonColor": "0.375,0.375,0.75,.4",
"outlineColor": "0.5,0.5,0.5,1"
},
{
"type": "picker",
"name": "inventoryPicker",
"textColor": "1,1,1,1",
"rect": ".15, -.4, .76, .95",
"color": "0.375,0.375,0.75,.1",
"selectionColor": "0, .6, 0, .8",
"highlightColor": "0, .6, 0, .35",
"highlightTextColor": "1,1,1,1",
"outlineColor": "0.5,0.5,0.5,1",
"font": ".07",
"textMargins": "0.02, 0.01",
"id": "PlayerCargo"
},
{
"type": "button",
"name": "buy",
"rect": "-.11, .3, .22, .13",
"textColor": "1,1,1,1",
"color": "0,1,1,.1",
"downTextColor": ".2,.2,.2",
"downColor": "0,1,1,.4",
"borderColor": ".2,.2,.2",
"endBorderColor": ".4,.4,.4",
"shadowWidth": "2",
"cycleTime": "1.0",
"font": "0.1,1.5",
"id": "CommitAll"
},
{
"type": "button",
"name": "buy10",
"rect": "-.11, .1, .22, .1",
"textColor": "1,1,1,1",
"color": "0,1,1,.1",
"downTextColor": ".2,.2,.2",
"downColor": "0,1,1,.4",
"borderColor": ".2,.2,.2",
"endBorderColor": ".4,.4,.4",
"shadowWidth": "2",
"cycleTime": "1.0",
"font": "0.08,1.5",
"id": "Commit10"
},
{
"type": "button",
"name": "buy1",
"rect": "-.11, -.1, .22, .1",
"textColor": "1,1,1,1",
"color": "0,1,1,.1",
"downTextColor": ".2,.2,.2",
"downColor": "0,1,1,.4",
"borderColor": ".2,.2,.2",
"endBorderColor": ".4,.4,.4",
"shadowWidth": "2",
"cycleTime": "1.0",
"font": "0.08,1.5",
"id": "Commit"
},
{
"type": "scroller",
"name": "descriptionScroller",
"textColor": "1,1,1,1",
"rect": ".91, -.95, .05, .5",
"color": "0.375,0.375,0.75,.1",
"thumbColor": "0.15,0.15,0.3",
"buttonColor": "0.15,0.15,0.3",
"outlineColor": "0.5,0.5,0.5,1"
},
{
"type": "staticImageDisplay",
"name": "picture",
"texture": "blackclear.png",
"rect": "-.96, -.45, .345, -.47",
"id": "DescriptionImage"
},
{
"type": "staticDisplay",
"name": "description",
"textColor": "1,1,1,1",
"rect": "-.6, -.95, 1.51, .5",
"color": "0.375,0.375,0.75,.1",
"outlineColor": "0.5,0.5,0.5,1",
"font": "0.06",
"textMargins": "0.02, 0.01",
"multiline": true,
"id": "Description"
},
{
"type": "staticDisplay",
"name": "sellLabel",
"text": "Available Upgrades",
"textColor": "1,1,1,1",
"rect": "-.96, .55, .81, .1",
"color": "0,0,0,0",
"font": "0.07, 1.5",
"justification": "center"
},
{
"type": "scroller",
"name": "sellerScroller",
"textColor": "1,1,1,1",
"rect": "-.20, -.4, .05, .95",
"color": "0.375,0.375,0.75,.1",
"thumbColor": "0.15,0.15,0.3",
"buttonColor": "0.15,0.15,0.3",
"outlineColor": "0.5,0.5,0.5,1"
}
]
Loading