Minor testing changes...

This commit is contained in:
Ognjen Milan Robovic 2024-05-03 06:49:12 -04:00
parent 0ae392dbd3
commit 7253eb25cb
4 changed files with 29 additions and 17 deletions

View File

@ -301,7 +301,7 @@ package body core is
cursor.x := ray.get_mouse_x;
cursor.y := ray.get_mouse_y;
--
ray.draw_fps (window_width - 100, window_height - 100);
--~ray.draw_fps (window_width - 100, window_height - 100);
--
ray.end_drawing;
--

View File

@ -128,6 +128,8 @@ procedure main is
others => core.idle'access
);
a, b, c : core.sprite;
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
begin
@ -167,6 +169,10 @@ begin
screen_view_icon (index) := core.import_sprite ("./sprite/ui/icon/" & core.lowercase (screen_view'image (index)) & ".png", 1, 1);
end loop;
a := core.import_sprite ("./sprite/magic/fire/fireball.png", 1, 1);
b := core.import_sprite ("./sprite/magic/light/heal.png", 1, 1);
c := core.import_sprite ("./sprite/magic/dark/torment.png", 1, 1);
------------------------------------------------------------------------------------------
gameplay: loop
@ -205,7 +211,13 @@ begin
--
menu_render;
--
--~ui.draw_fill_bar (64, core.window_height - 56, 320, 0.7);
core.draw (a, 64*1, core.window_height - 56 - 64);
core.draw (b, 64*2, core.window_height - 56 - 64);
core.draw (c, 64*3, core.window_height - 56 - 64);
ui.draw_icon_menu ("", 64*1, core.window_height - 56 - 64, 64, 64, null);
ui.draw_icon_menu ("", 64*2, core.window_height - 56 - 64, 64, 64, null);
ui.draw_icon_menu ("", 64*3, core.window_height - 56 - 64, 64, 64, null);
ui.draw_fill_bar (64*4, core.window_height - 56, 320, 0.7);
--
chad.draw_alice;
--

View File

@ -89,12 +89,12 @@ package body ui is
draw (index, x + (width / step) * step, y, width mod step, sprite (active, index).height);
end if;
--
if core.cursor.x > x and core.cursor.x < x + width
and core.cursor.y > y and core.cursor.y < y + sprite (active, index).height
and core.cursor_mode = 1 then
action.all;
core.cursor_mode := 0;
end if;
--~if core.cursor.x > x and core.cursor.x < x + width
--~and core.cursor.y > y and core.cursor.y < y + sprite (active, index).height
--~and core.cursor_mode = 1 then
--~action.all;
--~core.cursor_mode := 0;
--~end if;
end draw_horizontally;
------------------------------------------------------------------------------------------
@ -110,12 +110,12 @@ package body ui is
draw (index, x, y + (height / step) * step, sprite (active, index).width, height mod step);
end if;
--
if core.cursor.x > x and core.cursor.x < x + sprite (active, index).width
and core.cursor.y > y and core.cursor.y < y + height
and core.cursor_mode = 1 then
action.all;
core.cursor_mode := 0;
end if;
--~if core.cursor.x > x and core.cursor.x < x + sprite (active, index).width
--~and core.cursor.y > y and core.cursor.y < y + height
--~and core.cursor_mode = 1 then
--~action.all;
--~core.cursor_mode := 0;
--~end if;
end draw_vertically;
------------------------------------------------------------------------------------------

View File

@ -13,9 +13,9 @@ package ui is
fairy, dwarf, gnoll, kobold, goblin, imp
);
type enumeration is (
gui_button, gui_line, gui_text, gui_icon, gui_sprite, gui_list
);
--~type enumeration is (
--~gui_button, gui_line, gui_text, gui_icon, gui_sprite, gui_list
--~);
------------------------------------------------------------------------------------------