Explorar el Código

Removed old menu procedures from attribute, skill and resource packages...

master
Ognjen Milan Robovic hace 1 semana
padre
commit
9ad650eab0
Se han modificado 8 ficheros con 1 adiciones y 66 borrados
  1. +0
    -18
      source/attribute.adb
  2. +0
    -2
      source/attribute.ads
  3. +1
    -1
      source/core.adb
  4. +0
    -18
      source/resource.adb
  5. +0
    -2
      source/resource.ads
  6. +0
    -21
      source/skill.adb
  7. +0
    -2
      source/skill.ads
  8. +0
    -2
      source/ui.adb

+ 0
- 18
source/attribute.adb Ver fichero

@@ -35,24 +35,6 @@ package body attribute is
end loop;
end configure;

------------------------------------------------------------------------------------------

procedure menu (x, y : in integer; center : in boolean) is
offset : constant integer := 16;
width : constant integer := 180 + 2 * offset;
height : constant integer := count * core.icon + 2 * offset;
move_x : constant integer := (if center then (core.window_width - width) / 2 else x);
move_y : constant integer := (if center then (core.window_height - height) / 2 else y);
begin
ui.draw_tiny_menu (move_x, move_y, width, height);
ui.draw_title_bar (move_x, move_y, width, "Attributes");
--
for index in enumeration loop
ui.draw_icon (sprite (index), trait (index).text, move_x + offset, move_y + offset + enumeration'pos (index) * core.icon);
ui.write (trait (index).name, move_x + offset + core.icon, move_y + offset + enumeration'pos (index) * core.icon);
end loop;
end menu;

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

end attribute;

+ 0
- 2
source/attribute.ads Ver fichero

@@ -39,8 +39,6 @@ package attribute is

procedure configure;

procedure menu (x, y : in integer; center : in boolean);

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

end attribute;

+ 1
- 1
source/core.adb Ver fichero

@@ -349,7 +349,7 @@ package body core is
--
ray.begin_drawing;
--
ray.clear_background ((50, 60, 70, 255));
ray.clear_background ((0, 0, 0, 255));
end synchronize;

------------------------------------------------------------------------------------------


+ 0
- 18
source/resource.adb Ver fichero

@@ -35,24 +35,6 @@ package body resource is
end loop;
end configure;

------------------------------------------------------------------------------------------

procedure menu (x, y : in integer; center : in boolean) is
offset : constant integer := 16;
width : constant integer := 180 + 2 * offset;
height : constant integer := count * core.icon + 2 * offset;
move_x : constant integer := (if center then (core.window_width - width) / 2 else x);
move_y : constant integer := (if center then (core.window_height - height) / 2 else y);
begin
ui.draw_tiny_menu (move_x, move_y, width, height);
ui.draw_title_bar (move_x, move_y, width, "Resources");
--
for index in enumeration loop
ui.draw_icon (sprite (index), trait (index).text, move_x + offset, move_y + offset + enumeration'pos (index) * core.icon);
ui.write (trait (index).name, move_x + offset + core.icon, move_y + offset + enumeration'pos (index) * core.icon);
end loop;
end menu;

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

end resource;

+ 0
- 2
source/resource.ads Ver fichero

@@ -39,8 +39,6 @@ package resource is

procedure configure;

procedure menu (x, y : in integer; center : in boolean);

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

end resource;

+ 0
- 21
source/skill.adb Ver fichero

@@ -39,27 +39,6 @@ package body skill is
end loop;
end configure;

------------------------------------------------------------------------------------------

procedure e is begin core.echo (core.warning, "Heyo world!"); end e;

procedure menu (x, y : in integer; center : in boolean) is
column : constant integer := 2;
offset : constant integer := 32;
width : constant integer := 216 * column + 2 * offset;
height : constant integer := (count / column) * core.icon + 2 * offset;
move_x : constant integer := (if center then (core.window_width - width) / 2 else x);
move_y : constant integer := (if center then (core.window_height - height) / 2 else y);
begin
ui.draw_tiny_menu (move_x, move_y, width, height);
ui.draw_title_bar (move_x, move_y, width, "Skills");
--
for index in enumeration loop
ui.draw_icon (sprite (index), trait (index).text, move_x + 216 * (enumeration'pos (index) mod column) + offset, move_y + core.icon * (enumeration'pos (index) / column) + offset, e'access);
ui.write (trait (index).name, move_x + 216 * (enumeration'pos (index) mod column) + offset + core.icon, move_y + core.icon * (enumeration'pos (index) / column) + offset);
end loop;
end menu;

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

end skill;

+ 0
- 2
source/skill.ads Ver fichero

@@ -53,8 +53,6 @@ package skill is

procedure configure;

procedure menu (x, y : in integer; center : in boolean);

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

end skill;

+ 0
- 2
source/ui.adb Ver fichero

@@ -492,7 +492,6 @@ package body ui is
structure_array (structure_count - 1).gui_list (structure_array (structure_count - 1).gui_n).number := 0;
structure_array (structure_count - 1).gui_list (structure_array (structure_count - 1).gui_n).image := icon;
--
core.echo (core.import, "> button > " & text);
core.increment (structure_array (structure_count - 1).gui_n);
end add_structure_button;

@@ -502,7 +501,6 @@ package body ui is
begin
structure_array (structure_count - 1).gui_list (structure_array (structure_count - 1).gui_n).kind := gui_orient;
--
core.echo (core.import, "> orient");
core.increment (structure_array (structure_count - 1).gui_n);
end add_structure_orient;



Cargando…
Cancelar
Guardar