Okay back to the old text stuff for now :( Let's fix scroll feel by multiplying in the screen scale factor? Why not right?
This commit is contained in:
parent
67e294c0d5
commit
3c77835e6f
|
@ -25,7 +25,11 @@ custom_layer_init(Application_Links *app){
|
|||
// NOTE(allen): default hooks and command maps
|
||||
set_all_default_hooks(app);
|
||||
mapping_init(tctx, &framework_mapping);
|
||||
#if OS_MAC
|
||||
setup_mac_mapping(&framework_mapping, mapid_global, mapid_file, mapid_code);
|
||||
#else
|
||||
setup_default_mapping(&framework_mapping, mapid_global, mapid_file, mapid_code);
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif //FCODER_DEFAULT_BINDINGS
|
||||
|
|
|
@ -1046,15 +1046,11 @@ set_all_default_hooks(Application_Links *app){
|
|||
set_custom_hook(app, HookID_Tick, default_tick);
|
||||
set_custom_hook(app, HookID_RenderCaller, default_render_caller);
|
||||
set_custom_hook(app, HookID_WholeScreenRenderCaller, default_whole_screen_render_caller);
|
||||
#if 0
|
||||
set_custom_hook(app, HookID_DeltaRule, original_delta);
|
||||
set_custom_hook_memory_size(app, HookID_DeltaRule,
|
||||
delta_ctx_size(original_delta_memory_size));
|
||||
#else
|
||||
|
||||
set_custom_hook(app, HookID_DeltaRule, fixed_time_cubic_delta);
|
||||
set_custom_hook_memory_size(app, HookID_DeltaRule,
|
||||
delta_ctx_size(fixed_time_cubic_delta_memory_size));
|
||||
#endif
|
||||
|
||||
set_custom_hook(app, HookID_BufferNameResolver, default_buffer_name_resolution);
|
||||
|
||||
set_custom_hook(app, HookID_BeginBuffer, default_begin_buffer);
|
||||
|
|
|
@ -914,7 +914,7 @@ mac_toggle_fullscreen(void){
|
|||
- (BOOL)resignFirstResponder{
|
||||
return(YES);
|
||||
}
|
||||
|
||||
#if 0
|
||||
- (void)insertText:(NSString*)text{
|
||||
u32 len = [text length];
|
||||
Scratch_Block scratch(mac_vars.tctx);
|
||||
|
@ -943,15 +943,11 @@ mac_toggle_fullscreen(void){
|
|||
|
||||
system_signal_step(0);
|
||||
}
|
||||
|
||||
#endif
|
||||
- (void)keyDown:(NSEvent*)event{
|
||||
// NOTE(yuval): Process keyboard event
|
||||
[self process_keyboard_event:event down:true];
|
||||
|
||||
[self interpretKeyEvents:[NSArray arrayWithObject:event]];
|
||||
|
||||
|
||||
#if 0
|
||||
// NOTE(yuval): Process TextInsert event
|
||||
{
|
||||
NSString *characters = [event characters];
|
||||
|
@ -993,7 +989,6 @@ mac_toggle_fullscreen(void){
|
|||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
- (void)keyUp:(NSEvent*)event{
|
||||
|
@ -1047,7 +1042,7 @@ mac_toggle_fullscreen(void){
|
|||
- (void)scrollWheel:(NSEvent *)event{
|
||||
f32 dx = event.scrollingDeltaX;
|
||||
f32 dy = event.scrollingDeltaY;
|
||||
mac_vars.input_chunk.trans.mouse_wheel = (i32)(-dy);
|
||||
mac_vars.input_chunk.trans.mouse_wheel = (i32)(-dy*mac_vars.screen_scale_factor);
|
||||
system_signal_step(0);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue