-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add support for custom styles in layoutStyle
- Loading branch information
1 parent
90d2860
commit 2e827ef
Showing
4 changed files
with
65 additions
and
5 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
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# Mod Configuration | ||
mod_name=MineMark | ||
mod_id=minemark | ||
mod_version=1.2.0 | ||
mod_version=1.2.1 | ||
mod_description=Markdown rendering library | ||
mod_license=LGPL |
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
40 changes: 40 additions & 0 deletions
40
src/main/java/dev/dediamondpro/minemark/utils/StyleType.java
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,40 @@ | ||
/* | ||
* This file is part of MineMark | ||
* Copyright (C) 2024 DeDiamondPro | ||
* | ||
* This program is free software; you can redistribute it and/or | ||
* modify it under the terms of the GNU Lesser General Public | ||
* License Version 3 as published by the Free Software Foundation. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
* Lesser General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Lesser General Public License | ||
* along with this program. If not, see <https://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
package dev.dediamondpro.minemark.utils; | ||
|
||
public class StyleType<T> { | ||
private final String id; | ||
private final Class<T> styleClass; | ||
|
||
public StyleType(String id, Class<T> styleClass) { | ||
this.id = id; | ||
this.styleClass = styleClass; | ||
} | ||
|
||
public String getId() { | ||
return id; | ||
} | ||
|
||
public Class<T> getStyleClass() { | ||
return styleClass; | ||
} | ||
|
||
public static <T> StyleType<T> of(String id, Class<T> styleClass) { | ||
return new StyleType<T>(id, styleClass); | ||
} | ||
} |