Minor Kobold UI theme change, and some unit menu refactoring...
@ -73,9 +73,6 @@ package body ui is
|
||||
sprite : array (style, element) of core.sprite;
|
||||
|
||||
monospace : core.font;
|
||||
--
|
||||
monowidth : constant natural := 9;
|
||||
monoheight : constant natural := 15;
|
||||
|
||||
console_message_limit : constant natural := 6;
|
||||
console_message_count : natural := 0;
|
||||
|
@ -17,6 +17,9 @@ package ui is
|
||||
|
||||
style_count : constant natural := style'pos (style'last) + 1;
|
||||
|
||||
monowidth : constant natural := 9;
|
||||
monoheight : constant natural := 15;
|
||||
|
||||
font : array (style) of core.font;
|
||||
|
||||
active : style := main;
|
||||
|
@ -1047,9 +1047,9 @@ package body world is
|
||||
--
|
||||
offset : constant integer := 8;
|
||||
width : constant integer := 640;
|
||||
height : constant integer := 600;
|
||||
more : constant natural := 10;
|
||||
less : constant natural := 5;
|
||||
height : constant integer := chad.view_height + 4 * core.icon + 2 * core.base + 3 * ui.monoheight + 2 * more + 2 * offset;
|
||||
at_x : integer := core.center_x (width) + offset;
|
||||
at_y : integer := core.center_y (height) + offset;
|
||||
begin
|
||||
@ -1062,14 +1062,17 @@ package body world is
|
||||
ui.draw_text_box (at_x, at_y, width - unit.view_width - 2 * offset, core.icon);
|
||||
ui.write (data.name.all, at_x + less, at_y + less);
|
||||
--
|
||||
at_y := at_y + core.icon;
|
||||
--
|
||||
for index in attribute.enumeration loop
|
||||
ui.draw_icon_menu (at_x, at_y, core.icon * 2, core.icon, attribute.description (index).text.all);
|
||||
if attribute.enumeration'pos (index) = attribute.count / 2 or attribute.enumeration'pos (index) = 0 then -- hack
|
||||
at_y := at_y + core.icon;
|
||||
at_x := core.center_x (width) + offset + unit.view_width;
|
||||
end if;
|
||||
--
|
||||
ui.draw_icon_menu (at_x, at_y, core.icon * 3, core.icon, attribute.description (index).text.all);
|
||||
core.draw (attribute.icon (index), at_x, at_y, factor => 1);
|
||||
ui.write (data.attributes (index)'image, at_x + core.icon + more, at_y + more, code => true);
|
||||
--
|
||||
at_x := at_x + 2 * core.icon;
|
||||
at_x := at_x + 3 * core.icon;
|
||||
end loop;
|
||||
--
|
||||
at_x := core.center_x (width) + offset;
|
||||
@ -1087,6 +1090,30 @@ package body world is
|
||||
"Stack:" & data.limit'image & character'val (10) &
|
||||
"Bonus: " & attribute.description (faction.description (data.kind).bonus_attribute).name.all,
|
||||
at_x + (width - offset) / 2, at_y, (width - 3 * offset) / 2 - 2 * more, 0, 0, more);
|
||||
--
|
||||
at_y := at_y + 3 * ui.monoheight + 2 * more;
|
||||
--
|
||||
ui.draw_separator (at_x, at_y, width - 2 * offset);
|
||||
--
|
||||
at_y := at_y + core.base - core.icon;
|
||||
--
|
||||
for index in equipment.kind loop
|
||||
if equipment.kind'pos (index) mod 2 = 0 then -- hack
|
||||
at_y := at_y + core.icon;
|
||||
at_x := core.center_x (width) + offset;
|
||||
end if;
|
||||
--
|
||||
ui.draw_icon_menu (at_x, at_y, (width - 2 * offset) / 2, core.icon, equipment.description (data.equipments (index)).name.all);
|
||||
ui.write (equipment.description (data.equipments (index)).name.all, at_x + core.icon + more, at_y + more, code => true);
|
||||
--
|
||||
if equipment.enumeration'pos (data.equipments (index)) /= equipment.enumeration'pos (equipment.none) then
|
||||
core.draw (equipment.icon (data.equipments (index)), at_x, at_y, factor => 1);
|
||||
else
|
||||
core.draw (equipment.slot (index), at_x, at_y, factor => 1);
|
||||
end if;
|
||||
--
|
||||
at_x := at_x + (width - 2 * offset) / 2;
|
||||
end loop;
|
||||
end show_unit;
|
||||
|
||||
------------------------------------------------------------------------------------------
|
||||
|
Before Width: | Height: | Size: 180 B After Width: | Height: | Size: 182 B |
Before Width: | Height: | Size: 972 B After Width: | Height: | Size: 965 B |
Before Width: | Height: | Size: 215 B After Width: | Height: | Size: 211 B |
Before Width: | Height: | Size: 687 B After Width: | Height: | Size: 646 B |