Jump to content

Featured Replies

Posted

Our community is, to a large extent, a programming forum. I have not upgraded to version 5 yet but I just noticed the code formatting I am seeing in this forum right now does not look good.

When I paste code in to the text editor, an extra line break is added to each line. Then when I select the "inline code" formatting it formats each line as a separate block.

There's also no syntax highlighting, which makes it much harder to read.

Is this the only option that exists in IPB5?

//Create a camera

auto camera = CreateCamera(world);

camera->SetClearColor(0.125);

camera->SetPosition(0, 1.4, -1);

camera->SetFov(70);

//Add camera controls

camera->AddComponent<CameraControls>();

//Create light

auto light = CreateBoxLight(world);

light->SetRange(-10, 10);

light->SetArea(15, 15);

light->SetRotation(45, 35, 0);

light->SetColor(1.2);

//Main loop

while (window->Closed() false and window->KeyDown(KEY_ESCAPE) false)

{

world->Update();

world->Render(framebuffer);

}

Embedded code in old forum threads looks fine:
https://invisioncommunity.com/forums/topic/444202-lua-test/#findComment-2733455

Is there an option for this, and it just isn't turned on in the forum here? I would like to try it out.

Edited by Interferon

  • Author

Ah, I found it. This is good. I am going to disable the inline code in my install, because that's very confusing to have two different methods.

//Create a camera    
auto camera = CreateCamera(world);
camera->SetClearColor(0.125);
camera->SetPosition(0, 1.4, -1);
camera->SetFov(70);

//Add camera controls
camera->AddComponent<CameraControls>();

//Create light
auto light = CreateBoxLight(world);
light->SetRange(-10, 10);
light->SetArea(15, 15);
light->SetRotation(45, 35, 0);
light->SetColor(1.2);

//Main loop
while (window->Closed() == false and window->KeyDown(KEY_ESCAPE) == false)
{
    world->Update();
    world->Render(framebuffer);
}

Recently Browsing 0

  • No registered users viewing this page.