Removed trailing spaces (#2038, #2299)

This commit is contained in:
omar
2019-01-20 17:56:17 +01:00
parent e837099b67
commit 2c38b32db1
49 changed files with 314 additions and 321 deletions

View File

@ -1,4 +1,3 @@
#import <TargetConditionals.h>
#if TARGET_OS_IPHONE

View File

@ -1,4 +1,3 @@
#import "AppDelegate.h"
@implementation AppDelegate

View File

@ -1,4 +1,3 @@
#import <MetalKit/MetalKit.h>
@interface Renderer : NSObject <MTKViewDelegate>

View File

@ -1,4 +1,3 @@
#import "Renderer.h"
#import <Metal/Metal.h>
@ -50,7 +49,7 @@
io.DeltaTime = 1 / float(view.preferredFramesPerSecond ?: 60);
id<MTLCommandBuffer> commandBuffer = [self.commandQueue commandBuffer];
static bool show_demo_window = true;
static bool show_another_window = false;
static float clear_color[4] = { 0.28f, 0.36f, 0.5f, 1.0f };
@ -87,7 +86,7 @@
ImGui::Checkbox("Demo Window", &show_demo_window); // Edit bools storing our window open/close state
ImGui::Checkbox("Another Window", &show_another_window);
ImGui::SliderFloat("float", &f, 0.0f, 1.0f); // Edit 1 float using a slider from 0.0f to 1.0f
ImGui::SliderFloat("float", &f, 0.0f, 1.0f); // Edit 1 float using a slider from 0.0f to 1.0f
ImGui::ColorEdit3("clear color", (float*)&clear_color); // Edit 3 floats representing a color
if (ImGui::Button("Button")) // Buttons return true when clicked (most widgets return true when edited/activated)
@ -113,13 +112,13 @@
ImGui::Render();
ImDrawData *drawData = ImGui::GetDrawData();
ImGui_ImplMetal_RenderDrawData(drawData, commandBuffer, renderEncoder);
[renderEncoder popDebugGroup];
[renderEncoder endEncoding];
[commandBuffer presentDrawable:view.currentDrawable];
}
[commandBuffer commit];
}

View File

@ -1,4 +1,3 @@
#import <Metal/Metal.h>
#import <MetalKit/MetalKit.h>
#import "Renderer.h"

View File

@ -1,4 +1,3 @@
#import "ViewController.h"
#import "Renderer.h"
#include "imgui.h"
@ -21,9 +20,9 @@
- (void)viewDidLoad
{
[super viewDidLoad];
self.mtkView.device = MTLCreateSystemDefaultDevice();
if (!self.mtkView.device) {
NSLog(@"Metal is not supported");
abort();
@ -42,7 +41,7 @@
owner:self
userInfo:nil];
[self.view addTrackingArea:trackingArea];
// If we want to receive key events, we either need to be in the responder chain of the key view,
// or else we can install a local monitor. The consequence of this heavy-handed approach is that
// we receive events for all controls, not just Dear ImGui widgets. If we had native controls in our
@ -56,9 +55,9 @@
} else {
return event;
}
}];
ImGui_ImplOSX_Init();
#endif
}
@ -97,7 +96,7 @@
CGPoint touchLocation = [anyTouch locationInView:self.view];
ImGuiIO &io = ImGui::GetIO();
io.MousePos = ImVec2(touchLocation.x, touchLocation.y);
BOOL hasActiveTouch = NO;
for (UITouch *touch in event.allTouches) {
if (touch.phase != UITouchPhaseEnded && touch.phase != UITouchPhaseCancelled) {

View File

@ -1,4 +1,3 @@
#import <TargetConditionals.h>
#if TARGET_OS_IPHONE