mirror of
				https://github.com/ocornut/imgui.git
				synced 2025-10-26 12:27:30 +00:00 
			
		
		
		
	This commit is contained in:
		| @@ -146,7 +146,7 @@ | |||||||
|         animationTimer = [NSTimer scheduledTimerWithTimeInterval:0.017 target:self selector:@selector(animationTimerFired:) userInfo:nil repeats:YES]; |         animationTimer = [NSTimer scheduledTimerWithTimeInterval:0.017 target:self selector:@selector(animationTimerFired:) userInfo:nil repeats:YES]; | ||||||
| } | } | ||||||
|  |  | ||||||
| -(void)reshape                              { [[self openGLContext] update]; [self updateAndDrawDemoView]; } | -(void)reshape                              { [super reshape]; [[self openGLContext] update]; [self updateAndDrawDemoView]; } | ||||||
| -(void)drawRect:(NSRect)bounds              { [self updateAndDrawDemoView]; } | -(void)drawRect:(NSRect)bounds              { [self updateAndDrawDemoView]; } | ||||||
| -(void)animationTimerFired:(NSTimer*)timer  { [self setNeedsDisplay:YES]; } | -(void)animationTimerFired:(NSTimer*)timer  { [self setNeedsDisplay:YES]; } | ||||||
| -(void)dealloc                              { animationTimer = nil; } | -(void)dealloc                              { animationTimer = nil; } | ||||||
|   | |||||||
| @@ -3080,7 +3080,7 @@ void ImFontGlyphRangesBuilder::AddText(const char* text, const char* text_end) | |||||||
| void ImFontGlyphRangesBuilder::AddRanges(const ImWchar* ranges) | void ImFontGlyphRangesBuilder::AddRanges(const ImWchar* ranges) | ||||||
| { | { | ||||||
|     for (; ranges[0]; ranges += 2) |     for (; ranges[0]; ranges += 2) | ||||||
|         for (unsigned int c = ranges[0]; c <= ranges[1] && c <= IM_UNICODE_CODEPOINT_MAX; c++) |         for (unsigned int c = ranges[0]; c <= ranges[1] && c <= IM_UNICODE_CODEPOINT_MAX; c++) //-V560 | ||||||
|             AddChar((ImWchar)c); |             AddChar((ImWchar)c); | ||||||
| } | } | ||||||
|  |  | ||||||
|   | |||||||
| @@ -3695,11 +3695,11 @@ static int  is_word_boundary_from_right(ImGuiInputTextState* obj, int idx) | |||||||
| static int  is_word_boundary_from_left(ImGuiInputTextState* obj, int idx)       { if (obj->Flags & ImGuiInputTextFlags_Password) return 0; return idx > 0 ? (!is_separator(obj->TextW[idx - 1]) && is_separator(obj->TextW[idx])) : 1; } | static int  is_word_boundary_from_left(ImGuiInputTextState* obj, int idx)       { if (obj->Flags & ImGuiInputTextFlags_Password) return 0; return idx > 0 ? (!is_separator(obj->TextW[idx - 1]) && is_separator(obj->TextW[idx])) : 1; } | ||||||
| static int  STB_TEXTEDIT_MOVEWORDLEFT_IMPL(ImGuiInputTextState* obj, int idx)   { idx--; while (idx >= 0 && !is_word_boundary_from_right(obj, idx)) idx--; return idx < 0 ? 0 : idx; } | static int  STB_TEXTEDIT_MOVEWORDLEFT_IMPL(ImGuiInputTextState* obj, int idx)   { idx--; while (idx >= 0 && !is_word_boundary_from_right(obj, idx)) idx--; return idx < 0 ? 0 : idx; } | ||||||
| static int  STB_TEXTEDIT_MOVEWORDRIGHT_MAC(ImGuiInputTextState* obj, int idx)   { idx++; int len = obj->CurLenW; while (idx < len && !is_word_boundary_from_left(obj, idx)) idx++; return idx > len ? len : idx; } | static int  STB_TEXTEDIT_MOVEWORDRIGHT_MAC(ImGuiInputTextState* obj, int idx)   { idx++; int len = obj->CurLenW; while (idx < len && !is_word_boundary_from_left(obj, idx)) idx++; return idx > len ? len : idx; } | ||||||
| static int  STB_TEXTEDIT_MOVEWORDRIGHT_WIN(ImGuiInputTextState* obj, int idx)   { idx++; int len = obj->CurLenW; while (idx < len && !is_word_boundary_from_right(obj, idx)) idx++; return idx > len ? len : idx; } |  | ||||||
| #define STB_TEXTEDIT_MOVEWORDLEFT   STB_TEXTEDIT_MOVEWORDLEFT_IMPL    // They need to be #define for stb_textedit.h | #define STB_TEXTEDIT_MOVEWORDLEFT   STB_TEXTEDIT_MOVEWORDLEFT_IMPL    // They need to be #define for stb_textedit.h | ||||||
| #ifdef __APPLE__    // FIXME: Move setting to IO structure | #ifdef __APPLE__    // FIXME: Move setting to IO structure | ||||||
| #define STB_TEXTEDIT_MOVEWORDRIGHT  STB_TEXTEDIT_MOVEWORDRIGHT_MAC | #define STB_TEXTEDIT_MOVEWORDRIGHT  STB_TEXTEDIT_MOVEWORDRIGHT_MAC | ||||||
| #else | #else | ||||||
|  | static int  STB_TEXTEDIT_MOVEWORDRIGHT_WIN(ImGuiInputTextState* obj, int idx)   { idx++; int len = obj->CurLenW; while (idx < len && !is_word_boundary_from_right(obj, idx)) idx++; return idx > len ? len : idx; } | ||||||
| #define STB_TEXTEDIT_MOVEWORDRIGHT  STB_TEXTEDIT_MOVEWORDRIGHT_WIN | #define STB_TEXTEDIT_MOVEWORDRIGHT  STB_TEXTEDIT_MOVEWORDRIGHT_WIN | ||||||
| #endif | #endif | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 ocornut
					ocornut