-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmain.qml
708 lines (554 loc) · 30.4 KB
/
main.qml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
import QtQuick 2.12
import QtQuick.Window 2.12
import "components"
import QtQuick.Controls 2.15
import QtQml.Models 2.15
import QtQuick.Layouts 1.15
import QtQml 2.15
import OpenGLUnderQML 1.0
import OpenGLCamera 1.0
ApplicationWindow {
id: window
width: 1440
height: 880
minimumWidth: 960
minimumHeight: 710
visible: true
//title: qsTr("Ahiret Creator")
color: "#151616"
property int bw: 5
flags: Qt.Window | Qt.FramelessWindowHint//| Qt.CustomizeWindowHint
//flags: Qt.Window | Qt.CustomizeWindowHint
property point startMousePos
property point startWindowPos
property size startWindowSize
// The mouse area is just for setting the right cursor shape
MouseArea {
anchors.fill: parent
hoverEnabled: true
cursorShape: {
const p = Qt.point(mouseX, mouseY);
const b = bw + 1; // Increase the corner size slightly
if (p.x < b && p.y < b) return Qt.SizeFDiagCursor;
if (p.x >= width - b && p.y >= height - b) return Qt.SizeFDiagCursor;
if (p.x >= width - b && p.y < b) return Qt.SizeBDiagCursor;
if (p.x < b && p.y >= height - b) return Qt.SizeBDiagCursor;
if (p.x < b || p.x >= width - b) return Qt.SizeHorCursor;
if (p.y < b || p.y >= height - b) return Qt.SizeVerCursor;
}
acceptedButtons: Qt.NoButton // don't handle actual events
Keys.onPressed: {
if (event.key === Qt.Key_Space){
left_menu_button1.state = "CLICKED"
}
}
onClicked: {
focus: true
}
}
DragHandler {
id: resizeHandler
grabPermissions: TapHandler.TakeOverForbidden
target: null
onActiveChanged: if (active) {
const p = resizeHandler.centroid.scenePressPosition;//resizeHandler.centroid.position;
const b = bw + 1; // Increase the corner size slightly
let e = 0;
if (p.x < b) { e |= Qt.LeftEdge }
if (p.x >= width - b) { e |= Qt.RightEdge }
if (p.y < b) { e |= Qt.TopEdge }
if (p.y >= height - b) { e |= Qt.BottomEdge }
window.startSystemResize(e);
}
}
Rectangle{
id: rectangle
color: "#151616"
anchors.fill: parent
anchors.bottomMargin: 0
Rectangle{
id: top_menu
anchors.top: parent.top
width: parent.width
height: 29//40
color: "#151616"
/*Text{
id: title_program
text: "Ahiret Creator"
color: "#a2a29f"
font.family: "Verdana"
font.pointSize: 10
anchors.centerIn: parent
}*/
Item{
width: parent.width
height: parent.height
anchors.top: parent.top
anchors.right: systemButtons.left
DragHandler{
id: dragHandler
target: null
onActiveChanged: if (active){
window.startSystemMove()
}
}
}
CustomMenuBar{
id: top_menu_bar
x:0
anchors.top: parent.top
property color normalBG: "#151616" // rectangle icin.
height: top_menu.height
itemWidth: left_menu.width
itemHeight: top_menu.height
fontPixelSize: 13
bg.color: normalBG
hoveredBgColor: "#232424"
textColor: "#b3b3b3"
textHoverC: "#a0a0a0"
property color general_menuItemHoveredColor: "#353536"
property color general_menuItemTextColor: "#b3b3b3"
property color general_menuItemTextHoveredColor: "#a0a0a0"
CustomMenu{
title: qsTr("File")
Action {
text: qsTr("Tool Bar"); checkable: true; shortcut: "CTRL+K"; onTriggered: {}
}
Action { text: qsTr("Side Bar"); checkable: true; enabled: false; checked: true }
Action { text: qsTr("Status Bar"); checkable: true; checked: true }
CustomMenu{
title: qsTr("Advanced")
Action { text: "Find Next"; shortcut: "CTRL+E"}
Action { text: "Find Previous"; shortcut: "CTRL+D" }
Action { text: "Replace"; shortcut: "CTRL+İ" }
Action { text: "Load"; shortcut: "CTRL+P" }
}
}
CustomMenu{
title: qsTr("Edit")
}
CustomMenu{
title: qsTr("Object")
}
CustomMenu{
title: qsTr("Plugins")
}
CustomMenu{
title: qsTr("View")
}
CustomMenu{
title: qsTr("Window")
}
CustomMenu{
title: qsTr("Library")
}
CustomMenu{
title: qsTr("Help")
}
}
RowLayout{
id: systemButtons
spacing: 5
anchors.top: parent.top
anchors.right: parent.right
CustomButtonRectangle{id: minimizeButton; width: 27; height: top_menu.height; normalColor: "#151616"; textR.text: "—"; textNormalColor:"#b3b3b3"; font.pointSize: 13; mouseAreas.onClicked: {minimizeButton.state = ""; window.showMinimized()}}
CustomButtonRectangle{id: maximizeButton; width: 27; height: top_menu.height; normalColor: "#151616"; textR.text: "+"; textNormalColor:"#b3b3b3"; font.pointSize: 13; mouseAreas.onClicked: {maximizeButton.state = ""; window.showMaximized()}}
CustomButtonRectangle{id: closeButton; width: 27; height: top_menu.height; normalColor: "#151616"; hoveredColor: "#E81123"; textR.text: "X"; textNormalColor:"#b3b3b3"; font.pointSize: 11; font.family: "Verdana"; mouseAreas.onClicked: window.close()}
}
CustomComboBox{
id: customCombo
width: 91
height: 25
font.pixelSize: 11
anchors.right: systemButtons.left
anchors.rightMargin: 30
anchors.verticalCenter: top_menu.verticalCenter
}
Text{
property real delta: scene3D.generalData.deltaTime
id: fps_text; anchors.verticalCenter: parent.verticalCenter; anchors.right: customCombo.left; anchors.rightMargin: 10
text: "FPS: " + ((delta == 0) ? "" : (1/delta).toFixed(3)); font.family: "Arial"; font.pixelSize: 10; font.weight: Font.Normal; font.styleName: Font.Normal
color: "white"
}
}
Rectangle{
id: top_menu_bottom_line
width: top_menu.width
anchors.top: top_menu.bottom
height: 2
color: "#2d2e2e"
}
Rectangle{
id: left_menu
width: 54
height: parent.height - top_menu.height
anchors.top: top_menu_bottom_line.bottom
anchors.left: parent.left
color: "#151516"
CustomBorder
{
commonBorder: false
lBorderwidth: 0
rBorderwidth: 1
tBorderwidth: 0
bBorderwidth: 0
borderColor: "#2d2e2e"
}
//Top Buttons
GridLayout{
rows: 11
columns: 1
rowSpacing: 34
anchors.horizontalCenter: parent.horizontalCenter
anchors.top: parent.top
anchors.topMargin: 11
CustomButtonImage{id: left_menu_button1; width: 21; height: 21; checkable: true; rotation: 90; defaultImage: "images/left_menu_button1.png"; hoveredImage: "images/left_menu_button1.png"; clickedImage: "images/left_menu_button1.png"; colorizedImage: true}
CustomButtonImage{id: left_menu_button2; width: 18; height: 18; checkable: true; Layout.topMargin: -3; defaultImage: "images/left_menu_button2.png"; hoveredImage: "images/left_menu_button2.png"; clickedImage: "images/left_menu_button2.png"; colorizedImage: true}
CustomButtonImage{id: left_menu_button3; width: 18; height: 18; checkable: true; defaultImage: "images/left_menu_button3.png"; hoveredImage: "images/left_menu_button3.png"; clickedImage: "images/left_menu_button3.png"; colorizedImage: true}
CustomButtonImage{id: left_menu_button4; width: 18; height: 18; checkable: true; defaultImage: "images/left_menu_button4.png"; hoveredImage: "images/left_menu_button4.png"; clickedImage: "images/left_menu_button4.png"; colorizedImage: true}
CustomButtonImage{id: left_menu_button5; width: 18; height: 18; checkable: true; defaultImage: "images/left_menu_button5.png"; hoveredImage: "images/left_menu_button5.png"; clickedImage: "images/left_menu_button5.png"; colorizedImage: true}
CustomButtonImage{id: left_menu_button6; width: 18; height: 18; checkable: true; defaultImage: "images/left_menu_button6.png"; hoveredImage: "images/left_menu_button6.png"; clickedImage: "images/left_menu_button6.png"; colorizedImage: true}
CustomButtonImage{id: left_menu_button7; width: 18; height: 18; checkable: true; defaultImage: "images/left_menu_button7.png"; hoveredImage: "images/left_menu_button7.png"; clickedImage: "images/left_menu_button7.png"; colorizedImage: true}
CustomButtonImage{id: left_menu_button8; width: 18; height: 18; checkable: true; defaultImage: "images/left_menu_button8.png"; hoveredImage: "images/left_menu_button8.png"; clickedImage: "images/left_menu_button8.png"; colorizedImage: true}
CustomButtonImage{id: left_menu_button9; width: 18; height: 18; checkable: true; defaultImage: "images/left_menu_button9.png"; hoveredImage: "images/left_menu_button9.png"; clickedImage: "images/left_menu_button9.png"; colorizedImage: true}
CustomButtonImage{id: left_menu_button10; width: 18; height: 18; checkable: true; defaultImage: "images/left_menu_button10.png"; hoveredImage: "images/left_menu_button10.png"; clickedImage: "images/left_menu_button10.png"; colorizedImage: true}
CustomButtonImage{id: left_menu_button11; width: 18; height: 18; checkable: true; defaultImage: "images/left_menu_button11.png"; hoveredImage: "images/left_menu_button11.png"; clickedImage: "images/left_menu_button11.png"; colorizedImage: true}
}
//Bottom Buttons
GridLayout{
property real rowCount: 2
property real rowSpacingValue: 34
property real buttonsWidth: 20
property real buttonsHeight: 20
rows: rowCount
columns: 1
rowSpacing: rowSpacingValue
anchors.horizontalCenter: parent.horizontalCenter
anchors.bottom: parent.bottom;
anchors.bottomMargin: 15
CustomButtonImage{id: left_menu_button_bottom1; width: parent.buttonsWidth; height: parent.buttonsHeight; checkable: true; defaultImage: "images/left_menu_button_bottom1.png"; hoveredImage: "images/left_menu_button_bottom1.png"; clickedImage: "images/left_menu_button_bottom1.png"; colorizedImage: true}
CustomButtonImage{id: left_menu_button_bottom2; width: parent.buttonsWidth; height: parent.buttonsHeight; checkable: true; defaultImage: "images/left_menu_button_bottom2.png"; hoveredImage: "images/left_menu_button_bottom2.png"; clickedImage: "images/left_menu_button_bottom2.png"; colorizedImage: true}
}
}
property var rightMenusArray: []
Rectangle{
// RIGHT_MENU PROPERTIES
property int rightMenuStatus : 1 // 11 menuden hangisinin secili oldugunu belirtir.
property var rightMenuButtonsArray: []
property real buttonsWidth: right_menu.width;
property real buttonsHeight: 47
id: right_menu
width: 54
anchors.top: top_menu_bottom_line.bottom
anchors.right: right_menu_main.left
anchors.rightMargin: 1
height: window.height - top_menu.height
color: "#151516"
CustomBorder{
commonBorder: false
lBorderwidth: 1
rBorderwidth: 1
tBorderwidth: 0
bBorderwidth: 0
borderColor: "#2d2e2e"
}
ColumnLayout{
spacing: 10
anchors.left: parent.left
property color normalColor: "#151616"
property color hoveredColor: "#232424"
property color clickedColor: "#232424" // #212222
property real imageWidth: 28
property real imageHeight: 28
/*Rectangle{
id: rightselected
width: 1
height: right_menu_button1.height
color: parent.normalColor
opacity: 0.0
}
SequentialAnimation{
id: rightselected_anim
PropertyAnimation{
target: rightselected
property: "color"
to: "#43b581"
duration: 300
}
}*/
CustomButtonRectangle{id: hideshow_button; width: right_menu.width; height: scene_menu.height; normalColor: parent.normalColor;
hoveredColor: parent.hoveredColor; clickedColor: parent.clickedColor; textR.text: "<"; textNormalColor:"#8b8d90";
textHoverColor: "#8b8d90"; font.pointSize: 18;
mouseAreas.onClicked: {
rectangle.rightMenuPanelChange(hideshow_button)
}
}
CustomButtonImageRect{
id: right_menu_button1; width: right_menu.buttonsWidth; height: right_menu.buttonsHeight; btnImage.width: parent.imageWidth; btnImage.height: parent.imageHeight; btnImage.anchors.centerIn: btnImage.parent; btnImage.anchors.fill: undefined; rectNormalColor: parent.normalColor; rectHoveredColor: parent.hoveredColor; rectClickedColor: parent.clickedColor; checkable_fixed: true; defaultImage: "images/right_menu_button1.png"; hoveredImage: "images/right_menu_button1.png"; clickedImage: "images/right_menu_button1.png";
colorizedImage: true; colorizedOnlyByClicked: true;
mouseAreas.onClicked: {
rectangle.menuStateChanged(1)
}
}
CustomButtonImageRect{
id: right_menu_button2; width: right_menu.buttonsWidth; height: right_menu.buttonsHeight; btnImage.width: parent.imageWidth; btnImage.height: parent.imageHeight; btnImage.anchors.centerIn: btnImage.parent; btnImage.anchors.fill: undefined; rectNormalColor: parent.normalColor; rectHoveredColor: parent.hoveredColor; rectClickedColor: parent.clickedColor; checkable_fixed: true; defaultImage: "images/right_menu_button2.png"; hoveredImage: "images/right_menu_button2.png"; clickedImage: "images/right_menu_button2.png";
colorizedImage: true; colorizedOnlyByClicked: true;
mouseAreas.onClicked: {
rectangle.menuStateChanged(2)
}
}
CustomButtonImageRect{
id: right_menu_button3; width: right_menu.buttonsWidth; height: right_menu.buttonsHeight; btnImage.width: parent.imageWidth; btnImage.height: parent.imageHeight; btnImage.anchors.centerIn: btnImage.parent; btnImage.anchors.fill: undefined; rectNormalColor: parent.normalColor; rectHoveredColor: parent.hoveredColor; rectClickedColor: parent.clickedColor; checkable_fixed: true; defaultImage: "images/right_menu_button3.png"; hoveredImage: "images/right_menu_button3.png"; clickedImage: "images/right_menu_button3.png";
colorizedImage: true; colorizedOnlyByClicked: true;
mouseAreas.onClicked: {
rectangle.menuStateChanged(3)
}
}
CustomButtonImageRect{
id: right_menu_button4; width: right_menu.buttonsWidth; height: right_menu.buttonsHeight; btnImage.width: parent.imageWidth; btnImage.height: parent.imageHeight; btnImage.anchors.centerIn: btnImage.parent; btnImage.anchors.fill: undefined; rectNormalColor: parent.normalColor; rectHoveredColor: parent.hoveredColor; rectClickedColor: parent.clickedColor; checkable_fixed: true; defaultImage: "images/right_menu_button4.png"; hoveredImage: "images/right_menu_button4.png"; clickedImage: "images/right_menu_button4.png";
colorizedImage: true; colorizedOnlyByClicked: true;
mouseAreas.onClicked: {
rectangle.menuStateChanged(4)
}
}
CustomButtonImageRect{
id: right_menu_button5; width: right_menu.buttonsWidth; height: right_menu.buttonsHeight; btnImage.width: parent.imageWidth; btnImage.height: parent.imageHeight; btnImage.anchors.centerIn: btnImage.parent; btnImage.anchors.fill: undefined; rectNormalColor: parent.normalColor; rectHoveredColor: parent.hoveredColor; rectClickedColor: parent.clickedColor; checkable_fixed: true; defaultImage: "images/right_menu_button5.png"; hoveredImage: "images/right_menu_button5.png"; clickedImage: "images/right_menu_button5.png";
colorizedImage: true; colorizedOnlyByClicked: true;
mouseAreas.onClicked: {
rectangle.menuStateChanged(5)
}
}
CustomButtonImageRect{
id: right_menu_button6; width: right_menu.buttonsWidth; height: right_menu.buttonsHeight; btnImage.width: parent.imageWidth; btnImage.height: parent.imageHeight; btnImage.anchors.centerIn: btnImage.parent; btnImage.anchors.fill: undefined; rectNormalColor: parent.normalColor; rectHoveredColor: parent.hoveredColor; rectClickedColor: parent.clickedColor; checkable_fixed: true; defaultImage: "images/right_menu_button6.png"; hoveredImage: "images/right_menu_button6.png"; clickedImage: "images/right_menu_button6.png";
colorizedImage: true; colorizedOnlyByClicked: true;
mouseAreas.onClicked: {
rectangle.menuStateChanged(6)
}
}
CustomButtonImageRect{
id: right_menu_button7; width: right_menu.buttonsWidth; height: right_menu.buttonsHeight; btnImage.width: parent.imageWidth; btnImage.height: parent.imageHeight; btnImage.anchors.centerIn: btnImage.parent; btnImage.anchors.fill: undefined; rectNormalColor: parent.normalColor; rectHoveredColor: parent.hoveredColor; rectClickedColor: parent.clickedColor; checkable_fixed: true; defaultImage: "images/right_menu_button7.png"; hoveredImage: "images/right_menu_button7.png"; clickedImage: "images/right_menu_button7.png";
colorizedImage: true; colorizedOnlyByClicked: true;
mouseAreas.onClicked: {
rectangle.menuStateChanged(7)
}
}
CustomButtonImageRect{
id: right_menu_button8; width: right_menu.buttonsWidth; height: right_menu.buttonsHeight; btnImage.width: parent.imageWidth; btnImage.height: parent.imageHeight; btnImage.anchors.centerIn: btnImage.parent; btnImage.anchors.fill: undefined; rectNormalColor: parent.normalColor; rectHoveredColor: parent.hoveredColor; rectClickedColor: parent.clickedColor; checkable_fixed: true; defaultImage: "images/right_menu_button8.png"; hoveredImage: "images/right_menu_button8.png"; clickedImage: "images/right_menu_button8.png";
colorizedImage: true; colorizedOnlyByClicked: true;
mouseAreas.onClicked: {
rectangle.menuStateChanged(8)
}
}
CustomButtonImageRect{
id: right_menu_button9; width: right_menu.buttonsWidth; height: right_menu.buttonsHeight; btnImage.width: parent.imageWidth; btnImage.height: parent.imageHeight; btnImage.anchors.centerIn: btnImage.parent; btnImage.anchors.fill: undefined; rectNormalColor: parent.normalColor; rectHoveredColor: parent.hoveredColor; rectClickedColor: parent.clickedColor; checkable_fixed: true; defaultImage: "images/right_menu_button9.png"; hoveredImage: "images/right_menu_button9.png"; clickedImage: "images/right_menu_button9.png";
colorizedImage: true; colorizedOnlyByClicked: true;
mouseAreas.onClicked: {
rectangle.menuStateChanged(9)
}
}
CustomButtonImageRect{
id: right_menu_button10; width: right_menu.buttonsWidth; height: right_menu.buttonsHeight; btnImage.width: parent.imageWidth; btnImage.height: parent.imageHeight; btnImage.anchors.centerIn: btnImage.parent; btnImage.anchors.fill: undefined; rectNormalColor: parent.normalColor; rectHoveredColor: parent.hoveredColor; rectClickedColor: parent.clickedColor; checkable_fixed: true; defaultImage: "images/right_menu_button10.png"; hoveredImage: "images/right_menu_button10.png"; clickedImage: "images/right_menu_button10.png";
colorizedImage: true; colorizedOnlyByClicked: true;
mouseAreas.onClicked: {
rectangle.menuStateChanged(10)
}
}
CustomButtonImageRect{
id: right_menu_button11; width: right_menu.buttonsWidth; height: right_menu.buttonsHeight; btnImage.width: parent.imageWidth; btnImage.height: parent.imageHeight; btnImage.anchors.centerIn: btnImage.parent; btnImage.anchors.fill: undefined; rectNormalColor: parent.normalColor; rectHoveredColor: parent.hoveredColor; rectClickedColor: parent.clickedColor; checkable_fixed: true; defaultImage: "images/right_menu_button11.png"; hoveredImage: "images/right_menu_button11.png"; clickedImage: "images/right_menu_button11.png";
colorizedImage: true; colorizedOnlyByClicked: true;
mouseAreas.onClicked: {
rectangle.menuStateChanged(11)
}
}
Component.onCompleted: {
for (var i = 1; i < 12; i++) {
var c = Qt.createQmlObject("import QtQuick 2.0; QtObject { function f() { return right_menu_button" + i + " } }", this, "none")
right_menu.rightMenuButtonsArray.push(c.f())
c.destroy()
}
right_menu.rightMenuButtonsArray[(right_menu.rightMenuStatus)-1].btnImage.state = "CLICKED"
rectangle.rightMenusArray[(right_menu.rightMenuStatus)-1].state = "open"
//rectangle.menuStateChanged(1)
}
}
}
property variant guncelMenus: [1,8]
function rightMenuPanelChange(hideshow_button){ //0:hiding, 1:showing
var status = "";
var found = 0;
for (var i=0; i<rectangle.guncelMenus.length; i++){
if (right_menu.rightMenuStatus == rectangle.guncelMenus[i])
found = 1;
}
if (!found)
{
console.log("andere panelle sind gerade leider nicht aktiv.")
return
}
if (hideshow_button.textR.text == "<")
{
hideshow_button.textR.text = ">"
status = "open"
}else{
hideshow_button.textR.text = "<"
status = "hide"
}
hideshow_button.state="" // butona basinca hala clicked state'sinde kalmasını engellemek icin...
var panel = rightMenusArray[right_menu.rightMenuStatus-1]
right_menu_main.state = status
}
function menuStateChanged(newMenuStatus){
var panel = rightMenusArray[newMenuStatus-1]
var found = 0;
for (var i=0; i<rectangle.guncelMenus.length; i++){
if (newMenuStatus == rectangle.guncelMenus[i])
found = 1;
}
if (right_menu_main.state == "open" && !found)
{
console.log("andere panelle sind gerade leider nicht aktiv.")
var menu = right_menu.rightMenuButtonsArray[(newMenuStatus)-1].btnImage
menu.state = ""
return
}
if (newMenuStatus != right_menu.rightMenuStatus){
var menuOld = right_menu.rightMenuButtonsArray[(right_menu.rightMenuStatus)-1].btnImage
var menuNew = right_menu.rightMenuButtonsArray[(newMenuStatus)-1].btnImage
menuOld.state = ""
menuNew.state = "CLICKED"
// farkli menu'ye gecis icin
rectangle.rightMenusArray[right_menu.rightMenuStatus-1].state = "hide"
rectangle.rightMenusArray[newMenuStatus-1].state = "open"
right_menu.rightMenuStatus = newMenuStatus
}
}
// START_RIGHT_MENUS
Component.onCompleted: {
for (var i = 1; i < 12; i++) {
var k=i
if (i == 1 || i == 8){
}else{
k=1
}
var c = Qt.createQmlObject("import QtQuick 2.0; QtObject { function f() { return right_menu" + k + " } }", this, "none")
rightMenusArray.push(c.f())
c.destroy()
}
}
RightMenus{
id: right_menu_main
windowWidth: rectangle.width
width: realWidth
height: rectangle.height - (top_menu_bottom_line.height + top_menu.height)
anchors.top: right_menu.top
x: windowWidth
//anchors.left: rectangle.right
color: "#151616"
RightMenus_1{
id: right_menu1
property alias currentScene: scene3D
anchors.fill: parent
color: "#151616"
//anchors.top: right_menu.top
//anchors.right: rectangle.right
}
RightMenus_8{
id: right_menu8
property alias currentScene: scene3D
anchors.fill: parent
color: "#151616"
//anchors.top: right_menu.top
//anchors.right: rectangle.right
}
}
// END_RIGHT_MENUS
Rectangle{
id: scene_menu
anchors.top: top_menu_bottom_line.bottom
anchors.left: left_menu.right
anchors.leftMargin: 1
anchors.right: right_menu.left
anchors.rightMargin: 1
height: 32
color: "#151616"
CustomBorder{
commonBorder: false
lBorderwidth: 0
rBorderwidth: 0
tBorderwidth: 0
bBorderwidth: 1
borderColor: "#2d2e2e"
}
ColumnLayout{
spacing: 3
CustomButtonRectangle {
property alias closeButton : scene_close_1
id: scene_tab1_1
width: 134
height: scene_menu.height
normalColor: "#151616"
hoveredColor: "#232424"
clickedColor: "#232424" //secilmis tab rengi. secilmeyen için #151616
textR.text: "edipscene"
//textR.anchors.leftMargin: closeButton.width / 2
font.pointSize: 12
font.family: "Gilroy-Bold"
textNormalColor: "#8b8d90"
textHoverColor: "#ffffff"
checkable: true
state: "CLICKED"
Rectangle{
id: scene_line_1
width: parent.width
height: 2
anchors.top: parent.top
color: (parent.state == "CLICKED") ? "#43b581" : "#151616" //secilmeyenler tab icin: #151616
property alias clrAnim: color_anim
//clrAnim.running: (parent.state == "CLICKED") ? true : false
ColorAnimation {
id: color_anim
from: scene_line_1.color
to: "#43b581"
duration: 200
running: false
}
}
CustomButtonRectangle{id: scene_close_1; textR.text: "X"; width: 26; height: parent.height - scene_line_1.height; bg_color_hide: true; font.pointSize: 12; textNormalColor: "#8b8d90"; anchors.left: parent.left; anchors.top: scene_line_1.bottom;}
}
}
}
CustomItem {
id: scene3D
anchors.left: left_menu.right
anchors.leftMargin: 1
anchors.topMargin: 2
anchors.top: scene_menu.bottom
anchors.right: right_menu.left
anchors.rightMargin: 1
anchors.bottom: object_menu.top
width: parent.width - 2*(left_menu.width)
height: parent.height - top_menu.height
opacity: 1.0
visible: true
focus: true
property real deltaTime: generalData.deltaTime
onActiveFocusChanged: {
scene3D.focusChangedSignal(focus)
}
}
ObjectMenu{
id: object_menu
property alias currentScene: scene3D
anchors.left: left_menu.right
anchors.right: right_menu.left
anchors.bottom: parent.bottom
height: 0
}
}
onActiveFocusItemChanged: {}
}
/*##^##
Designer {
D{i:0;formeditorZoom:0.5}
}
##^##*/