Code edit (11 edits merged)
Please save this source code
User prompt
make stockValueText follow the current segment y
Code edit (6 edits merged)
Please save this source code
User prompt
move the stock price to the left center
Code edit (1 edits merged)
Please save this source code
Code edit (1 edits merged)
Please save this source code
User prompt
Add a new text2 named socksNumber, in the same way as balanceText
Code edit (1 edits merged)
Please save this source code
Code edit (18 edits merged)
Please save this source code
User prompt
Fix Bug: 'Uncaught ReferenceError: BalanceIcon is not defined' in or related to this line: 'var balanceIcon = game.addChild(new BalanceIcon());' Line Number: 307
User prompt
Add a new stockIcon asset similar to balanceIcon, place it at the right of balanceIcon
Code edit (1 edits merged)
Please save this source code
User prompt
add a new icon for balance
Code edit (1 edits merged)
Please save this source code
Code edit (7 edits merged)
Please save this source code
User prompt
'reuse' the axis labels and ensure that values are always visible without creating too many Text label instances, you can implement a recycling mechanism for the labels.
User prompt
make axis labels values dynamic so that visible values are always centered on stockValuesHistory[graphIndex + 1]
Code edit (2 edits merged)
Please save this source code
User prompt
call labels updatePosition with the y position of horizontal axis
Code edit (1 edits merged)
Please save this source code
User prompt
instiate axis labels (but not as children of vertical axis)
Code edit (4 edits merged)
Please save this source code
User prompt
detach the labels from the vertical axis : the should not be children of vertivalAxis
Code edit (1 edits merged)
Please save this source code
User prompt
Rotate labels by -90Ā°
===================================================================
--- original.js
+++ change.js
@@ -1,17 +1,21 @@
/****
* Classes
****/
+var BalanceIcon = Container.expand(function () {
+ var self = Container.call(this);
+ var iconGraphics = self.attachAsset('balanceIcon', {
+ anchorX: 0.5,
+ anchorY: 0.5
+ });
+});
var StockIcon = Container.expand(function () {
var self = Container.call(this);
var iconGraphics = self.attachAsset('stockIcon', {
anchorX: 0.5,
anchorY: 0.5
});
});
-var BalanceIcon = Container.expand(function () {
- var self = Container.call(this);
-});
var AxisLabel = Container.expand(function (value) {
var self = Container.call(this);
self.value = value;
var label = new Text2('$' + value, {
@@ -310,9 +314,9 @@
var balanceIcon = game.addChild(new BalanceIcon());
balanceIcon.x = game.width * 0.5;
balanceIcon.y = game.height * 0.025;
var stockIcon = game.addChild(new StockIcon());
-stockIcon.x = balanceIcon.x + balanceIcon.width + 10;
+stockIcon.x = game.width * 0.65;
stockIcon.y = balanceIcon.y;
var balanceText = new Text2('$' + player.getBalance() + ' ', {
size: 100,
fill: "#ffffff",
A Technical dark background. Nothing just a gradiant of colors from black to dark blue. Theme : stock market. background
A modern clean empty rectangular button without borders. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
without shadow
a basic empty ui popup with a black background. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.