summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/ui/ui.cpp
diff options
context:
space:
mode:
author Michele Fochi aka motoschifo <michele.fochi@gmail.com>2016-02-07 11:05:55 +0100
committer Michele Fochi aka motoschifo <michele.fochi@gmail.com>2016-02-07 11:05:55 +0100
commit34bc216ef9b17e6464910fc678119a4c3670356d (patch)
tree2fe04a4eb85a2e7ef4cc33a23a9ebf52664bd616 /src/emu/ui/ui.cpp
parent44f98845f7bd276a8db6a413e08981c2a44b1d38 (diff)
VideoSnaps patch
http://adb.arcadeitalia.net/videosnaps.php
Diffstat (limited to 'src/emu/ui/ui.cpp')
-rw-r--r--src/emu/ui/ui.cpp26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/emu/ui/ui.cpp b/src/emu/ui/ui.cpp
index 6d996ac50a0..860da34e212 100644
--- a/src/emu/ui/ui.cpp
+++ b/src/emu/ui/ui.cpp
@@ -286,6 +286,8 @@ void ui_manager::init()
m_popup_text_end = 0;
m_use_natural_keyboard = false;
m_mouse_arrow_texture = nullptr;
+ m_show_timecode_counter = false;
+ m_show_timecode_total = false;
m_load_save_hold = false;
get_font_rows(&machine());
@@ -1035,6 +1037,16 @@ bool ui_manager::is_menu_active(void)
}
+bool ui_manager::show_timecode_counter()
+{
+ return m_show_timecode_counter;
+}
+bool ui_manager::show_timecode_total()
+{
+ return m_show_timecode_total;
+}
+
+
/***************************************************************************
TEXT GENERATORS
@@ -1559,6 +1571,20 @@ UINT32 ui_manager::handler_ingame(running_machine &machine, render_container *co
JUSTIFY_RIGHT, WRAP_WORD, DRAW_OPAQUE, ARGB_WHITE, ARGB_BLACK, nullptr, nullptr);
}
+ // Show the duration of current part (intro or gameplay or extra)
+ if (machine.ui().show_timecode_counter()) {
+ std::string tempstring;
+ machine.ui().draw_text_full(container, machine.video().timecode_text(tempstring).c_str(), 0.0f, 0.0f, 1.0f,
+ JUSTIFY_RIGHT, WRAP_WORD, DRAW_OPAQUE, rgb_t(0xf0,0xf0,0x10,0x10), ARGB_BLACK, NULL, NULL);
+ }
+ // Show the total time elapsed for the video preview (all parts intro, gameplay, extras)
+ if (machine.ui().show_timecode_total()) {
+ std::string tempstring;
+ machine.ui().draw_text_full(container, machine.video().timecode_total_text(tempstring).c_str(), 0.0f, 0.0f, 1.0f,
+ JUSTIFY_LEFT, WRAP_WORD, DRAW_OPAQUE, rgb_t(0xf0,0x10,0xf0,0x10), ARGB_BLACK, NULL, NULL);
+ }
+
+
// draw the profiler if visible
if (machine.ui().show_profiler())
{