forked from arianne/stendhal
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
482e7af
commit 19420fd
Showing
4 changed files
with
43 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -320,6 +320,7 @@ div.logcolR { | |
flex: 1; | ||
height: auto; | ||
overflow: hidden; | ||
position: absolute; | ||
} | ||
|
||
#equipmentborder { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/*************************************************************************** | ||
* Copyright © 2024 - Faiumoni e. V. * | ||
*************************************************************************** | ||
* * | ||
* This program is free software; you can redistribute it and/or modify * | ||
* it under the terms of the GNU Affero General Public License as * | ||
* published by the Free Software Foundation; either version 3 of the * | ||
* License, or (at your option) any later version. * | ||
* * | ||
***************************************************************************/ | ||
|
||
import { Panel } from "./toolkit/Panel"; | ||
import { singletons } from "../SingletonRepo"; | ||
|
||
|
||
export class ChatPanel extends Panel { | ||
|
||
constructor() { | ||
super("bottomPanel"); | ||
// hide until display is ready | ||
this.setVisible(false); | ||
} | ||
|
||
/** | ||
* Updates element using viewport attributes. | ||
*/ | ||
public override refresh() { | ||
const rect = singletons.getViewPort().getElement().getBoundingClientRect(); | ||
const halfHeight = Math.abs(rect.height / 2); | ||
this.componentElement.style["width"] = rect.width + "px"; | ||
this.componentElement.style["height"] = halfHeight + "px"; | ||
this.componentElement.style["left"] = rect.left + "px"; | ||
this.componentElement.style["top"] = (rect.top + halfHeight) + "px"; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters