Changeset - c6a333984425
[Not reviewed]
default
0 2 1
silverwing - 5 years ago 2019-10-02 19:49:48

[upd] Make mobile theme more usable
3 files changed with 17 insertions and 2 deletions:
0 comments (0 inline, 0 general)
images/divisor.png
Show inline comments
 
new file 100644
 
binary diff not shown
Show images
themes/mobile/theme.ini
Show inline comments
 
@@ -13,21 +13,21 @@ win.up.y = -1
 
win.down.x = 524
 
win.down.y = -1
 
win.fnt.name = {fonts/kelvinch-roman,fonts/kelvinch-italic,fonts/kelvinch-italic}.otf
 
win.fnt.size = 24
 
win.fnt.height = 1.1
 

	
 
win.ways.mode = bottom
 
win.ways.mode = top
 
win.col.fg = #401000
 
win.col.link = #b02c00
 
win.col.alink = #606060
 
win.gfx.up = ui_up.png
 
win.gfx.down = ui_down.png
 

	
 
scr.gfx.bg = bg.png
 
scr.gfx.mode = fixed
 
scr.gfx.mode = embedded
 
scr.gfx.scalable = 1
 

	
 
inv.x = 16
 
inv.y = 732
 
inv.w = 508
 
inv.h = 180
utils.lua
Show inline comments
 
@@ -84,12 +84,18 @@ EngineUtils = {
 
                name, stead.tostring(s.disp),
 
                stead.deref(s.where), stead.deref(s.nam));
 
            h:write(t);
 
        end
 
        stead.savemembers(h, s, name, false);
 
    end;
 
    empty_pic = function(s)
 
        if theme.name() == '.mobile' then
 
            return 'images/divisor.png';
 
        end;
 
        return false;
 
    end;
 
};
 
 
function toggle(obj)
 
    if obj:disabled() then
 
        obj:enable();
 
    else
 
@@ -131,12 +137,16 @@ function kh_vroom(disp, target, nam, see
 
        seen_level = seen_level;
 
    };
 
end;
 
 
if not kh_utils_installed then
 
    room = inherit(room, function(v)
 
        if v.pic == nil then
 
            v.pic = _kh.empty_pic;
 
        end;
 
 
        v.entered = stead.hook(v.entered, function(f, s, ...)
 
            if s.showhp then
 
                hp_indicator:enable();
 
            else
 
                hp_indicator:disable();
 
            end;
 
@@ -145,12 +155,17 @@ if not kh_utils_installed then
 
 
        return v;
 
    end);
 
 
    dlg = inherit(dlg, function(v)
 
        v.hideinv = true;
 
 
        if v.pic == _kh.empty_pic then
 
            v.pic = nil;
 
        end;
 
 
        return v;
 
    end);
 
 
    obj = inherit(obj, function(v)
 
        v.disable_implicit = hook(v.disable, function(f, s, ...)
 
            s._disabled_implicit = true;
0 comments (0 inline, 0 general)