Skip to content

Commit

Permalink
v2.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
JannisX11 committed Feb 3, 2019
1 parent cb1f099 commit 2932389
Show file tree
Hide file tree
Showing 38 changed files with 2,077 additions and 1,478 deletions.
85 changes: 80 additions & 5 deletions css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@
text-transform: none;
line-height: 1;
font-size: 1.4em;
max-width: 24px;

Better Font Rendering ===========
-webkit-font-smoothing: antialiased;
Expand Down Expand Up @@ -656,6 +657,9 @@
height: 100%;
width: 100%;
}
body.display_mode .single_canvas_wrapper {
position: relative;
}
.quad_canvas_wrapper {
height: 50%;
width: 50%;
Expand Down Expand Up @@ -714,7 +718,6 @@
.tool {
height: 32px;
width: 40px;
padding-top: 4px;
margin-left: 1px;
margin-right: 1px;
background: transparent;
Expand All @@ -725,6 +728,10 @@
float: left;
color: var(--color-text);
}
.tool i {
display: inline-block;
margin-top: 4px;
}

.tool.sel {
border-bottom: 4px solid var(--color-accent);
Expand Down Expand Up @@ -790,7 +797,7 @@
padding-right: 5px;
padding-top: 2px;
color: var(--color-text_acc);
margin-top: -3px;
margin-top: 32px;
display: none;
background: var(--color-bright_ui);
white-space: nowrap;
Expand Down Expand Up @@ -871,10 +878,12 @@
cursor: default;
text-align: center;
font-size: 0.9em;
padding-top: 5px;
float: left;
overflow: hidden;
}
.panel#uv .tabs_small label {
padding-top: 4px;
}

.tabs_small {
background-color: transparent;
Expand Down Expand Up @@ -1060,8 +1069,74 @@
background-color: var(--color-text);
}

/*Action Select*/
#action_selector {
position: absolute;
right: 0;
left: 0;
margin-left: auto;
margin-right: auto;
top: 200px;
width: 360px;
height: 42px;
box-shadow: 0 0 5px black;
}
#action_selector > input {
width: 100%;
height: 42px;
padding: 5px;
padding-left: 12px;
background-color: var(--color-ui);
border: 1px solid var(--color-border);
}
#action_selector > i {
position: absolute;
right: 6px;
top: 9px;
}
#action_selector > ul {
background-color: var(--color-bright_ui);
color: var(--color-text_acc);
min-height: 20px;
width: 300px;
margin-left: 8px;
box-shadow: 0 0 5px black;
max-height: 400px;
overflow-y: auto;
overflow-x: hidden;
}
#action_selector > ul > li {
padding: 4px;
}
#action_selector > ul > li.selected {
background-color: var(--color-accent);
}
#action_selector > ul > li div.icon_wrapper {
display: inline-block;
height: 26px;
vertical-align: text-top;
}






#bar_item_list {
max-height: 400px;
margin-bottom: 20px;
overflow-y: scroll;
min-height: 80px;
border: 1px solid var(--color-border);
border-right: none;
}
#bar_item_list li {
padding: 4px;
}
#bar_item_list li:hover {
color: var(--color-light);
}

/*Textures*/
.texture {
height: 50px;
Expand Down Expand Up @@ -1583,7 +1658,7 @@
color: var(--color-light);
}

#keybindlist li div:first-child {
#keybindlist li > div:first-child {
background: transparent;
width: calc(52% - 28px);
text-align: right;
Expand Down Expand Up @@ -2051,7 +2126,7 @@
font-size: 0.9em;
padding: 3px;
float: left;
margin-top: 7px;
margin-top: 6px;
}
#plugin_list li .title i.plugin_expand_icon {
display: none;
Expand Down
75 changes: 44 additions & 31 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<script>
if (typeof module === 'object') {window.module = module; module = undefined;}//jQuery Fix
const isApp = typeof require !== 'undefined';
const appVersion = '2.3.2';
const appVersion = '2.4.0';
</script>
<script src="lib/vue.min.js"></script>
<script src="lib/vue_sortable.js"></script>
Expand All @@ -38,10 +38,10 @@

<script src="js/language.js"></script>
<script src="js/util.js"></script>
<script src="js/keyboard.js"></script>
<script src="js/settings.js"></script>
<script src="js/actions.js"></script>
<script src="js/blockbench.js"></script>
<script src="js/keyboard.js"></script>
<script src="js/settings.js"></script>
<script src="js/undo.js"></script>

<script type="text/javascript">
Expand Down Expand Up @@ -107,33 +107,33 @@ <h2 class="dialog_handle tl">dialog.plugins.title</h2>
</div>
</div>
<ul class="list" id="plugin_list">
<li v-for="plugin in installedPlugins" v-bind:plugin="plugin.id" v-bind:class="{testing: plugin.fromFile, expanded: plugin.expanded}">
<div class="title" v-on:click="toggleInfo(plugin)">
<li v-for="plugin in plugin_search" v-bind:plugin="plugin.id" v-bind:class="{testing: plugin.fromFile, expanded: plugin.expanded}">
<div class="title" v-on:click="plugin.toggleInfo()">
<i v-if="plugin.icon.substr(0,3) !== 'fa-' " class="material-icons plugin_icon">{{ plugin.icon }}</i>
<i v-else class="fa fa_big plugin_icon" v-bind:class="plugin.icon"></i>

<i v-if="plugin.expanded" class="material-icons plugin_expand_icon">expand_less</i>
<i v-else class="material-icons plugin_expand_icon">expand_more</i>
{{ plugin.title }}
</div>
<div class="button_bar" v-if="checkIfInstallable(plugin) === true">
<button type="button" class="" v-on:click="uninstall(plugin)" v-if="plugin.installed"><i class="material-icons">delete</i><span class="tl">dialog.plugins.uninstall</span></button>
<button type="button" class="" v-on:click="install(plugin)" v-else><i class="material-icons">add</i><span class="tl">dialog.plugins.install</span></button>
<div class="button_bar" v-if="plugin.isInstallable()">
<button type="button" class="" v-on:click="plugin.uninstall()" v-if="plugin.installed"><i class="material-icons">delete</i><span class="tl">dialog.plugins.uninstall</span></button>
<button type="button" class="" v-on:click="plugin.download()" v-else><i class="material-icons">add</i><span class="tl">dialog.plugins.install</span></button>
<button type="button" class="local_only" v-on:click="plugin.reload()" v-if="plugin.installed && plugin.fromFile && isApp"><i class="material-icons">refresh</i><span class="tl">dialog.plugins.reload</span></button>
</div>
<div class="button_bar tiny tl" v-else>{{ checkIfInstallable(plugin) }}</div>

<div class="author">{{ tl('dialog.plugins.author', [plugin.author]) }}</div>
<div class="description">{{ plugin.description }}</div>
<div v-if="plugin.expanded" class="about" v-html="plugin.about"><button>a</button></div>
<div v-if="plugin.expanded" class="tl" v-on:click="toggleInfo(plugin)" style="text-decoration: underline;">dialog.plugins.show_less</div>
<div v-if="plugin.expanded" class="tl" v-on:click="plugin.toggleInfo()" style="text-decoration: underline;">dialog.plugins.show_less</div>
</li>
<div class="no_plugin_message tl" v-if="installedPlugins.length < 1 && showAll === false">dialog.plugins.none_installed</div>
<div class="no_plugin_message tl" v-if="installedPlugins.length < 1 && showAll === true" id="plugin_available_empty">dialog.plugins.none_available</div>
<div class="no_plugin_message tl" v-if="plugin_search.length < 1 && showAll === false">dialog.plugins.none_installed</div>
<div class="no_plugin_message tl" v-if="plugin_search.length < 1 && showAll === true" id="plugin_available_empty">dialog.plugins.none_available</div>
</ul>

<div class="dialog_bar">
<button type="button" class="large cancel_btn confirm_btn uc_btn tl" onclick="saveInstalledPlugins()">dialog.close</button>
<button type="button" class="large cancel_btn confirm_btn uc_btn tl" onclick="saveInstalledPlugins();hideDialog();">dialog.close</button>
</div>
<div id="dialog_close_button" onclick="$('.dialog#'+open_dialog).find('.cancel_btn:not([disabled])').click()"><i class="material-icons">clear</i></div>
</div>
Expand All @@ -145,8 +145,8 @@ <h2 class="dialog_handle tl">dialog.toolbar_edit.title</h2>
<li v-for="item in currentBar" v-bind:title="item.name" :key="item.id||item">
<div v-if="typeof item === 'string'" class="toolbar_separator"></div>
<div v-else class="tool">
<span class="icon_wrapper" v-bind:style="{opacity: BARS.condition(item.condition) ? 1 : 0.4}" v-html="Blockbench.getIconNode(item.icon, item.color).outerHTML"></span>
<div class="tooltip">{{item.name + (BARS.condition(item.condition) ? '' : ' (' + tl('dialog.toolbar_edit.hidden') + ')' )}}</div>
<span class="icon_wrapper" v-bind:style="{opacity: BARS.condition(item.condition) ? 1 : 0.4}" v-html="Blockbench.getIconNode(item.icon, item.color).outerHTML"></span>
</div>
</li>
</ul>
Expand All @@ -167,7 +167,7 @@ <h2 class="dialog_handle tl">dialog.toolbar_edit.title</h2>
</ul>

<div class="dialog_bar">
<button type="button" class="large cancel_btn confirm_btn uc_btn tl" onclick="saveInstalledPlugins()">dialog.close</button>
<button type="button" class="large cancel_btn confirm_btn uc_btn tl" onclick="saveInstalledPlugins();hideDialog();">dialog.close</button>
</div>
<div id="dialog_close_button" onclick="$('.dialog#'+open_dialog).find('.cancel_btn:not([disabled])').click()"><i class="material-icons">clear</i></div>
</div>
Expand Down Expand Up @@ -228,10 +228,10 @@ <h2 class="dialog_handle tl" id="te_title">dialog.texture.title</h2>
<div id="texture_menu_thumbnail"></div>

<div class="bar">
<div class="tool link_only" onclick="textures.selected.reopen()"><i class="material-icons">file_upload</i><div class="tooltip tl">menu.texture.change</div></div>
<div class="tool link_only" onclick="textures.selected.refresh(true)"><i class="material-icons">refresh</i><div class="tooltip tl">menu.texture.refresh</div></div>
<div class="tool link_only" onclick="textures.selected.openFolder()"><i class="material-icons">folder</i><div class="tooltip tl">menu.texture.folder</div></div>
<div class="tool" onclick="textures.selected.remove()"><i class="material-icons">delete</i><div class="tooltip tl">menu.texture.delete</div></div>
<div class="tool link_only" onclick="textures.selected.reopen()"><div class="tooltip tl">menu.texture.change</div><i class="material-icons">file_upload</i></div>
<div class="tool link_only" onclick="textures.selected.refresh(true)"><div class="tooltip tl">menu.texture.refresh</div><i class="material-icons">refresh</i></div>
<div class="tool link_only" onclick="textures.selected.openFolder()"><div class="tooltip tl">menu.texture.folder</div><i class="material-icons">folder</i></div>
<div class="tool" onclick="textures.selected.remove()"><div class="tooltip tl">menu.texture.delete</div><i class="material-icons">delete</i></div>
</div>

<p class="multiline_text" id="te_path">path</p>
Expand Down Expand Up @@ -291,6 +291,7 @@ <h2 class="dialog_handle tl">dialog.scale.title</h2>
<div class="dialog_bar">
<button type="button" onclick="scaleAll(true)" class="large confirm_btn tl">dialog.scale.confirm</button>
<button type="button" class="large cancel_btn tl" onclick="cancelScaleAll()">dialog.cancel</button>
<button type="button" class="large hidden tl" id="scale_overflow_btn" onclick="scaleAllSelectOverflow()">dialog.scale.select_overflow</button>
</div>
<div id="dialog_close_button" onclick="$('.dialog#'+open_dialog).find('.cancel_btn:not([disabled])').click()"><i class="material-icons">clear</i></div>
</div>
Expand Down Expand Up @@ -474,12 +475,12 @@ <h3 v-on:click="toggleCategory(category)"><i class="material-icons">{{ category.
<div>{{action.name}}</div>
<div class="keybindslot" v-on:click.stop="record(action)">{{ action.keybind ? action.keybind.label : '' }}</div>
<div class="tool" v-on:click="reset(action)">
<i class="material-icons">replay</i>
<div class="tooltip tl">keybindings.reset</div>
<i class="material-icons">replay</i>
</div>
<div class="tool" v-on:click="clear(action)">
<i class="material-icons">clear</i>
<div class="tooltip tl">keybindings.clear</div>
<i class="material-icons">clear</i>
</div>
</li>
</ul>
Expand Down Expand Up @@ -681,6 +682,17 @@ <h2 class="dialog_handle tl">dialog.input.title</h2>

<div id="plugin_dialog_wrapper"></div>

<div id="action_selector" v-if="open">
<input type="text" v-model="search_input">
<i class="material-icons" id="action_search_bar_icon">search</i>
<ul>
<li v-for="(item, i) in actions" v-on:click="ActionControl.click(item, $event)" v-bind:class="{selected: i === index}" v-on:mouseenter="index = i">
<div class="icon_wrapper normal" v-html="Blockbench.getIconNode(item.icon, item.color).outerHTML"></div>
{{ item.name }}
</li>
</ul>
</div>

<header>
<div id="title">
<span>Blockbench</span>
Expand Down Expand Up @@ -727,26 +739,26 @@ <h2 class="dialog_handle tl">dialog.input.title</h2>
<p class="tl">display.slot</p>
<div id="display_bar" class="bar tabs_small">
<input class="hidden" type="radio" name="display" id="thirdperson_righthand" checked>
<label class="tool" for="thirdperson_righthand" onclick="DisplayMode.loadThirdRight()"><i class="material-icons">accessibility</i><div class="tooltip tl">display.slot.third_right</div></label>
<label class="tool" for="thirdperson_righthand" onclick="DisplayMode.loadThirdRight()"><div class="tooltip tl">display.slot.third_right</div><i class="material-icons">accessibility</i></label>
<input class="hidden" type="radio" name="display" id="thirdperson_lefthand">
<label class="tool" for="thirdperson_lefthand" onclick="DisplayMode.loadThirdLeft()"><i class="material-icons">accessibility</i><div class="tooltip tl">display.slot.third_left</div></label>
<label class="tool" for="thirdperson_lefthand" onclick="DisplayMode.loadThirdLeft()"><div class="tooltip tl">display.slot.third_left</div><i class="material-icons">accessibility</i></label>

<input class="hidden" type="radio" name="display" id="firstperson_righthand">
<label class="tool" for="firstperson_righthand" onclick="DisplayMode.loadFirstRight()"><i class="material-icons">person</i><div class="tooltip tl">display.slot.first_right</div></label>
<label class="tool" for="firstperson_righthand" onclick="DisplayMode.loadFirstRight()"><div class="tooltip tl">display.slot.first_right</div><i class="material-icons">person</i></label>
<input class="hidden" type="radio" name="display" id="firstperson_lefthand">
<label class="tool" for="firstperson_lefthand" onclick="DisplayMode.loadFirstLeft()"><i class="material-icons">person</i><div class="tooltip tl">display.slot.first_left</div></label>
<label class="tool" for="firstperson_lefthand" onclick="DisplayMode.loadFirstLeft()"><div class="tooltip tl">display.slot.first_left</div><i class="material-icons">person</i></label>

<input class="hidden" type="radio" name="display" id="head">
<label class="tool" for="head" onclick="DisplayMode.loadHead()"><i class="material-icons">sentiment_satisfied</i><div class="tooltip tl">display.slot.head</div></label>
<label class="tool" for="head" onclick="DisplayMode.loadHead()"><div class="tooltip tl">display.slot.head</div><i class="material-icons">sentiment_satisfied</i></label>

<input class="hidden" type="radio" name="display" id="ground">
<label class="tool" for="ground" onclick="DisplayMode.loadGround()"><i class="icon-ground"></i><div class="tooltip tl">display.slot.ground</div></label>
<label class="tool" for="ground" onclick="DisplayMode.loadGround()"><div class="tooltip tl">display.slot.ground</div><i class="icon-ground"></i></label>

<input class="hidden" type="radio" name="display" id="fixed">
<label class="tool" for="fixed" onclick="DisplayMode.loadFixed()"><i class="material-icons">filter_frames</i><div class="tooltip tl">display.slot.frame</div></label>
<label class="tool" for="fixed" onclick="DisplayMode.loadFixed()"><div class="tooltip tl">display.slot.frame</div><i class="material-icons">filter_frames</i></label>

<input class="hidden" type="radio" name="display" id="gui">
<label class="tool" for="gui" onclick="DisplayMode.loadGUI()"><i class="material-icons">border_style</i><div class="tooltip tl">display.slot.gui</div></label>
<label class="tool" for="gui" onclick="DisplayMode.loadGUI()"><div class="tooltip tl">display.slot.gui</div><i class="material-icons">border_style</i></label>
</div>
<p class="reference_model_bar tl">display.reference</p>
<div id="display_ref_bar" class="bar tabs_small reference_model_bar">
Expand All @@ -773,7 +785,8 @@ <h2 class="dialog_handle tl">dialog.input.title</h2>
<p class="tl">display.scale</p><div class="tool head_right" v-on:click="resetChannel('scale')"><i class="material-icons">replay</i></div>
<div class="bar" v-for="axis in [0, 1, 2]">
<div class="tool display_scale_invert" v-on:click="invert(axis)">
<i class="material-icons">{{ slot.mirror[axis] ? 'check_box' : 'check_box_outline_blank' }}</i><div class="tooltip tl">display.mirror</div>
<div class="tooltip tl">display.mirror</div>
<i class="material-icons">{{ slot.mirror[axis] ? 'check_box' : 'check_box_outline_blank' }}</i>
</div>
<input type="range" class="tool disp_range scaleRange" v-model.number="slot.scale[axis]" v-bind:trigger_type="'scale.'+axis" v-bind:id="'scale_range_'+axis"
v-bind:min="slot.scale[axis] > 1 ? -2 : 0"
Expand Down Expand Up @@ -831,7 +844,7 @@ <h2 class="dialog_handle tl">dialog.input.title</h2>
<li
v-for="texture in textures"
v-bind:class="{ selected: texture.selected, particle: texture.particle}"
v-bind:texid="texture.id"
v-bind:texid="texture.uuid"
class="texture"
v-on:click.stop="texture.select($event)"
v-on:dblclick="texture.openMenu($event)"
Expand Down Expand Up @@ -909,7 +922,7 @@ <h2 class="dialog_handle tl">dialog.input.title</h2>
<div id="timeline_lines"></div>
</div>
</div>
<div id="status_bar">
<div id="status_bar" @contextmenu="Interface.status_bar.menu.show(event);console.log(true);">
<div id="status_saved">
<i class="material-icons" v-if="Prop.project_saved" v-bind:title="tl('status_bar.saved')">check</i>
<i class="material-icons" v-else v-bind:title="tl('status_bar.unsaved')">close</i>
Expand Down
Loading

0 comments on commit 2932389

Please sign in to comment.