@@ -301,7 +301,7 @@ package body core is | |||||
cursor.x := ray.get_mouse_x; | cursor.x := ray.get_mouse_x; | ||||
cursor.y := ray.get_mouse_y; | 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; | ray.end_drawing; | ||||
-- | -- | ||||
@@ -128,6 +128,8 @@ procedure main is | |||||
others => core.idle'access | others => core.idle'access | ||||
); | ); | ||||
a, b, c : core.sprite; | |||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ||||
begin | 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); | screen_view_icon (index) := core.import_sprite ("./sprite/ui/icon/" & core.lowercase (screen_view'image (index)) & ".png", 1, 1); | ||||
end loop; | 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 | gameplay: loop | ||||
@@ -205,7 +211,13 @@ begin | |||||
-- | -- | ||||
menu_render; | 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; | chad.draw_alice; | ||||
-- | -- | ||||
@@ -89,12 +89,12 @@ package body ui is | |||||
draw (index, x + (width / step) * step, y, width mod step, sprite (active, index).height); | draw (index, x + (width / step) * step, y, width mod step, sprite (active, index).height); | ||||
end if; | 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; | 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); | draw (index, x, y + (height / step) * step, sprite (active, index).width, height mod step); | ||||
end if; | 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; | end draw_vertically; | ||||
------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ||||
@@ -13,9 +13,9 @@ package ui is | |||||
fairy, dwarf, gnoll, kobold, goblin, imp | 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 | |||||
--~); | |||||
------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ||||