Skip to content

Commit 80883d7

Browse files
authored
Add syntax highlighting to block codes in main README
1 parent d95baae commit 80883d7

1 file changed

Lines changed: 12 additions & 11 deletions

File tree

README.md

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ adapt it to your stack.
4343
JDK 17+ is required to run the build (Gradle's toolchain pins it). Published artifacts target Java 8 bytecode, so
4444
consuming them as a dependency only needs JDK 8+ at runtime.
4545

46-
```
46+
```bash
4747
git clone --recurse-submodules https://github.com/SpaiR/imgui-java.git
4848
cd imgui-java
4949
./gradlew :example:run
@@ -75,7 +75,7 @@ On Apple Silicon nothing extra is needed: the published macOS native is a univer
7575

7676
Use SDL3 by switching backend in `configure(...)`:
7777

78-
```
78+
```java
7979
@Override
8080
protected void configure(final Configuration config) {
8181
config.setBackend(Backend.SDL);
@@ -84,7 +84,7 @@ protected void configure(final Configuration config) {
8484

8585
For a ready smoke-test entry point, run `MainSdl`:
8686

87-
```
87+
```bash
8888
./gradlew :example:run -PmainClass=MainSdl
8989
```
9090

@@ -105,7 +105,8 @@ That means that if you are seeking for a bit more low-level control - you can ga
105105
### Example
106106

107107
A very simple application may look like this:
108-
```
108+
109+
```java
109110
import imgui.ImGui;
110111
import imgui.app.Application;
111112
import imgui.app.Configuration;
@@ -136,7 +137,7 @@ Read `imgui.app.Application` [javadoc](https://javadoc.io/doc/io.github.spair/im
136137
<details>
137138
<summary><b>Gradle</b></summary>
138139

139-
```
140+
```gradle
140141
repositories {
141142
mavenCentral()
142143
}
@@ -150,7 +151,7 @@ dependencies {
150151
<details>
151152
<summary><b>Maven</b></summary>
152153

153-
```
154+
```xml
154155
<dependencies>
155156
<dependency>
156157
<groupId>io.github.spair</groupId>
@@ -202,7 +203,7 @@ Take a note, that you also need to add dependencies to [LWJGL](https://www.lwjgl
202203
<details>
203204
<summary><b>Gradle</b></summary>
204205

205-
```
206+
```gradle
206207
repositories {
207208
mavenCentral()
208209
}
@@ -231,7 +232,7 @@ dependencies {
231232
<details>
232233
<summary><b>Maven</b></summary>
233234

234-
```
235+
```xml
235236
<properties>
236237
<lwjgl.version>3.4.1</lwjgl.version>
237238
<imgui.java.version>${version}</imgui.java.version>
@@ -396,7 +397,7 @@ The Gradle toolchain pins **JDK 17** for the build regardless of your system JDK
396397
This is the path CI uses. It vendors FreeType, runs `generateLibs`, and lays the resulting binary under
397398
`/tmp/imgui/dst/`:
398399

399-
```
400+
```bash
400401
buildSrc/scripts/build.sh <windows|linux|macos>
401402
```
402403

@@ -405,7 +406,7 @@ via `lipo`.
405406

406407
To use the freshly-built binary with the example:
407408

408-
```
409+
```bash
409410
cp /tmp/imgui/dst/libimgui-java64.<so|dylib|dll> bin/
410411
./gradlew :example:run -PlibPath=$PWD/bin
411412
```
@@ -455,7 +456,7 @@ The Java side of the binding is **codegen-driven**. Annotated stubs live under `
455456
generator in `buildSrc/` expands them into `imgui-binding/src/generated/java/` (both trees are committed). Never
456457
hand-edit `src/generated/`: it is regenerated and your changes will be lost. The workflow is always:
457458

458-
```
459+
```bash
459460
# edit imgui-binding/src/main/java/...
460461
./gradlew :imgui-binding:generateApi
461462
# commit both src/main/java and src/generated/java in one commit

0 commit comments

Comments
 (0)