Skip to content

Commit 7e7ee9c

Browse files
committed
Fix: All UI components inside Editor window. Add layout validation. v0.2.38
1 parent 9d595c9 commit 7e7ee9c

7 files changed

Lines changed: 134 additions & 150 deletions

File tree

CMakeLists.txt

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ set(CMAKE_CXX_STANDARD 17)
99
set(CMAKE_CXX_STANDARD_REQUIRED ON)
1010
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
1111

12+
# Suppress deprecated function warnings (sprintf, strncpy, getenv, localtime)
13+
add_compile_definitions(_CRT_SECURE_NO_WARNINGS _CRT_NONSTDC_NO_DEPRECATION)
14+
1215
# ============================================================================
1316
# Platform Detection
1417
# ============================================================================
@@ -62,21 +65,15 @@ FetchContent_Declare(
6265
GIT_REPOSITORY https://github.com/ocornut/imgui.git
6366
GIT_TAG docking # docking branch (stable, includes docking)
6467
)
65-
FetchContent_GetProperties(imgui)
66-
if(NOT imgui_POPULATED)
67-
FetchContent_Populate(imgui)
68-
endif()
68+
FetchContent_MakeAvailable(imgui)
6969

7070
# ImGuiColorTextEdit — syntax highlighting, line numbers, minimap
7171
FetchContent_Declare(
7272
imgui_coloredit
7373
GIT_REPOSITORY https://github.com/BalazsJako/ImGuiColorTextEdit.git
7474
GIT_TAG master
7575
)
76-
FetchContent_GetProperties(imgui_coloredit)
77-
if(NOT imgui_coloredit_POPULATED)
78-
FetchContent_Populate(imgui_coloredit)
79-
endif()
76+
FetchContent_MakeAvailable(imgui_coloredit)
8077

8178
# Native File Dialog — cross-platform native file picker
8279
FetchContent_Declare(

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.2.36
1+
0.2.37

imgui.ini

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
[Window][Editor]
22
Pos=0,0
3-
Size=1009,800
3+
Size=1280,800
44
Collapsed=0
5-
DockId=0x00000002,0
65

76
[Window][DockSpace]
87
Size=1280,800
@@ -19,8 +18,8 @@ Size=476,221
1918
Collapsed=0
2019

2120
[Window][Explorer]
22-
Pos=1011,0
23-
Size=269,800
21+
Pos=236,483
22+
Size=1280,800
2423
Collapsed=0
2524
DockId=0x00000003,0
2625

@@ -29,12 +28,17 @@ Size=1280,800
2928
Collapsed=0
3029

3130
[Window][pcode-editor]
32-
Pos=0,0
33-
Size=1159,669
31+
Size=1280,800
3432
Collapsed=0
3533

3634
[Docking][Data]
37-
DockNode ID=0x00000004 Pos=0,0 Size=1280,800 Split=X
38-
DockNode ID=0x00000002 Parent=0x00000004 SizeRef=849,720 HiddenTabBar=1 Selected=0xDF0EC458
39-
DockNode ID=0x00000003 Parent=0x00000004 SizeRef=226,720 HiddenTabBar=1 Selected=0x00F0E82E
35+
DockNode ID=0x00000006 Pos=236,483 Size=1280,800 Split=X
36+
DockNode ID=0x00000001 Parent=0x00000006 SizeRef=225,357 Split=Y
37+
DockNode ID=0x00000004 Parent=0x00000001 SizeRef=1280,583 Split=X
38+
DockNode ID=0x00000002 Parent=0x00000004 SizeRef=872,720 HiddenTabBar=1 Selected=0xDF0EC458
39+
DockNode ID=0x00000003 Parent=0x00000004 SizeRef=406,720 HiddenTabBar=1 Selected=0x00F0E82E
40+
DockNode ID=0x00000005 Parent=0x00000001 SizeRef=1280,177 Selected=0xD33228A6
41+
DockNode ID=0x00000007 Parent=0x00000006 SizeRef=744,357 Selected=0xDF0EC458
42+
DockNode ID=0x00000008 Pos=0,0 Size=600,300
43+
DockSpace ID=0xCCBD8CF7 Pos=0,24 Size=1280,776 CentralNode=1 Selected=0xDF0EC458
4044

pcode-settings.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77
"show_line_numbers": true,
88
"show_minimap": true,
99
"show_spaces": true,
10-
"highlight_line": 2,
10+
"highlight_line": 1,
1111
"show_tabs": true,
1212
"tab_size": 4,
1313
"font_size": 17,
1414
"font_name": "CascadiaMono",
15-
"last_open_dir": ".\\src",
16-
"recent_files": [".\\src\\editor_app.cpp", ".\\src\\editor_app.h", ".\\src\\main.cpp", ".\\docs\\versioning.md", ".\\docs\\imgui_tutorial.md", ".\\docs\\VIM_MOTIONS_SPEC.md", "./src/editor_app.h", "./src/main.cpp", "./src/editor_app.cpp", "VERSION"]
15+
"last_open_dir": ".",
16+
"recent_files": [".\\VERSION", ".\\README.md", "./src\\\\editor_app.h", "./src\\\\main.cpp", "./src\\\\editor_app.cpp", "./src/main.cpp", ".\\\\src\\\\editor_app.h", ".\\\\src\\\\editor_app.cpp", ".\\\\src\\\\main.cpp", ".\\\\docs\\\\versioning.md"]
1717
}

scripts/sync-version.ps1

Lines changed: 3 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,17 @@
11
#!/usr/bin/env pwsh
22
# ============================================================================
3-
# Sync version: Reads VERSION file and updates version string in code
3+
# Sync version: Reads VERSION file - get_version() reads from file directly
4+
# No code update needed
45
# ============================================================================
56

67
$VERSION_FILE = "VERSION"
7-
$CODE_FILE = "src/editor_app.cpp"
8-
$VERSION_PATTERN = 'return "pCode Editor version \d+\.\d+\.\d+"'
98

10-
# Read version from VERSION file
119
if (!(Test-Path $VERSION_FILE)) {
1210
Write-Host "❌ VERSION file not found"
1311
exit 1
1412
}
1513
$version = Get-Content $VERSION_FILE -Raw | ForEach-Object { $_.Trim() }
1614
Write-Host "📌 Version from VERSION file: $version"
17-
18-
# Read current code version
19-
$codeContent = Get-Content $CODE_FILE -Raw
20-
if ($codeContent -match $VERSION_PATTERN) {
21-
$oldVersion = $Matches[0] -replace 'return "', '' -replace '"', ''
22-
Write-Host "📌 Current version in code: $oldVersion"
23-
24-
if ($oldVersion -eq $version) {
25-
Write-Host "✅ Version already in sync"
26-
exit 0
27-
}
28-
29-
# Update version in code
30-
$newPattern = 'return "pCode Editor version ' + $version + '"'
31-
$codeContent = $codeContent -replace $VERSION_PATTERN, $newPattern
32-
Set-Content -Path $CODE_FILE -Value $codeContent -NoNewline
33-
Write-Host "✅ Updated version to $version in $CODE_FILE"
34-
} else {
35-
Write-Host "❌ Could not find version pattern in $CODE_FILE"
36-
exit 1
37-
}
15+
Write-Host "✅ get_version() reads from VERSION file directly - no sync needed"
3816

3917
exit 0

0 commit comments

Comments
 (0)