Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
openshwprojects committed Apr 11, 2023
2 parents d441a9d + df313ae commit 73c918c
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 5 deletions.
13 changes: 12 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,18 @@ output/**
node_modules
Debug*/**
libs_for_simulator/**
*.user
DevIL.dll
freeglut.dll
ILU.dll
ILUT.dll
SDL2.dll
nfd_d.lib
/sim_lastPublish_long.txt
/sim_lastPublishes.txt
/sim_lastPublish.txt
/lastMQTTPublishSentByOBK.txt
*.sln

# MacOS ignores
.DS_Store

2 changes: 1 addition & 1 deletion src/sim/Shape.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ float CShape::drawInformation2D(float x, float h) {
if (shapes.size()) {
h = drawText(NULL, x, h, "SubShapes: %i", shapes.size());
for (int i = 0; i < shapes.size(); i++) {
h = drawText(NULL, x + 20, h, "SubShape: %i/%i", i, shapes.size());
h = drawText(NULL, x + 20, h, "SubShape: %i/%i", i+1, shapes.size());
h = shapes[i]->drawInformation2D(x + 40, h);
}
}
Expand Down
5 changes: 4 additions & 1 deletion src/sim/Simulator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ CSimulator::CSimulator() {
activeTool = 0;
Window = 0;
Context = 0;
WindowFlags = SDL_WINDOW_OPENGL;
WindowFlags = SDL_WINDOW_OPENGL | SDL_WINDOW_RESIZABLE;
Running = 1;
FullScreen = 0;
//setTool(new Tool_Wire());
Expand Down Expand Up @@ -129,6 +129,9 @@ void CSimulator::drawWindow() {
else if (Event.type == SDL_WINDOWEVENT) {
switch (Event.window.event) {

case SDL_WINDOWEVENT_RESIZED: // exit game
SDL_GetWindowSize(Window, &WinWidth, &WinHeight);
break;
case SDL_WINDOWEVENT_CLOSE: // exit game
onUserClose();
break;
Expand Down
4 changes: 2 additions & 2 deletions src/sim/sim_sdl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
#pragma comment (lib, "Opengl32.lib")
#pragma comment (lib, "freeglut.lib")

int WinWidth = 1680;
int WinHeight = 940;
int WinWidth = 800;
int WinHeight = 600;
#undef main

CStyle g_style_shapes(CColor(165, 75, 75), 3.0f);
Expand Down

0 comments on commit 73c918c

Please sign in to comment.