Added mouse wheel, text scrolling...
This commit is contained in:
parent
53a4179c40
commit
0d1b03cdd1
@ -431,6 +431,7 @@ package body core is
|
|||||||
signal := ray.get_key_pressed;
|
signal := ray.get_key_pressed;
|
||||||
cursor.x := ray.get_mouse_x;
|
cursor.x := ray.get_mouse_x;
|
||||||
cursor.y := ray.get_mouse_y;
|
cursor.y := ray.get_mouse_y;
|
||||||
|
wheel := wheel + ray.mouse_wheel_move;
|
||||||
--
|
--
|
||||||
ray.end_drawing;
|
ray.end_drawing;
|
||||||
--
|
--
|
||||||
|
@ -91,6 +91,8 @@ package core is
|
|||||||
gameplay_time : natural := 0;
|
gameplay_time : natural := 0;
|
||||||
animation_time : natural := 0;
|
animation_time : natural := 0;
|
||||||
|
|
||||||
|
wheel : float := 0.0;
|
||||||
|
|
||||||
zoom : natural := 1;
|
zoom : natural := 1;
|
||||||
|
|
||||||
block_limit : constant natural := 40;
|
block_limit : constant natural := 40;
|
||||||
|
@ -297,8 +297,8 @@ begin
|
|||||||
declare source_code_data : string_box_data;
|
declare source_code_data : string_box_data;
|
||||||
begin
|
begin
|
||||||
import_text (source_code_data, to_string (source_code (view_source_code)));
|
import_text (source_code_data, to_string (source_code (view_source_code)));
|
||||||
if cursor_mode = 1 then view_source_code := (view_source_code + 1) mod 36; cursor_mode := 0; end if;
|
if cursor_mode = 1 then view_source_code := (view_source_code + 1) mod 36; cursor_mode := 0; wheel := 0.0; end if;
|
||||||
ui.write_ada_code (source_code_data, 0, 0);
|
ui.write_ada_code (source_code_data, 0, integer (wheel) * 30);
|
||||||
end;
|
end;
|
||||||
end loop main_menu_loop;
|
end loop main_menu_loop;
|
||||||
|
|
||||||
|
@ -177,6 +177,9 @@ package ray is
|
|||||||
--~double GetTime(void);
|
--~double GetTime(void);
|
||||||
--~void OpenURL(const char *url);
|
--~void OpenURL(const char *url);
|
||||||
function load_text (file : in string) return char_array with import => true, convention => c, external_name => "LoadFileText";
|
function load_text (file : in string) return char_array with import => true, convention => c, external_name => "LoadFileText";
|
||||||
|
|
||||||
|
function mouse_wheel_move return float with import => true, convention => c, external_name => "GetMouseWheelMove";
|
||||||
|
|
||||||
--~procedure unload_file (data : in access string) with import => true, convention => c, external_name => "UnloadFileText";
|
--~procedure unload_file (data : in access string) with import => true, convention => c, external_name => "UnloadFileText";
|
||||||
--~bool SaveFileText(const char *fileName, char *text);
|
--~bool SaveFileText(const char *fileName, char *text);
|
||||||
--~FilePathList LoadDirectoryFilesEx(const char *basePath, const char *filter, bool scanSubdirs);
|
--~FilePathList LoadDirectoryFilesEx(const char *basePath, const char *filter, bool scanSubdirs);
|
||||||
|
Loading…
Reference in New Issue
Block a user