Nanawatai Posted March 3, 2017 Share Posted March 3, 2017 I am attempting to move my hitlog to the bottom left-hand corner, in the space where the current damage log resides (which is disabled now and will be moved elsewhere). In the past, I populated the "y" coordinate with a negative value so that it would hug the bottom of the screen regardless of screen resolution. Here was the code that I used: // X position (negative values - bind to right side of screen). "x": 250, // Y position (negative values - bind to bottom side of screen). "y": -100, // Width. "w": 400, // Height. "h": 100, // Number of lines with hits. Old lines will be pushed out. "lines": 4, // Log direction: up - lines will be added from up to down, down - from down to up. "direction": "down", However, that no longer seems to work. I've modified the two hitlog entries in battleLabelsTemplates.xc, like so: "hitlogHeader": { "enabled": true, "updateEvent": "ON_DAMAGE_CAUSED, ON_PANEL_MODE_CHANGED", "x": 250, "y": -228, "width": 400, "height": 20, "textFormat": { "color": "0xF4EFE8", "size": 15 }, "format": "{{hitlog-header}}" // Format of the full hitlog (header and body) // "format": "{{hitlog-header}}\n{{hitlog-body}}" }, "hitlogBody": { "enabled": true, "hotKeyCode": 56, "onHold": "true", "visibleOnHotKey": false, "updateEvent": "ON_DAMAGE_CAUSED, ON_PANEL_MODE_CHANGED", "x": 250, "y": -218, "width": 400, "height": 180, "textFormat": { "color": "0xF4EFE8", "size": 15 }, "format": "{{hitlog-body}}" }, ... but when I use a negative integer in the "y" variable, the hitlog disappears from view. I noticed that def.damageLog uses Python macros for its X,Y assignments, but I don't think it will be suitable for my purpose. What do I need to do in order to place the hitlog in the bottom left corner, next to the damage status, and have it work for different users and their different screen resolutions? Is there a Python macro that will give me screen resolution width and height, allowing me to apply py:math.sub(a, b)? Спасибо, and thanks in advance. @ Quote Link to comment Short link Share on other sites More sharing options...
scyorkie Posted March 3, 2017 Share Posted March 3, 2017 (edited) My damageLog section in battleLabelsTemplates currently contains the following: "x": 240, "y": -23, "width": 310, "height": 207, "screenVAlign": "bottom", "x" moves it away from the left border of the screen, and a negative "y" moves (I think) the bottom of the damageLog away from the bottom of the screen when screenVAlign=bottom. Use the same screenVAlign=bottom for your hitlog sections? Edited March 3, 2017 by scyorkie @ Quote Link to comment Short link Share on other sites More sharing options...
Nanawatai Posted March 3, 2017 Author Share Posted March 3, 2017 (edited) Thanks for your response, @scyorkie. I ended up disabling def.hitlogBody and modifying def.hitlogHeader like so: "hitlogHeader": { "enabled": true, "updateEvent": "ON_DAMAGE_CAUSED, ON_PANEL_MODE_CHANGED", "x": 242, "y": -30, "width": 420, "height": 160, "screenVAlign": "bottom", "textFormat": { "color": "0xF4EFE8", "size": 15 }, "format": "{{hitlog-header}}\n{{hitlog-body}}" // Format of the full hitlog (header and body) // "format": "{{hitlog-header}}\n{{hitlog-body}}" }, You were right - adding "screenVAlign" made all the difference. The only thing I couldn't figure out was the Y coordinate -- it took several tries before I landed it where I needed the hitlog to sit on the screen. I have no idea what the negative 30 pixels is in relation to. Thanks again. Edited March 3, 2017 by Nanawatai @ Quote Link to comment Short link Share on other sites More sharing options...
scyorkie Posted March 3, 2017 Share Posted March 3, 2017 (edited) When screenVAlign=top, the X and Y coordinates determine where the top left corner of your hitlog starts. When screenVAlign=bottom, the X and Y coordinates determine where the bottom left corner of your hitlog will be. A negative Y value moves that corner up from the bottom of the screen. Then your height value determines where the top of your hitlog starts. So in my settings above, the top left corner of my damageLog is 240 pixels from the left of the screen, and 230 (23+207) pixels from the bottom. In yours, the top left corner is 160 pixels from the bottom. You're replacing the vanilla client's hitlog with the XVM hitlog. I've done that before and 160 was just right for me as well. Edited March 3, 2017 by scyorkie 1 @ Quote Link to comment Short link Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.